From 1cc43501db6884d29fc89eaacf1c1963d661ce64 Mon Sep 17 00:00:00 2001 From: "Reichart, Kai" Date: Mon, 19 May 2025 11:29:49 +0200 Subject: [PATCH] feat(RELTEC-12611): add api --- .github/dependabot.yaml | 20 + .github/pull_request_template.md | 15 + .github/workflows/api.yaml | 60 + .../semantic-commit-message-check.yaml | 20 + .gitignore | 53 + .openapi-generator-ignore | 28 + .openapi-generator/FILES | 94 + .openapi-generator/VERSION | 1 + .releaserc | 24 + LICENSE | 21 + README.md | 197 + api/openapi.yaml | 4402 +++++++++++++++++ api_management.go | 238 + api_rest_api_v1_owners.go | 996 ++++ api_rest_api_v1_repositories.go | 1044 ++++ api_rest_api_v1_services.go | 1137 +++++ api_webhooks.go | 131 + client.go | 679 +++ configuration.go | 222 + docs/Binary.md | 145 + docs/ConditionReferenceDto.md | 103 + docs/DeletionDto.md | 51 + docs/ErrorDto.md | 108 + docs/ExcludeMergeCheckUserDto.md | 51 + docs/HealthComponent.md | 82 + docs/Link.md | 82 + docs/ManagementAPI.md | 128 + docs/MergeStrategy.md | 51 + docs/Notification.md | 119 + docs/NotificationPayload.md | 108 + docs/OwnerCreateDto.md | 280 ++ docs/OwnerDto.md | 322 ++ docs/OwnerListDto.md | 72 + docs/OwnerPatchDto.md | 327 ++ docs/PostPromote.md | 56 + docs/ProtectedRef.md | 103 + docs/PullRequests.md | 82 + docs/Quicklink.md | 108 + docs/RefProtections.md | 82 + docs/RefProtectionsBranches.md | 186 + docs/RefProtectionsTags.md | 134 + docs/RepositoryConfigurationAccessKeyDto.md | 108 + docs/RepositoryConfigurationDefaultTaskDto.md | 51 + docs/RepositoryConfigurationDto.md | 602 +++ docs/RepositoryConfigurationDtoMergeConfig.md | 82 + docs/RepositoryConfigurationPatchDto.md | 550 ++ docs/RepositoryConfigurationWebhookDto.md | 124 + docs/RepositoryConfigurationWebhooksDto.md | 82 + docs/RepositoryCreateDto.md | 192 + docs/RepositoryDto.md | 286 ++ docs/RepositoryListDto.md | 72 + docs/RepositoryPatchDto.md | 249 + docs/RestApiV1OwnersAPI.md | 431 ++ docs/RestApiV1RepositoriesAPI.md | 442 ++ docs/RestApiV1ServicesAPI.md | 503 ++ docs/ServiceCreateDto.md | 317 ++ docs/ServiceDto.md | 385 ++ docs/ServiceListDto.md | 72 + docs/ServicePatchDto.md | 405 ++ docs/ServicePromotersDto.md | 51 + docs/ServiceSpecDto.md | 134 + docs/WebhooksAPI.md | 71 + go.mod | 6 + go.sum | 11 + mise.toml | 2 + model_binary.go | 306 ++ model_condition_reference_dto.go | 246 + model_deletion_dto.go | 170 + model_error_dto.go | 231 + model_exclude_merge_check_user_dto.go | 170 + model_health_component.go | 193 + model_link.go | 193 + model_merge_strategy.go | 159 + model_notification.go | 265 + model_notification_payload.go | 230 + model_owner_create_dto.go | 503 ++ model_owner_dto.go | 563 +++ model_owner_list_dto.go | 199 + model_owner_patch_dto.go | 571 +++ model_post_promote.go | 156 + model_protected_ref.go | 246 + model_pull_requests.go | 203 + model_quicklink.go | 230 + model_ref_protections.go | 193 + model_ref_protections_branches.go | 347 ++ model_ref_protections_tags.go | 271 + ...repository_configuration_access_key_dto.go | 230 + ...pository_configuration_default_task_dto.go | 169 + model_repository_configuration_dto.go | 950 ++++ ...pository_configuration_dto_merge_config.go | 193 + model_repository_configuration_patch_dto.go | 874 ++++ model_repository_configuration_webhook_dto.go | 273 + ...l_repository_configuration_webhooks_dto.go | 195 + model_repository_create_dto.go | 371 ++ model_repository_dto.go | 506 ++ model_repository_list_dto.go | 199 + model_repository_patch_dto.go | 455 ++ model_service_create_dto.go | 557 +++ model_service_dto.go | 655 +++ model_service_list_dto.go | 199 + model_service_patch_dto.go | 687 +++ model_service_promoters_dto.go | 169 + model_service_spec_dto.go | 271 + openapitools.json | 19 + package-lock.json | 2124 ++++++++ package.json | 16 + response.go | 48 + specs/v1.yaml | 2437 +++++++++ static.go | 6 + utils.go | 362 ++ 110 files changed, 35000 insertions(+) create mode 100644 .github/dependabot.yaml create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/api.yaml create mode 100644 .github/workflows/semantic-commit-message-check.yaml create mode 100644 .gitignore create mode 100644 .openapi-generator-ignore create mode 100644 .openapi-generator/FILES create mode 100644 .openapi-generator/VERSION create mode 100644 .releaserc create mode 100644 LICENSE create mode 100644 api/openapi.yaml create mode 100644 api_management.go create mode 100644 api_rest_api_v1_owners.go create mode 100644 api_rest_api_v1_repositories.go create mode 100644 api_rest_api_v1_services.go create mode 100644 api_webhooks.go create mode 100644 client.go create mode 100644 configuration.go create mode 100644 docs/Binary.md create mode 100644 docs/ConditionReferenceDto.md create mode 100644 docs/DeletionDto.md create mode 100644 docs/ErrorDto.md create mode 100644 docs/ExcludeMergeCheckUserDto.md create mode 100644 docs/HealthComponent.md create mode 100644 docs/Link.md create mode 100644 docs/ManagementAPI.md create mode 100644 docs/MergeStrategy.md create mode 100644 docs/Notification.md create mode 100644 docs/NotificationPayload.md create mode 100644 docs/OwnerCreateDto.md create mode 100644 docs/OwnerDto.md create mode 100644 docs/OwnerListDto.md create mode 100644 docs/OwnerPatchDto.md create mode 100644 docs/PostPromote.md create mode 100644 docs/ProtectedRef.md create mode 100644 docs/PullRequests.md create mode 100644 docs/Quicklink.md create mode 100644 docs/RefProtections.md create mode 100644 docs/RefProtectionsBranches.md create mode 100644 docs/RefProtectionsTags.md create mode 100644 docs/RepositoryConfigurationAccessKeyDto.md create mode 100644 docs/RepositoryConfigurationDefaultTaskDto.md create mode 100644 docs/RepositoryConfigurationDto.md create mode 100644 docs/RepositoryConfigurationDtoMergeConfig.md create mode 100644 docs/RepositoryConfigurationPatchDto.md create mode 100644 docs/RepositoryConfigurationWebhookDto.md create mode 100644 docs/RepositoryConfigurationWebhooksDto.md create mode 100644 docs/RepositoryCreateDto.md create mode 100644 docs/RepositoryDto.md create mode 100644 docs/RepositoryListDto.md create mode 100644 docs/RepositoryPatchDto.md create mode 100644 docs/RestApiV1OwnersAPI.md create mode 100644 docs/RestApiV1RepositoriesAPI.md create mode 100644 docs/RestApiV1ServicesAPI.md create mode 100644 docs/ServiceCreateDto.md create mode 100644 docs/ServiceDto.md create mode 100644 docs/ServiceListDto.md create mode 100644 docs/ServicePatchDto.md create mode 100644 docs/ServicePromotersDto.md create mode 100644 docs/ServiceSpecDto.md create mode 100644 docs/WebhooksAPI.md create mode 100644 go.mod create mode 100644 go.sum create mode 100644 mise.toml create mode 100644 model_binary.go create mode 100644 model_condition_reference_dto.go create mode 100644 model_deletion_dto.go create mode 100644 model_error_dto.go create mode 100644 model_exclude_merge_check_user_dto.go create mode 100644 model_health_component.go create mode 100644 model_link.go create mode 100644 model_merge_strategy.go create mode 100644 model_notification.go create mode 100644 model_notification_payload.go create mode 100644 model_owner_create_dto.go create mode 100644 model_owner_dto.go create mode 100644 model_owner_list_dto.go create mode 100644 model_owner_patch_dto.go create mode 100644 model_post_promote.go create mode 100644 model_protected_ref.go create mode 100644 model_pull_requests.go create mode 100644 model_quicklink.go create mode 100644 model_ref_protections.go create mode 100644 model_ref_protections_branches.go create mode 100644 model_ref_protections_tags.go create mode 100644 model_repository_configuration_access_key_dto.go create mode 100644 model_repository_configuration_default_task_dto.go create mode 100644 model_repository_configuration_dto.go create mode 100644 model_repository_configuration_dto_merge_config.go create mode 100644 model_repository_configuration_patch_dto.go create mode 100644 model_repository_configuration_webhook_dto.go create mode 100644 model_repository_configuration_webhooks_dto.go create mode 100644 model_repository_create_dto.go create mode 100644 model_repository_dto.go create mode 100644 model_repository_list_dto.go create mode 100644 model_repository_patch_dto.go create mode 100644 model_service_create_dto.go create mode 100644 model_service_dto.go create mode 100644 model_service_list_dto.go create mode 100644 model_service_patch_dto.go create mode 100644 model_service_promoters_dto.go create mode 100644 model_service_spec_dto.go create mode 100644 openapitools.json create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 response.go create mode 100644 specs/v1.yaml create mode 100644 static.go create mode 100644 utils.go diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..ef6accf --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,20 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" + labels: + - "dependencies" + reviewers: + - "Interhyp/technical-excellence" + commit-message: + prefix: "fix" + include: "scope" + pull-request-branch-name: + separator: "-" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..a6139f0 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,15 @@ +# Description + +Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change. + +Fixes # (issue) + +# Checklist + +- [ ] I have read the [CONTRIBUTING.md](/CONTRIBUTING-template.md) +- [ ] I have made corresponding changes to the documentation +- [ ] My changes generate no lint errors +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing tests pass locally with my changes +- [ ] Only MIT licensed or MIT license compatible dependencies are used (e.g.: Apache2 or BSD) +- [ ] The code contains no credentials, personalized data or company secrets \ No newline at end of file diff --git a/.github/workflows/api.yaml b/.github/workflows/api.yaml new file mode 100644 index 0000000..11b2388 --- /dev/null +++ b/.github/workflows/api.yaml @@ -0,0 +1,60 @@ +name: API + +on: + push: + paths-ignore: + - '**.md' + +jobs: + generate: + name: 🛠️ Generate + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '20.x' + cache: 'npm' + - run: npm ci + - run: npm run api + - name: Check for API spec changes + run: | + if [[ $(git status --porcelain) ]]; then + echo "API spec is outdated. Please run 'npm run api' locally and commit the changes." + exit 1 + fi + + release: + name: 🚀 Release + if: github.ref == 'refs/heads/main' + needs: generate + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - id: semantic-release + uses: go-semantic-release/action@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + prerelease: false + allow-initial-development-versions: true # remove to trigger an initial 1.0.0 release + changelog-generator-opt: "emojis=true" + hooks: goreleaser + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - id: repository-id + uses: ASzc/change-string-case-action@v6 + with: + string: ${{ github.repository }} + - if: steps.semantic-release.outputs.version != '' + run: | + TARGET=ghcr.io/${{ steps.repository-id.outputs.lowercase }}:${{ steps.semantic-release.outputs.version }} + SOURCE=${{ needs.build.outputs.image }} + + docker pull $SOURCE + docker tag $SOURCE $TARGET + docker push $TARGET diff --git a/.github/workflows/semantic-commit-message-check.yaml b/.github/workflows/semantic-commit-message-check.yaml new file mode 100644 index 0000000..e796581 --- /dev/null +++ b/.github/workflows/semantic-commit-message-check.yaml @@ -0,0 +1,20 @@ +name: 'Semantic Commit Message Checker' +on: + push: + branches-ignore: + - main + +jobs: + check-commit-message: + name: Check Commit Message + runs-on: ubuntu-latest + steps: + - name: Check valid types + uses: gsactions/commit-message-checker@v1 + with: + pattern: '^(((fix|feat|docs|style|perf|refactor|test|build|chore|ci|revert)\([\w_-]+\)))!{0,1}: .*' + error: 'Your commit message should match one of these types (build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test) in header.' + excludeDescription: 'true' + excludeTitle: 'true' + checkAllCommitMessages: 'true' + accessToken: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b6b40f4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,53 @@ +# If you prefer the allow list template instead of the deny list, see community template: +# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore +# +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +# Go workspace file +go.work +go.work.sum + +# env file +.env + +# IntelliJ project files +*.iml +*.iws +*.ipr +.idea/ + +# Eclipse project file +.settings/ +.classpath +.project + +# NetBeans specific +nbproject/private/ +build/ +nbbuild/ +dist/ +nbdist/ +nbactions.xml +nb-configuration.xml + +# OS +.DS_Store + +# NodeJS +node_modules + +.vscode \ No newline at end of file diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 0000000..bc48262 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,28 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md + +test/** +.gitignore +.travis.yml +git_push.sh diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 0000000..48ea92d --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,94 @@ +README.md +api/openapi.yaml +api_management.go +api_rest_api_v1_owners.go +api_rest_api_v1_repositories.go +api_rest_api_v1_services.go +api_webhooks.go +client.go +configuration.go +docs/Binary.md +docs/ConditionReferenceDto.md +docs/DeletionDto.md +docs/ErrorDto.md +docs/ExcludeMergeCheckUserDto.md +docs/HealthComponent.md +docs/Link.md +docs/ManagementAPI.md +docs/MergeStrategy.md +docs/Notification.md +docs/NotificationPayload.md +docs/OwnerCreateDto.md +docs/OwnerDto.md +docs/OwnerListDto.md +docs/OwnerPatchDto.md +docs/PostPromote.md +docs/ProtectedRef.md +docs/PullRequests.md +docs/Quicklink.md +docs/RefProtections.md +docs/RefProtectionsBranches.md +docs/RefProtectionsTags.md +docs/RepositoryConfigurationAccessKeyDto.md +docs/RepositoryConfigurationDefaultTaskDto.md +docs/RepositoryConfigurationDto.md +docs/RepositoryConfigurationDtoMergeConfig.md +docs/RepositoryConfigurationPatchDto.md +docs/RepositoryConfigurationWebhookDto.md +docs/RepositoryConfigurationWebhooksDto.md +docs/RepositoryCreateDto.md +docs/RepositoryDto.md +docs/RepositoryListDto.md +docs/RepositoryPatchDto.md +docs/RestApiV1OwnersAPI.md +docs/RestApiV1RepositoriesAPI.md +docs/RestApiV1ServicesAPI.md +docs/ServiceCreateDto.md +docs/ServiceDto.md +docs/ServiceListDto.md +docs/ServicePatchDto.md +docs/ServicePromotersDto.md +docs/ServiceSpecDto.md +docs/WebhooksAPI.md +go.mod +go.sum +model_binary.go +model_condition_reference_dto.go +model_deletion_dto.go +model_error_dto.go +model_exclude_merge_check_user_dto.go +model_health_component.go +model_link.go +model_merge_strategy.go +model_notification.go +model_notification_payload.go +model_owner_create_dto.go +model_owner_dto.go +model_owner_list_dto.go +model_owner_patch_dto.go +model_post_promote.go +model_protected_ref.go +model_pull_requests.go +model_quicklink.go +model_ref_protections.go +model_ref_protections_branches.go +model_ref_protections_tags.go +model_repository_configuration_access_key_dto.go +model_repository_configuration_default_task_dto.go +model_repository_configuration_dto.go +model_repository_configuration_dto_merge_config.go +model_repository_configuration_patch_dto.go +model_repository_configuration_webhook_dto.go +model_repository_configuration_webhooks_dto.go +model_repository_create_dto.go +model_repository_dto.go +model_repository_list_dto.go +model_repository_patch_dto.go +model_service_create_dto.go +model_service_dto.go +model_service_list_dto.go +model_service_patch_dto.go +model_service_promoters_dto.go +model_service_spec_dto.go +response.go +utils.go diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 0000000..5f84a81 --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.12.0 diff --git a/.releaserc b/.releaserc new file mode 100644 index 0000000..6857fa7 --- /dev/null +++ b/.releaserc @@ -0,0 +1,24 @@ +{ + "branches": ["main"], + "plugins": [ + "@semantic-release/commit-analyzer", + [ + "@semantic-release/release-notes-generator", + { + "preset": "conventionalcommits", + "presetConfig": { + "issueUrlFormat ": "https://atlas.interhyp.de/jira/browse/{{id}}" + } + } + ], + "@semantic-release/changelog", + [ + "@semantic-release/git", + { + "assets": [ + "CHANGELOG.md" + ] + } + ] + ] +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..aad2bbe --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Interhyp AG + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index e69de29..b0bafdc 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,197 @@ +# Go API client for openapi + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: v1 +- Package version: 1.0.0 +- Generator version: 7.12.0 +- Build package: org.openapitools.codegen.languages.GoClientCodegen +For more information, please visit [http://domain.com](http://domain.com) + +## Installation + +Install the following dependencies: + +```sh +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```go +import openapi "github.com/Interhyp/metadata-service-api" +``` + +To use a proxy, set the environment variable `HTTP_PROXY`: + +```go +os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") +``` + +## Configuration of Server URL + +Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. + +### Select Server Configuration + +For using other server than the one defined on index 0 set context value `openapi.ContextServerIndex` of type `int`. + +```go +ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1) +``` + +### Templated Server URL + +Templated server URL is formatted using default variables from configuration or from context value `openapi.ContextServerVariables` of type `map[string]string`. + +```go +ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{ + "basePath": "v2", +}) +``` + +Note, enum values are always validated and all unused variables are silently ignored. + +### URLs Configuration per Operation + +Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. +An operation is uniquely identified by `"{classname}Service.{nickname}"` string. +Similar rules for overriding default operation server index and variables applies by using `openapi.ContextOperationServerIndices` and `openapi.ContextOperationServerVariables` context maps. + +```go +ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ManagementAPI* | [**GetHealth**](docs/ManagementAPI.md#gethealth) | **Get** /health | +*ManagementAPI* | [**GetHealth1**](docs/ManagementAPI.md#gethealth1) | **Get** /management/health | +*RestApiV1OwnersAPI* | [**CreateOwner**](docs/RestApiV1OwnersAPI.md#createowner) | **Post** /rest/api/v1/owners/{owner} | create a new owner with a given alias +*RestApiV1OwnersAPI* | [**DeleteOwner**](docs/RestApiV1OwnersAPI.md#deleteowner) | **Delete** /rest/api/v1/owners/{owner} | delete the owner with a given alias +*RestApiV1OwnersAPI* | [**GetOwner**](docs/RestApiV1OwnersAPI.md#getowner) | **Get** /rest/api/v1/owners/{owner} | get a single owner by alias +*RestApiV1OwnersAPI* | [**GetOwners**](docs/RestApiV1OwnersAPI.md#getowners) | **Get** /rest/api/v1/owners | get owners +*RestApiV1OwnersAPI* | [**PatchOwner**](docs/RestApiV1OwnersAPI.md#patchowner) | **Patch** /rest/api/v1/owners/{owner} | patch an existing owner with a given alias +*RestApiV1OwnersAPI* | [**UpdateOwner**](docs/RestApiV1OwnersAPI.md#updateowner) | **Put** /rest/api/v1/owners/{owner} | update an existing owner with a given alias +*RestApiV1RepositoriesAPI* | [**GetRepositoriesOfOwner**](docs/RestApiV1RepositoriesAPI.md#getrepositoriesofowner) | **Get** /rest/api/v1/repositories | get repositories +*RestApiV1RepositoriesAPI* | [**GetRepository**](docs/RestApiV1RepositoriesAPI.md#getrepository) | **Get** /rest/api/v1/repositories/{repository} | get a single repository by key +*RestApiV1RepositoriesAPI* | [**PatchRepository**](docs/RestApiV1RepositoriesAPI.md#patchrepository) | **Patch** /rest/api/v1/repositories/{repository} | patch an existing repository with the given key +*RestApiV1RepositoriesAPI* | [**RegisterRepository**](docs/RestApiV1RepositoriesAPI.md#registerrepository) | **Post** /rest/api/v1/repositories/{repository} | register a new repository with the given key +*RestApiV1RepositoriesAPI* | [**RemoveRepository**](docs/RestApiV1RepositoriesAPI.md#removerepository) | **Delete** /rest/api/v1/repositories/{repository} | remove the repository with the given key +*RestApiV1RepositoriesAPI* | [**UpdateRepository**](docs/RestApiV1RepositoriesAPI.md#updaterepository) | **Put** /rest/api/v1/repositories/{repository} | update an existing repository with the given key +*RestApiV1ServicesAPI* | [**DeleteService**](docs/RestApiV1ServicesAPI.md#deleteservice) | **Delete** /rest/api/v1/services/{service} | delete the service with a given name +*RestApiV1ServicesAPI* | [**GetService**](docs/RestApiV1ServicesAPI.md#getservice) | **Get** /rest/api/v1/services/{service} | get a single service by name +*RestApiV1ServicesAPI* | [**GetServicePromoters**](docs/RestApiV1ServicesAPI.md#getservicepromoters) | **Get** /rest/api/v1/services/{service}/promoters | get all users who may promote a service +*RestApiV1ServicesAPI* | [**GetServices**](docs/RestApiV1ServicesAPI.md#getservices) | **Get** /rest/api/v1/services | get services +*RestApiV1ServicesAPI* | [**PatchService**](docs/RestApiV1ServicesAPI.md#patchservice) | **Patch** /rest/api/v1/services/{service} | patch an existing service with the given name +*RestApiV1ServicesAPI* | [**RegisterService**](docs/RestApiV1ServicesAPI.md#registerservice) | **Post** /rest/api/v1/services/{service} | register a new service with the given name +*RestApiV1ServicesAPI* | [**UpdateService**](docs/RestApiV1ServicesAPI.md#updateservice) | **Put** /rest/api/v1/services/{service} | update an existing service with the given name +*WebhooksAPI* | [**PostWebhook**](docs/WebhooksAPI.md#postwebhook) | **Post** /webhooks/vcs/github | + + +## Documentation For Models + + - [Binary](docs/Binary.md) + - [ConditionReferenceDto](docs/ConditionReferenceDto.md) + - [DeletionDto](docs/DeletionDto.md) + - [ErrorDto](docs/ErrorDto.md) + - [ExcludeMergeCheckUserDto](docs/ExcludeMergeCheckUserDto.md) + - [HealthComponent](docs/HealthComponent.md) + - [Link](docs/Link.md) + - [MergeStrategy](docs/MergeStrategy.md) + - [Notification](docs/Notification.md) + - [NotificationPayload](docs/NotificationPayload.md) + - [OwnerCreateDto](docs/OwnerCreateDto.md) + - [OwnerDto](docs/OwnerDto.md) + - [OwnerListDto](docs/OwnerListDto.md) + - [OwnerPatchDto](docs/OwnerPatchDto.md) + - [PostPromote](docs/PostPromote.md) + - [ProtectedRef](docs/ProtectedRef.md) + - [PullRequests](docs/PullRequests.md) + - [Quicklink](docs/Quicklink.md) + - [RefProtections](docs/RefProtections.md) + - [RefProtectionsBranches](docs/RefProtectionsBranches.md) + - [RefProtectionsTags](docs/RefProtectionsTags.md) + - [RepositoryConfigurationAccessKeyDto](docs/RepositoryConfigurationAccessKeyDto.md) + - [RepositoryConfigurationDefaultTaskDto](docs/RepositoryConfigurationDefaultTaskDto.md) + - [RepositoryConfigurationDto](docs/RepositoryConfigurationDto.md) + - [RepositoryConfigurationDtoMergeConfig](docs/RepositoryConfigurationDtoMergeConfig.md) + - [RepositoryConfigurationPatchDto](docs/RepositoryConfigurationPatchDto.md) + - [RepositoryConfigurationWebhookDto](docs/RepositoryConfigurationWebhookDto.md) + - [RepositoryConfigurationWebhooksDto](docs/RepositoryConfigurationWebhooksDto.md) + - [RepositoryCreateDto](docs/RepositoryCreateDto.md) + - [RepositoryDto](docs/RepositoryDto.md) + - [RepositoryListDto](docs/RepositoryListDto.md) + - [RepositoryPatchDto](docs/RepositoryPatchDto.md) + - [ServiceCreateDto](docs/ServiceCreateDto.md) + - [ServiceDto](docs/ServiceDto.md) + - [ServiceListDto](docs/ServiceListDto.md) + - [ServicePatchDto](docs/ServicePatchDto.md) + - [ServicePromotersDto](docs/ServicePromotersDto.md) + - [ServiceSpecDto](docs/ServiceSpecDto.md) + + +## Documentation For Authorization + + +Authentication schemes defined for the API: +### bearerAuth + +- **Type**: HTTP Bearer token authentication + +Example + +```go +auth := context.WithValue(context.Background(), openapi.ContextAccessToken, "BEARER_TOKEN_STRING") +r, err := client.Service.Operation(auth, args) +``` + +### basicAuth + +- **Type**: HTTP basic authentication + +Example + +```go +auth := context.WithValue(context.Background(), openapi.ContextBasicAuth, openapi.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + + +## Documentation for Utility Methods + +Due to the fact that model structure members are all pointers, this package contains +a number of utility functions to easily obtain pointers to values of basic types. +Each of these functions takes a value of the given basic type and returns a pointer to it: + +* `PtrBool` +* `PtrInt` +* `PtrInt32` +* `PtrInt64` +* `PtrFloat` +* `PtrFloat32` +* `PtrFloat64` +* `PtrString` +* `PtrTime` + +## Author + +somebody@some-organisation.com + diff --git a/api/openapi.yaml b/api/openapi.yaml new file mode 100644 index 0000000..5d34ce8 --- /dev/null +++ b/api/openapi.yaml @@ -0,0 +1,4402 @@ +openapi: 3.1.0 +info: + contact: + email: somebody@some-organisation.com + name: replace me + url: http://domain.com + description: "Obtain and manage metadata for owners, services, repositories. Please\ + \ see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md)\ + \ for details. **CLIENTS MUST READ!**" + license: + name: (C) 2022 - Some Organisation + url: https://www.some-organisation.com/ + title: Metadata + version: v1 +servers: +- url: / +tags: +- name: /rest/api/v1/owners +- name: /rest/api/v1/services +- name: /rest/api/v1/repositories +- name: management +- name: webhook +paths: + /rest/api/v1/owners: + get: + description: "Obtains all owners. Currently, no filtering is available." + operationId: getOwners + parameters: [] + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerListDto' + description: Success + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unexpected error + summary: get owners + tags: + - /rest/api/v1/owners + /rest/api/v1/owners/{owner}: + delete: + description: Delete an owner - cannot have any services or repositories left + operationId: deleteOwner + parameters: + - explode: false + in: path + name: owner + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeletionDto' + required: true + responses: + "204": + description: No Content - successfully deleted + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unable to parse input (the body failed to validate) + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unauthorized (aka unauthenticated) - you need to provide the + Authorization header with a bearer token + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Forbidden (aka unauthorized) - your bearer token did not grant + you access to this operation + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Not Found - an owner with this alias does not exist + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Conflict - this owner still owns something and cannot be deleted + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unexpected error + "502": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Bad gateway - a downstream error occurred + security: + - bearerAuth: [] + - basicAuth: [] + summary: delete the owner with a given alias + tags: + - /rest/api/v1/owners + get: + description: Obtains owner information for a single owner. + operationId: getOwner + parameters: + - explode: false + in: path + name: owner + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerDto' + description: Success + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Owner not found + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unexpected error + summary: get a single owner by alias + tags: + - /rest/api/v1/owners + patch: + description: Patch an owner. + operationId: patchOwner + parameters: + - explode: false + in: path + name: owner + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerPatchDto' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerDto' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unable to parse input (the body failed to validate) + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unauthorized (aka unauthenticated) - you need to provide the + Authorization header with a bearer token + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Forbidden (aka unauthorized) - your bearer token did not grant + you access to this operation + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Not Found - an owner with this alias does not exist + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerDto' + description: "Conflict - concurrent update detected, please retry the operation\ + \ based on the current commit hash and timestamp" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unexpected error + "502": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Bad gateway - a downstream error occurred + security: + - bearerAuth: [] + - basicAuth: [] + summary: patch an existing owner with a given alias + tags: + - /rest/api/v1/owners + post: + description: Create a new owner. + operationId: createOwner + parameters: + - explode: false + in: path + name: owner + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerCreateDto' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerDto' + description: Created + headers: + Location: + example: /rest/api/v1/owners/some-owner + explode: false + schema: + type: string + style: simple + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: "Unable to parse input (invalid owner alias format, or the\ + \ body failed to validate)" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unauthorized (aka unauthenticated) - you need to provide the + Authorization header with a bearer token + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Forbidden (aka unauthorized) - your bearer token did not grant + you access to this operation + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerDto' + description: Conflict - this owner alias already exists + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unexpected error + "502": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Bad gateway - a downstream error occurred + security: + - bearerAuth: [] + - basicAuth: [] + summary: create a new owner with a given alias + tags: + - /rest/api/v1/owners + put: + description: Update an owner. + operationId: updateOwner + parameters: + - explode: false + in: path + name: owner + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerDto' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerDto' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unable to parse input (the body failed to validate) + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unauthorized (aka unauthenticated) - you need to provide the + Authorization header with a bearer token + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Forbidden (aka unauthorized) - your bearer token did not grant + you access to this operation + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Not Found - an owner with this alias does not exist + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerDto' + description: "Conflict - concurrent update detected, please retry the operation\ + \ based on the current commit hash and timestamp" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unexpected error + "502": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Bad gateway - a downstream error occurred + security: + - bearerAuth: [] + - basicAuth: [] + summary: update an existing owner with a given alias + tags: + - /rest/api/v1/owners + /rest/api/v1/services: + get: + description: "Obtains the list of services, possibly filtered by an owner alias." + operationId: getServices + parameters: + - description: "Allows filtering the output by owner alias. Valid aliases match\ + \ `^[a-z](-?[a-z0-9]+)*$`." + example: some-owner + explode: true + in: query + name: owner + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceListDto' + description: Success + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Owner not found + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unexpected error + summary: get services + tags: + - /rest/api/v1/services + /rest/api/v1/services/{service}: + delete: + description: Delete a service. Will not delete associated repositories from + metadata. + operationId: deleteService + parameters: + - description: "The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`." + explode: false + in: path + name: service + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeletionDto' + required: true + responses: + "204": + description: No Content - successfully deleted + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unable to parse input (the body failed to validate) + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unauthorized (aka unauthenticated) - you need to provide the + Authorization header with a bearer token + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Forbidden (aka unauthorized) - your bearer token did not grant + you access to this operation + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Not Found - a service with this name does not exist + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: "Conflict - concurrent update detected, git change could not\ + \ be pushed. Please retry the operation based on the current data" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unexpected error + "502": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Bad gateway - a downstream error occurred + security: + - bearerAuth: [] + - basicAuth: [] + summary: delete the service with a given name + tags: + - /rest/api/v1/services + get: + operationId: getService + parameters: + - description: "The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`." + explode: false + in: path + name: service + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDto' + description: Success + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Service not found + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unexpected error + summary: get a single service by name + tags: + - /rest/api/v1/services + patch: + description: Patch a service. + operationId: patchService + parameters: + - description: "The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`." + explode: false + in: path + name: service + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ServicePatchDto' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDto' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unable to parse input (the body failed to validate) + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unauthorized (aka unauthenticated) - you need to provide the + Authorization header with a bearer token + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Forbidden (aka unauthorized) - your bearer token did not grant + you access to this operation + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Not Found - a service with this name does not exist + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDto' + description: "Conflict - concurrent update detected, please retry the operation\ + \ based on the current commit hash and timestamp" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unexpected error + "502": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Bad gateway - a downstream error occurred + security: + - bearerAuth: [] + - basicAuth: [] + summary: patch an existing service with the given name + tags: + - /rest/api/v1/services + post: + description: Register a new service in the metadata. + operationId: registerService + parameters: + - description: "The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`." + explode: false + in: path + name: service + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceCreateDto' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDto' + description: Created + headers: + Location: + example: /rest/api/v1/services/unicorn-finder-service + explode: false + schema: + type: string + style: simple + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: "Unable to parse input (invalid service name format, or the\ + \ body failed to validate)" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unauthorized (aka unauthenticated) - you need to provide the + Authorization header with a bearer token + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Forbidden (aka unauthorized) - your bearer token did not grant + you access to this operation + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDto' + description: Conflict - this service name already exists (may be under a + different owner - service names are globally unique) + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unexpected error + "502": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Bad gateway - a downstream error occurred + security: + - bearerAuth: [] + - basicAuth: [] + summary: register a new service with the given name + tags: + - /rest/api/v1/services + put: + description: Update a service. + operationId: updateService + parameters: + - description: "The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`." + explode: false + in: path + name: service + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDto' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDto' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unable to parse input (the body failed to validate) + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unauthorized (aka unauthenticated) - you need to provide the + Authorization header with a bearer token + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Forbidden (aka unauthorized) - your bearer token did not grant + you access to this operation + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Not Found - a service with this name does not exist + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDto' + description: "Conflict - concurrent update detected, please retry the operation\ + \ based on the current commit hash and timestamp" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unexpected error + "502": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Bad gateway - a downstream error occurred + security: + - bearerAuth: [] + - basicAuth: [] + summary: update an existing service with the given name + tags: + - /rest/api/v1/services + /rest/api/v1/services/{service}/promoters: + get: + operationId: getServicePromoters + parameters: + - description: "The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`." + explode: false + in: path + name: service + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ServicePromotersDto' + description: Success + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Service not found + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unexpected error + summary: get all users who may promote a service + tags: + - /rest/api/v1/services + /rest/api/v1/repositories: + get: + description: "Obtain a list of repositories, potentially filtered by owner alias\ + \ or service name" + operationId: getRepositoriesOfOwner + parameters: + - description: "Optional - allows filtering the output by repository url. Must\ + \ match `^[a-z](-?:?@?.?\\/?[a-z0-9]+)*$`." + example: git@github.com:some-org/some-repo.git + explode: true + in: query + name: url + required: false + schema: + type: string + style: form + - description: "Optional - the alias of an owner. If present, only repositories\ + \ with this owner are returned. Must match `^[a-z](-?[a-z0-9]+)*$`." + example: some-owner + explode: true + in: query + name: owner + required: false + schema: + type: string + style: form + - description: "Optional - the name of a service. If present, only repositories\ + \ referenced by the given service are returned. Must match `^[a-z](-?[a-z0-9]+)*$`." + example: unicorn-finder-service + explode: true + in: query + name: service + required: false + schema: + type: string + style: form + - description: "Optional - allows filtering the output by repository name (the\ + \ first part of the key before the .). Must match `^[a-z](-?[a-z0-9]+)*$`." + example: some-service + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: "Optional - allows filtering the output by repository type (the\ + \ second part of the key after the .). Must currently be one of api, helm-chart,\ + \ helm-deployment, implementation, terraform-module, javascript-module." + example: helm-chart + explode: true + in: query + name: type + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryListDto' + description: Success + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unexpected error + summary: get repositories + tags: + - /rest/api/v1/repositories + /rest/api/v1/repositories/{repository}: + delete: + description: "Delete a repository from metadata. Will not delete the actual\ + \ repository, just the metadata." + operationId: removeRepository + parameters: + - example: unicorn-finder-service.implementation + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeletionDto' + required: true + responses: + "204": + description: No Content - successfully deleted + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unable to parse input (the body failed to validate) + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unauthorized (aka unauthenticated) - you need to provide the + Authorization header with a bearer token + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Forbidden (aka unauthorized) - your bearer token did not grant + you access to this operation + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Not Found - a repository with this key does not exist + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: "Conflict - concurrent update detected, git change could not\ + \ be pushed. Please retry the operation based on the current data" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unexpected error + "502": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Bad gateway - a downstream error occurred + security: + - bearerAuth: [] + - basicAuth: [] + summary: remove the repository with the given key + tags: + - /rest/api/v1/repositories + get: + operationId: getRepository + parameters: + - example: unicorn-finder-service.implementation + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryDto' + description: Success + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Owner or repository not found + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unexpected error + summary: get a single repository by key + tags: + - /rest/api/v1/repositories + patch: + description: Patch a repository. + operationId: patchRepository + parameters: + - example: unicorn-finder-service.implementation + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryPatchDto' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryDto' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unable to parse input (the body failed to validate) + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unauthorized (aka unauthenticated) - you need to provide the + Authorization header with a bearer token + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Forbidden (aka unauthorized) - your bearer token did not grant + you access to this operation + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Not Found - a repository with this key does not exist + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryDto' + description: "Conflict - concurrent update detected, please retry the operation\ + \ based on the current commit hash and timestamp" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unexpected error + "502": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Bad gateway - a downstream error occurred + security: + - bearerAuth: [] + - basicAuth: [] + summary: patch an existing repository with the given key + tags: + - /rest/api/v1/repositories + post: + description: Register a new repository in the metadata. Note that this does + not actually create it. + operationId: registerRepository + parameters: + - example: unicorn-finder-service.implementation + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryCreateDto' + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryDto' + description: Created + headers: + Location: + example: /rest/api/v1/repositories/unicorn-finder-service.implementation + explode: false + schema: + type: string + style: simple + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: "Unable to parse input (invalid repository key format, or the\ + \ body failed to validate)" + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unauthorized (aka unauthenticated) - you need to provide the + Authorization header with a bearer token + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Forbidden (aka unauthorized) - your bearer token did not grant + you access to this operation + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryDto' + description: Conflict - this repository key already exists (may be under + a different owner - repository keys are globally unique) + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unexpected error + "502": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Bad gateway - a downstream error occurred + security: + - bearerAuth: [] + - basicAuth: [] + summary: register a new repository with the given key + tags: + - /rest/api/v1/repositories + put: + description: Update a repository + operationId: updateRepository + parameters: + - example: unicorn-finder-service.implementation + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryDto' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryDto' + description: Success + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unable to parse input (the body failed to validate) + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unauthorized (aka unauthenticated) - you need to provide the + Authorization header with a bearer token + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Forbidden (aka unauthorized) - your bearer token did not grant + you access to this operation + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Not Found - a repository with this key does not exist + "409": + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryDto' + description: "Conflict - concurrent update detected, please retry the operation\ + \ based on the current commit hash and timestamp, or you tried to move\ + \ a repository to another owner while a service refers to it, in this\ + \ case, please move the service instead" + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Unexpected error + "502": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + description: Bad gateway - a downstream error occurred + security: + - bearerAuth: [] + - basicAuth: [] + summary: update an existing repository with the given key + tags: + - /rest/api/v1/repositories + /health: + get: + operationId: getHealth + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/HealthComponent' + description: OK + "500": + content: + '*/*': + schema: + $ref: '#/components/schemas/ErrorDto' + description: Internal Server Error + tags: + - management + /management/health: + get: + operationId: getHealth_1 + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/HealthComponent' + description: OK + "500": + content: + '*/*': + schema: + $ref: '#/components/schemas/ErrorDto' + description: Internal Server Error + tags: + - management + /webhooks/vcs/github: + post: + operationId: postWebhook + requestBody: + content: + application/json: + schema: + type: object + required: true + responses: + "204": + description: Success + "400": + description: Bad Request + "404": + description: Deployment Repository or Git Reference Not found + "422": + description: Bad Deployment Repository + "500": + content: + '*/*': + schema: + $ref: '#/components/schemas/ErrorDto' + description: Internal Server Error + tags: + - webhooks +components: + schemas: + OwnerDto: + example: + timeStamp: timeStamp + jiraIssue: jiraIssue + displayName: displayName + contact: contact + members: + - members + - members + groups: + key: + - groups + - groups + links: + - title: title + url: url + - title: title + url: url + productOwner: productOwner + promoters: + - promoters + - promoters + defaultJiraProject: defaultJiraProject + commitHash: commitHash + teamsChannelURL: teamsChannelURL + properties: + contact: + description: The contact information of the owner + type: string + teamsChannelURL: + description: The teams channel url information of the owner + type: string + productOwner: + description: The product owner of this owner space + type: string + members: + description: A list of users which constitute this owner + items: + type: string + type: array + groups: + additionalProperties: + items: + type: string + description: "Collection of arbitrary user groups which can be referenced\ + \ in service configurations. Map of string (group name e.g. some-owner)\ + \ of strings (list of usernames), one username for each group is required." + promoters: + description: A list of users that are allowed to promote services in this + owner space + items: + description: The username of a user allowed to promote services in this + owner space + type: string + type: array + defaultJiraProject: + description: The default jira project that is used by this owner space + type: string + timeStamp: + description: "ISO-8601 UTC date time at which this information was originally\ + \ committed. When sending an update, include the original timestamp you\ + \ got so we can detect concurrent updates." + type: string + commitHash: + description: "The git commit hash this information was originally committed\ + \ under. When sending an update, include the original commitHash you got\ + \ so we can detect concurrent updates." + type: string + jiraIssue: + description: "The jira issue to use for committing a change, or the last\ + \ jira issue used." + type: string + displayName: + description: "A display name of the owner, to be presented in user interfaces\ + \ instead of the owner's name, when available" + type: string + links: + items: + $ref: '#/components/schemas/Link' + type: array + required: + - commitHash + - contact + - jiraIssue + - timeStamp + OwnerCreateDto: + example: + jiraIssue: jiraIssue + displayName: displayName + contact: contact + members: + - members + - members + groups: + key: + - groups + - groups + links: + - title: title + url: url + - title: title + url: url + productOwner: productOwner + promoters: + - promoters + - promoters + defaultJiraProject: defaultJiraProject + teamsChannelURL: teamsChannelURL + properties: + contact: + description: The contact information of the owner + type: string + teamsChannelURL: + description: The teams channel url information of the owner + type: string + productOwner: + description: The product owner of this owner space + type: string + promoters: + description: A list of users that are allowed to promote services in this + owner space + items: + description: The username of a user allowed to promote services in this + owner space + type: string + type: array + members: + description: A list of users which constitute this owner + items: + type: string + type: array + groups: + additionalProperties: + items: + type: string + description: "Map of string (group name e.g. some-owner) of strings (list\ + \ of usernames), one username for each group is required." + defaultJiraProject: + description: The default jira project that is used by this owner space + type: string + jiraIssue: + description: "The jira issue to use for committing a change, or the last\ + \ jira issue used." + type: string + displayName: + description: "A display name of the owner, to be presented in user interfaces\ + \ instead of the owner's name, when available" + type: string + links: + items: + $ref: '#/components/schemas/Link' + type: array + required: + - contact + - jiraIssue + OwnerPatchDto: + example: + timeStamp: timeStamp + jiraIssue: jiraIssue + displayName: displayName + contact: contact + members: + - members + - members + groups: + key: + - groups + - groups + links: + - title: title + url: url + - title: title + url: url + productOwner: productOwner + promoters: + - promoters + - promoters + defaultJiraProject: defaultJiraProject + commitHash: commitHash + teamsChannelURL: teamsChannelURL + properties: + contact: + description: The contact information of the owner + type: string + teamsChannelURL: + description: The teams channel url information of the owner + type: string + productOwner: + description: The product owner of this owner space + type: string + members: + description: A list of users which constitute this owner + items: + type: string + type: array + groups: + additionalProperties: + items: + type: string + description: "Map of string (group name e.g. some-owner) of strings (list\ + \ of usernames), one username for each group is required." + promoters: + description: A list of users that are allowed to promote services in this + owner space + items: + description: The username of a user allowed to promote services in this + owner space + type: string + type: array + defaultJiraProject: + description: The default jira project that is used by this owner space + type: string + timeStamp: + description: "ISO-8601 UTC date time at which this information was originally\ + \ committed. When sending an update, include the original timestamp you\ + \ got so we can detect concurrent updates." + type: string + commitHash: + description: "The git commit hash this information was originally committed\ + \ under. When sending an update, include the original commitHash you got\ + \ so we can detect concurrent updates." + type: string + jiraIssue: + description: "The jira issue to use for committing a change, or the last\ + \ jira issue used." + type: string + displayName: + description: "A display name of the owner, to be presented in user interfaces\ + \ instead of the owner's name, when available" + type: string + links: + items: + $ref: '#/components/schemas/Link' + type: array + required: + - commitHash + - jiraIssue + - timeStamp + OwnerListDto: + example: + timeStamp: timeStamp + owners: + key: + timeStamp: timeStamp + jiraIssue: jiraIssue + displayName: displayName + contact: contact + members: + - members + - members + groups: + key: + - groups + - groups + links: + - title: title + url: url + - title: title + url: url + productOwner: productOwner + promoters: + - promoters + - promoters + defaultJiraProject: defaultJiraProject + commitHash: commitHash + teamsChannelURL: teamsChannelURL + properties: + owners: + additionalProperties: + $ref: '#/components/schemas/OwnerDto' + timeStamp: + description: ISO-8601 UTC date time at which the list of owners was obtained + from service-metadata + type: string + required: + - owners + - timeStamp + ServiceDto: + example: + owner: owner + quicklinks: + - url: /swagger-ui/index.html + title: SwaggerUI + description: Displays the frontend for the API. + - url: /swagger-ui/index.html + title: SwaggerUI + description: Displays the frontend for the API. + description: description + spec: + providesApis: + - providesApis + - providesApis + system: system + dependsOn: + - dependsOn + - dependsOn + consumesApis: + - consumesApis + - consumesApis + commitHash: commitHash + tags: + - tags + - tags + labels: + key: labels + timeStamp: timeStamp + lifecycle: experimental + alertTarget: alertTarget + jiraIssue: jiraIssue + repositories: + - repositories + - repositories + postPromotes: + binaries: + - versionPrefix: versionPrefix + groupId: groupId + classifier: classifier + artifactId: artifactId + fileType: fileType + - versionPrefix: versionPrefix + groupId: groupId + classifier: classifier + artifactId: artifactId + fileType: fileType + operationType: WORKLOAD + internetExposed: true + properties: + owner: + description: "The alias of the service owner. Note, an update with changed\ + \ owner will move the service and any associated repositories to the new\ + \ owner, but of course this will not move e.g. Jenkins jobs. That's your\ + \ job." + type: string + description: + description: A short description of the functionality of the service. + type: string + quicklinks: + description: A list of quicklinks related to the service + items: + $ref: '#/components/schemas/Quicklink' + type: array + repositories: + description: "The keys of repositories associated with the service. When\ + \ sending an update, they must refer to repositories that belong to this\ + \ service, or the update will fail" + items: + description: The key of a repository associated with the service + type: string + type: array + alertTarget: + description: The default channel used to send any alerts of the service + to. Can be an email address or a Teams webhook URL + type: string + operationType: + default: WORKLOAD + description: "The operation type of the service. 'WORKLOAD' follows the\ + \ default deployment strategy of one instance per environment, 'PLATFORM'\ + \ one instance per cluster or node and 'APPLICATION' is a standalone application\ + \ that is not deployed via the common strategies." + type: string + x-extensible-enum: + - WORKLOAD + - PLATFORM + - APPLICATION + internetExposed: + description: The value defines if the service is available from the internet + and the time period in which security holes must be processed. + type: boolean + tags: + items: + type: string + type: array + labels: + additionalProperties: + type: string + spec: + $ref: '#/components/schemas/ServiceSpecDto' + postPromotes: + $ref: '#/components/schemas/PostPromote' + timeStamp: + description: "ISO-8601 UTC date time at which this information was originally\ + \ committed. When sending an update, include the original timestamp you\ + \ got so we can detect concurrent updates." + type: string + commitHash: + description: "The git commit hash this information was originally committed\ + \ under. When sending an update, include the original commitHash you got\ + \ so we can detect concurrent updates." + type: string + jiraIssue: + description: "The jira issue to use for committing a change, or the last\ + \ jira issue used." + type: string + lifecycle: + description: "The current phase of the service's development. A service\ + \ usually starts off as 'experimental', then becomes 'operational' (i.\ + \ e. can be reliably used and/or consumed). Once 'deprecated', the service\ + \ doesn’t guarantee reliable use/consumption any longer and if 'decommissionable',\ + \ the service will soon cease to exist." + enum: + - experimental + - operational + - deprecated + - decommissionable + type: string + required: + - alertTarget + - commitHash + - jiraIssue + - owner + - quicklinks + - repositories + - timeStamp + ServiceCreateDto: + example: + owner: owner + alertTarget: alertTarget + quicklinks: + - url: /swagger-ui/index.html + title: SwaggerUI + description: Displays the frontend for the API. + - url: /swagger-ui/index.html + title: SwaggerUI + description: Displays the frontend for the API. + jiraIssue: jiraIssue + repositories: + - repositories + - repositories + postPromotes: + binaries: + - versionPrefix: versionPrefix + groupId: groupId + classifier: classifier + artifactId: artifactId + fileType: fileType + - versionPrefix: versionPrefix + groupId: groupId + classifier: classifier + artifactId: artifactId + fileType: fileType + description: description + operationType: WORKLOAD + spec: + providesApis: + - providesApis + - providesApis + system: system + dependsOn: + - dependsOn + - dependsOn + consumesApis: + - consumesApis + - consumesApis + internetExposed: true + tags: + - tags + - tags + labels: + key: labels + properties: + owner: + description: "The alias of the service owner. Note, an update with changed\ + \ owner will move the service and any associated repositories to the new\ + \ owner, but of course this will not move e.g. Jenkins jobs. That's your\ + \ job." + type: string + description: + description: A short description of the functionality of the service. + type: string + quicklinks: + description: A list of quicklinks related to the service + items: + $ref: '#/components/schemas/Quicklink' + type: array + repositories: + description: "The keys of repositories associated with the service. When\ + \ sending an update, they must refer to repositories that belong to this\ + \ service, or the update will fail" + items: + description: The key of a repository associated with the service + type: string + type: array + alertTarget: + description: The default channel used to send any alerts of the service + to. Can be an email address or a Teams webhook URL + type: string + operationType: + default: WORKLOAD + description: "The operation type of the service. 'WORKLOAD' follows the\ + \ default deployment strategy of one instance per environment, 'PLATFORM'\ + \ one instance per cluster or node and 'APPLICATION' is a standalone application\ + \ that is not deployed via the common strategies." + type: string + x-extensible-enum: + - WORKLOAD + - PLATFORM + - APPLICATION + internetExposed: + description: The value defines if the service is available from the internet + and the time period in which security holes must be processed. + type: boolean + tags: + items: + type: string + type: array + labels: + additionalProperties: + type: string + spec: + $ref: '#/components/schemas/ServiceSpecDto' + postPromotes: + $ref: '#/components/schemas/PostPromote' + jiraIssue: + description: "The jira issue to use for committing a change, or the last\ + \ jira issue used." + type: string + required: + - alertTarget + - jiraIssue + - owner + - quicklinks + - repositories + ServicePatchDto: + example: + owner: owner + quicklinks: + - url: /swagger-ui/index.html + title: SwaggerUI + description: Displays the frontend for the API. + - url: /swagger-ui/index.html + title: SwaggerUI + description: Displays the frontend for the API. + description: description + spec: + providesApis: + - providesApis + - providesApis + system: system + dependsOn: + - dependsOn + - dependsOn + consumesApis: + - consumesApis + - consumesApis + commitHash: commitHash + tags: + - tags + - tags + labels: + key: labels + timeStamp: timeStamp + lifecycle: experimental + alertTarget: alertTarget + jiraIssue: jiraIssue + repositories: + - repositories + - repositories + postPromotes: + binaries: + - versionPrefix: versionPrefix + groupId: groupId + classifier: classifier + artifactId: artifactId + fileType: fileType + - versionPrefix: versionPrefix + groupId: groupId + classifier: classifier + artifactId: artifactId + fileType: fileType + operationType: WORKLOAD + internetExposed: true + properties: + owner: + description: "The alias of the service owner. Note, a patch with changed\ + \ owner will move the service and any associated repositories to the new\ + \ owner, but of course this will not move e.g. Jenkins jobs. That's your\ + \ job." + type: string + description: + description: A short description of the functionality of the service. + type: string + quicklinks: + description: A list of quicklinks related to the service + items: + $ref: '#/components/schemas/Quicklink' + type: array + repositories: + description: "The keys of repositories associated with the service. When\ + \ sending an update, they must refer to repositories that belong to this\ + \ service, or the update will fail" + items: + description: The key of a repository associated with the service + type: string + type: array + alertTarget: + description: The default channel used to send any alerts of the service + to. Can be an email address or a Teams webhook URL + type: string + operationType: + default: WORKLOAD + description: "The operation type of the service. 'WORKLOAD' follows the\ + \ default deployment strategy of one instance per environment, 'PLATFORM'\ + \ one instance per cluster or node and 'APPLICATION' is a standalone application\ + \ that is not deployed via the common strategies." + type: string + x-extensible-enum: + - WORKLOAD + - PLATFORM + - APPLICATION + internetExposed: + description: The value defines if the service is available from the internet + and the time period in which security holes must be processed. + type: boolean + tags: + items: + type: string + type: array + labels: + additionalProperties: + type: string + spec: + $ref: '#/components/schemas/ServiceSpecDto' + postPromotes: + $ref: '#/components/schemas/PostPromote' + timeStamp: + description: "ISO-8601 UTC date time at which this information was originally\ + \ committed. When sending an update, include the original timestamp you\ + \ got so we can detect concurrent updates." + type: string + commitHash: + description: "The git commit hash this information was originally committed\ + \ under. When sending an update, include the original commitHash you got\ + \ so we can detect concurrent updates." + type: string + jiraIssue: + description: "The jira issue to use for committing a change, or the last\ + \ jira issue used." + type: string + lifecycle: + description: "The current phase of the service's development. A service\ + \ usually starts off as 'experimental', then becomes 'operational' (i.\ + \ e. can be reliably used and/or consumed). Once 'deprecated', the service\ + \ doesn’t guarantee reliable use/consumption any longer." + enum: + - experimental + - operational + - deprecated + type: string + required: + - commitHash + - jiraIssue + - timeStamp + ServiceListDto: + example: + timeStamp: timeStamp + services: + key: + owner: owner + quicklinks: + - url: /swagger-ui/index.html + title: SwaggerUI + description: Displays the frontend for the API. + - url: /swagger-ui/index.html + title: SwaggerUI + description: Displays the frontend for the API. + description: description + spec: + providesApis: + - providesApis + - providesApis + system: system + dependsOn: + - dependsOn + - dependsOn + consumesApis: + - consumesApis + - consumesApis + commitHash: commitHash + tags: + - tags + - tags + labels: + key: labels + timeStamp: timeStamp + lifecycle: experimental + alertTarget: alertTarget + jiraIssue: jiraIssue + repositories: + - repositories + - repositories + postPromotes: + binaries: + - versionPrefix: versionPrefix + groupId: groupId + classifier: classifier + artifactId: artifactId + fileType: fileType + - versionPrefix: versionPrefix + groupId: groupId + classifier: classifier + artifactId: artifactId + fileType: fileType + operationType: WORKLOAD + internetExposed: true + properties: + services: + additionalProperties: + $ref: '#/components/schemas/ServiceDto' + timeStamp: + description: ISO-8601 UTC date time at which the list of services was obtained + from service-metadata + type: string + required: + - services + - timeStamp + ServicePromotersDto: + example: + promoters: + - promoters + - promoters + properties: + promoters: + items: + type: string + type: array + required: + - promoters + ServiceSpecDto: + example: + providesApis: + - providesApis + - providesApis + system: system + dependsOn: + - dependsOn + - dependsOn + consumesApis: + - consumesApis + - consumesApis + properties: + system: + description: A reference to the system that the component belongs to + type: string + dependsOn: + description: A relation denoting a dependency on another entity + items: + type: string + type: array + providesApis: + description: "A relation with an API, provided by this entity" + items: + type: string + type: array + consumesApis: + description: "A relation with an API, consumed by this entity" + items: + type: string + type: array + PostPromote: + example: + binaries: + - versionPrefix: versionPrefix + groupId: groupId + classifier: classifier + artifactId: artifactId + fileType: fileType + - versionPrefix: versionPrefix + groupId: groupId + classifier: classifier + artifactId: artifactId + fileType: fileType + properties: + binaries: + items: + $ref: '#/components/schemas/Binary' + type: array + Binary: + description: Parameters to identify a binary in e.g. nexus + example: + versionPrefix: versionPrefix + groupId: groupId + classifier: classifier + artifactId: artifactId + fileType: fileType + properties: + groupId: + description: The group id of binary + type: string + artifactId: + description: The artifact id of binary + type: string + versionPrefix: + description: The version prefix of binary + type: string + classifier: + description: The classifier of binary + type: string + fileType: + description: The file type of binary e.g. tar.gz + type: string + required: + - artifactId + - groupId + - versionPrefix + Notification: + description: Schema of the Dto sent to all configured downstreams upon a change + of service. + properties: + name: + description: name of the service that was updated + type: string + event: + enum: + - CREATED + - MODIFIED + - DELETED + type: string + type: + enum: + - Owner + - Service + - Repository + type: string + payload: + $ref: '#/components/schemas/Notification_payload' + required: + - event + - name + - type + Quicklink: + allOf: + - $ref: '#/components/schemas/Link' + - properties: + description: + type: string + example: + url: /swagger-ui/index.html + title: SwaggerUI + description: Displays the frontend for the API. + Link: + description: 'A link ' + example: + title: title + url: url + properties: + url: + type: string + title: + type: string + RepositoryDto: + example: + owner: owner + timeStamp: timeStamp + jiraIssue: jiraIssue + configuration: + commitMessageRegex: commitMessageRegex + rawApprovers: + key: + - rawApprovers + - rawApprovers + approvers: + key: + - approvers + - approvers + watchers: + - watchers + - watchers + requireIssue: true + pullRequests: + allowRebaseMerging: true + allowMergeCommits: true + rawWatchers: + - rawWatchers + - rawWatchers + commitMessageType: DEFAULT + requireConditions: + key: + exemptions: + - exemptions + - exemptions + source: source + refMatcher: refMatcher + refProtections: + branches: + preventDeletion: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventPush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + requirePR: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventAllChanges: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventCreation: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventForcePush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + tags: + preventDeletion: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventAllChanges: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventCreation: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventForcePush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + requireSuccessfulBuilds: 0 + archived: true + accessKeys: + - data: data + permission: REPO_READ + key: key + - data: data + permission: REPO_READ + key: key + excludeMergeCommits: true + excludeMergeCheckUsers: + - name: name + - name: name + webhooks: + additional: + - configuration: + key: configuration + name: name + url: url + events: + - events + - events + - configuration: + key: configuration + name: name + url: url + events: + - events + - events + predefined: + - predefined + - predefined + defaultTasks: + - text: text + - text: text + unmanaged: true + branchNameRegex: branchNameRegex + mergeConfig: + strategies: + - id: no-ff + - id: no-ff + defaultStrategy: + id: no-ff + requireApprovals: 6 + actionsAccess: NOT_ACCESSIBLE + mainline: mainline + description: description + generator: generator + type: type + url: url + commitHash: commitHash + labels: + key: labels + properties: + type: + description: The type of the repository as determined by its key. + type: string + owner: + description: The alias of the repository owner + type: string + description: + type: string + url: + type: string + mainline: + type: string + generator: + description: the generator used for the initial contents of this repository + type: string + configuration: + $ref: '#/components/schemas/RepositoryConfigurationDto' + timeStamp: + description: "ISO-8601 UTC date time at which this information was originally\ + \ committed. When sending an update, include the original timestamp you\ + \ got so we can detect concurrent updates." + type: string + commitHash: + description: "The git commit hash this information was originally committed\ + \ under. When sending an update, include the original commitHash you got\ + \ so we can detect concurrent updates." + type: string + jiraIssue: + description: "The jira issue to use for committing a change, or the last\ + \ jira issue used." + type: string + labels: + additionalProperties: + type: string + description: A map of arbitrary string labels attached to this repository. + required: + - commitHash + - jiraIssue + - mainline + - owner + - timeStamp + - url + RepositoryCreateDto: + example: + owner: owner + jiraIssue: jiraIssue + configuration: + commitMessageRegex: commitMessageRegex + rawApprovers: + key: + - rawApprovers + - rawApprovers + approvers: + key: + - approvers + - approvers + watchers: + - watchers + - watchers + requireIssue: true + pullRequests: + allowRebaseMerging: true + allowMergeCommits: true + rawWatchers: + - rawWatchers + - rawWatchers + commitMessageType: DEFAULT + requireConditions: + key: + exemptions: + - exemptions + - exemptions + source: source + refMatcher: refMatcher + refProtections: + branches: + preventDeletion: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventPush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + requirePR: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventAllChanges: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventCreation: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventForcePush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + tags: + preventDeletion: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventAllChanges: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventCreation: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventForcePush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + requireSuccessfulBuilds: 0 + archived: true + accessKeys: + - data: data + permission: REPO_READ + key: key + - data: data + permission: REPO_READ + key: key + excludeMergeCommits: true + excludeMergeCheckUsers: + - name: name + - name: name + webhooks: + additional: + - configuration: + key: configuration + name: name + url: url + events: + - events + - events + - configuration: + key: configuration + name: name + url: url + events: + - events + - events + predefined: + - predefined + - predefined + defaultTasks: + - text: text + - text: text + unmanaged: true + branchNameRegex: branchNameRegex + mergeConfig: + strategies: + - id: no-ff + - id: no-ff + defaultStrategy: + id: no-ff + requireApprovals: 6 + actionsAccess: NOT_ACCESSIBLE + mainline: mainline + generator: generator + url: url + labels: + key: labels + properties: + owner: + description: The alias of the repository owner + type: string + url: + type: string + mainline: + type: string + generator: + description: the generator used for the initial contents of this repository + type: string + configuration: + $ref: '#/components/schemas/RepositoryConfigurationDto' + jiraIssue: + description: "The jira issue to use for committing a change, or the last\ + \ jira issue used." + type: string + labels: + additionalProperties: + type: string + description: A map of arbitrary string labels attached to this repository. + required: + - jiraIssue + - mainline + - owner + - url + RepositoryPatchDto: + example: + owner: owner + timeStamp: timeStamp + jiraIssue: jiraIssue + configuration: + commitMessageRegex: commitMessageRegex + approvers: + key: + - approvers + - approvers + watchers: + - watchers + - watchers + requireIssue: true + pullRequests: + allowRebaseMerging: true + allowMergeCommits: true + commitMessageType: DEFAULT + requireConditions: + key: + exemptions: + - exemptions + - exemptions + source: source + refMatcher: refMatcher + refProtections: + branches: + preventDeletion: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventPush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + requirePR: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventAllChanges: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventCreation: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventForcePush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + tags: + preventDeletion: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventAllChanges: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventCreation: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventForcePush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + requireSuccessfulBuilds: 0 + archived: true + accessKeys: + - data: data + permission: REPO_READ + key: key + - data: data + permission: REPO_READ + key: key + excludeMergeCommits: true + excludeMergeCheckUsers: + - name: name + - name: name + webhooks: + additional: + - configuration: + key: configuration + name: name + url: url + events: + - events + - events + - configuration: + key: configuration + name: name + url: url + events: + - events + - events + predefined: + - predefined + - predefined + defaultTasks: + - text: text + - text: text + unmanaged: true + branchNameRegex: branchNameRegex + mergeConfig: + strategies: + - id: no-ff + - id: no-ff + defaultStrategy: + id: no-ff + requireApprovals: 6 + actionsAccess: NOT_ACCESSIBLE + mainline: mainline + generator: generator + url: url + commitHash: commitHash + labels: + key: labels + properties: + owner: + description: The alias of the repository owner + type: string + url: + type: string + mainline: + type: string + generator: + description: the generator used for the initial contents of this repository + type: string + configuration: + $ref: '#/components/schemas/RepositoryConfigurationPatchDto' + timeStamp: + description: "ISO-8601 UTC date time at which this information was originally\ + \ committed. When sending an update, include the original timestamp you\ + \ got so we can detect concurrent updates." + type: string + commitHash: + description: "The git commit hash this information was originally committed\ + \ under. When sending an update, include the original commitHash you got\ + \ so we can detect concurrent updates." + type: string + jiraIssue: + description: "The jira issue to use for committing a change, or the last\ + \ jira issue used." + type: string + labels: + additionalProperties: + type: string + description: A map of arbitrary string labels attached to this repository. + required: + - commitHash + - jiraIssue + - timeStamp + RepositoryListDto: + example: + timeStamp: timeStamp + repositories: + key: + owner: owner + timeStamp: timeStamp + jiraIssue: jiraIssue + configuration: + commitMessageRegex: commitMessageRegex + rawApprovers: + key: + - rawApprovers + - rawApprovers + approvers: + key: + - approvers + - approvers + watchers: + - watchers + - watchers + requireIssue: true + pullRequests: + allowRebaseMerging: true + allowMergeCommits: true + rawWatchers: + - rawWatchers + - rawWatchers + commitMessageType: DEFAULT + requireConditions: + key: + exemptions: + - exemptions + - exemptions + source: source + refMatcher: refMatcher + refProtections: + branches: + preventDeletion: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventPush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + requirePR: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventAllChanges: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventCreation: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventForcePush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + tags: + preventDeletion: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventAllChanges: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventCreation: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventForcePush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + requireSuccessfulBuilds: 0 + archived: true + accessKeys: + - data: data + permission: REPO_READ + key: key + - data: data + permission: REPO_READ + key: key + excludeMergeCommits: true + excludeMergeCheckUsers: + - name: name + - name: name + webhooks: + additional: + - configuration: + key: configuration + name: name + url: url + events: + - events + - events + - configuration: + key: configuration + name: name + url: url + events: + - events + - events + predefined: + - predefined + - predefined + defaultTasks: + - text: text + - text: text + unmanaged: true + branchNameRegex: branchNameRegex + mergeConfig: + strategies: + - id: no-ff + - id: no-ff + defaultStrategy: + id: no-ff + requireApprovals: 6 + actionsAccess: NOT_ACCESSIBLE + mainline: mainline + description: description + generator: generator + type: type + url: url + commitHash: commitHash + labels: + key: labels + properties: + repositories: + additionalProperties: + $ref: '#/components/schemas/RepositoryDto' + timeStamp: + description: ISO-8601 UTC date time at which the list of repositories was + obtained from service-metadata + type: string + required: + - repositories + - timeStamp + DeletionDto: + example: + jiraIssue: jiraIssue + properties: + jiraIssue: + description: The jira issue to use for committing the deletion. + type: string + required: + - jiraIssue + RepositoryConfigurationDto: + description: Attributes to configure the repository. If a configuration exists + there are also some configured defaults for the repository. + example: + commitMessageRegex: commitMessageRegex + rawApprovers: + key: + - rawApprovers + - rawApprovers + approvers: + key: + - approvers + - approvers + watchers: + - watchers + - watchers + requireIssue: true + pullRequests: + allowRebaseMerging: true + allowMergeCommits: true + rawWatchers: + - rawWatchers + - rawWatchers + commitMessageType: DEFAULT + requireConditions: + key: + exemptions: + - exemptions + - exemptions + source: source + refMatcher: refMatcher + refProtections: + branches: + preventDeletion: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventPush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + requirePR: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventAllChanges: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventCreation: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventForcePush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + tags: + preventDeletion: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventAllChanges: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventCreation: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventForcePush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + requireSuccessfulBuilds: 0 + archived: true + accessKeys: + - data: data + permission: REPO_READ + key: key + - data: data + permission: REPO_READ + key: key + excludeMergeCommits: true + excludeMergeCheckUsers: + - name: name + - name: name + webhooks: + additional: + - configuration: + key: configuration + name: name + url: url + events: + - events + - events + - configuration: + key: configuration + name: name + url: url + events: + - events + - events + predefined: + - predefined + - predefined + defaultTasks: + - text: text + - text: text + unmanaged: true + branchNameRegex: branchNameRegex + mergeConfig: + strategies: + - id: no-ff + - id: no-ff + defaultStrategy: + id: no-ff + requireApprovals: 6 + actionsAccess: NOT_ACCESSIBLE + properties: + accessKeys: + description: Ssh-Keys configured on the repository. + items: + $ref: '#/components/schemas/RepositoryConfigurationAccessKeyDto' + type: array + mergeConfig: + $ref: '#/components/schemas/RepositoryConfigurationDto_mergeConfig' + defaultTasks: + items: + $ref: '#/components/schemas/RepositoryConfigurationDefaultTaskDto' + type: array + branchNameRegex: + description: Use an explicit branch name regex. + type: string + commitMessageRegex: + description: Use an explicit commit message regex. + type: string + commitMessageType: + description: Adds a corresponding commit message regex. + enum: + - DEFAULT + - SEMANTIC + - SNOW_AND_INCIDENTS + type: string + requireSuccessfulBuilds: + description: Set the required successful builds counter. + type: integer + requireApprovals: + description: Set the required approvals counter. + type: integer + excludeMergeCommits: + description: Exclude merge commits from commit checks. + type: boolean + excludeMergeCheckUsers: + description: Exclude users from commit checks. + items: + $ref: '#/components/schemas/ExcludeMergeCheckUserDto' + type: array + webhooks: + $ref: '#/components/schemas/RepositoryConfigurationWebhooksDto' + approvers: + additionalProperties: + items: + type: string + description: "Map of string (group name e.g. some-owner) of strings (list\ + \ of approvers), one approval for each group is required." + rawApprovers: + additionalProperties: + items: + type: string + description: Raw data of approvers + watchers: + description: "List of strings (list of watchers, either usernames or group\ + \ identifier), which are added as reviewers but require no approval." + items: + type: string + type: array + rawWatchers: + description: Raw data of watchers + items: + type: string + type: array + archived: + description: Moves the repository into the archive. + type: boolean + unmanaged: + description: "Repository will not be configured, also not archived." + type: boolean + refProtections: + $ref: '#/components/schemas/RefProtections' + pullRequests: + $ref: '#/components/schemas/PullRequests' + requireIssue: + description: "Configures JQL matcher with query: issuetype in (Story, Bug)\ + \ AND 'Risk Level' is not EMPTY" + type: boolean + requireConditions: + additionalProperties: + $ref: '#/components/schemas/ConditionReferenceDto' + description: Configuration of conditional builds as map of structs (key + name e.g. some-key) of target references. + actionsAccess: + description: Control how the repository is used by GitHub Actions workflows + in other repositories + enum: + - NONE + - ORGANIZATION + - ENTERPRISE + example: NOT_ACCESSIBLE + type: string + RepositoryConfigurationPatchDto: + description: Attributes to configure the repository. If a configuration exists + there are also some configured defaults for the repository. + example: + commitMessageRegex: commitMessageRegex + approvers: + key: + - approvers + - approvers + watchers: + - watchers + - watchers + requireIssue: true + pullRequests: + allowRebaseMerging: true + allowMergeCommits: true + commitMessageType: DEFAULT + requireConditions: + key: + exemptions: + - exemptions + - exemptions + source: source + refMatcher: refMatcher + refProtections: + branches: + preventDeletion: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventPush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + requirePR: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventAllChanges: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventCreation: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventForcePush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + tags: + preventDeletion: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventAllChanges: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventCreation: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventForcePush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + requireSuccessfulBuilds: 0 + archived: true + accessKeys: + - data: data + permission: REPO_READ + key: key + - data: data + permission: REPO_READ + key: key + excludeMergeCommits: true + excludeMergeCheckUsers: + - name: name + - name: name + webhooks: + additional: + - configuration: + key: configuration + name: name + url: url + events: + - events + - events + - configuration: + key: configuration + name: name + url: url + events: + - events + - events + predefined: + - predefined + - predefined + defaultTasks: + - text: text + - text: text + unmanaged: true + branchNameRegex: branchNameRegex + mergeConfig: + strategies: + - id: no-ff + - id: no-ff + defaultStrategy: + id: no-ff + requireApprovals: 6 + actionsAccess: NOT_ACCESSIBLE + properties: + accessKeys: + description: Ssh-Keys configured on the repository. + items: + $ref: '#/components/schemas/RepositoryConfigurationAccessKeyDto' + type: array + mergeConfig: + $ref: '#/components/schemas/RepositoryConfigurationDto_mergeConfig' + defaultTasks: + items: + $ref: '#/components/schemas/RepositoryConfigurationDefaultTaskDto' + type: array + branchNameRegex: + description: Use an explicit branch name regex. + type: string + commitMessageRegex: + description: Use an explicit commit message regex. + type: string + commitMessageType: + description: Adds a corresponding commit message regex. + enum: + - DEFAULT + - SEMANTIC + - SNOW_AND_INCIDENTS + type: string + requireSuccessfulBuilds: + description: Set the required successful builds counter. + type: integer + requireApprovals: + description: Set the required approvals counter. + type: integer + excludeMergeCommits: + description: Exclude merge commits from commit checks. + type: boolean + excludeMergeCheckUsers: + description: Exclude users from commit checks. + items: + $ref: '#/components/schemas/ExcludeMergeCheckUserDto' + type: array + webhooks: + $ref: '#/components/schemas/RepositoryConfigurationWebhooksDto' + approvers: + additionalProperties: + items: + type: string + description: "Map of string (group name e.g. some-owner) of strings (list\ + \ of approvers), one approval for each group is required." + watchers: + description: "List of strings (list of watchers, either usernames or group\ + \ identifier), which are added as reviewers but require no approval." + items: + type: string + type: array + archived: + description: Moves the repository into the archive. + type: boolean + unmanaged: + description: "Repository will not be configured, also not archived." + type: boolean + refProtections: + $ref: '#/components/schemas/RefProtections' + requireIssue: + description: "Configures JQL matcher with query: issuetype in (Story, Bug)\ + \ AND 'Risk Level' is not EMPTY" + type: boolean + requireConditions: + additionalProperties: + $ref: '#/components/schemas/ConditionReferenceDto' + description: Configuration of conditional builds as map of structs (key + name e.g. some-key) of target references. + actionsAccess: + description: Control how the repository is used by GitHub Actions workflows + in other repositories + enum: + - NONE + - ORGANIZATION + - ENTERPRISE + example: NOT_ACCESSIBLE + type: string + pullRequests: + $ref: '#/components/schemas/PullRequests' + MergeStrategy: + additionalProperties: false + example: + id: no-ff + properties: + id: + enum: + - no-ff + - ff + - ff-only + - squash + - squash-ff-only + - rebase-no-ff + - rebase-ff-only + type: string + required: + - id + title: Strategy + RepositoryConfigurationAccessKeyDto: + example: + data: data + permission: REPO_READ + key: key + properties: + key: + type: string + data: + type: string + permission: + enum: + - REPO_READ + - REPO_WRITE + type: string + RepositoryConfigurationDefaultTaskDto: + example: + text: text + properties: + text: + type: string + required: + - text + ConditionReferenceDto: + description: Configuration of conditional build references. + example: + exemptions: + - exemptions + - exemptions + source: source + refMatcher: refMatcher + properties: + refMatcher: + description: Reference of a branch. + type: string + exemptions: + description: list of users or groups for which this protection does not + apply. + items: + description: A user or group. Groups are denoted by @.. + type: string + type: array + source: + description: The expected source for the required conditional build. + type: string + required: + - refMatcher + ExcludeMergeCheckUserDto: + example: + name: name + properties: + name: + description: Name of merge check exclude user + type: string + required: + - name + RepositoryConfigurationWebhooksDto: + description: Webhooks configured to the repository. + example: + additional: + - configuration: + key: configuration + name: name + url: url + events: + - events + - events + - configuration: + key: configuration + name: name + url: url + events: + - events + - events + predefined: + - predefined + - predefined + properties: + predefined: + description: List of predefined webhooks + items: + type: string + type: array + additional: + description: Additional webhooks to be configured. + items: + $ref: '#/components/schemas/RepositoryConfigurationWebhookDto' + type: array + RepositoryConfigurationWebhookDto: + example: + configuration: + key: configuration + name: name + url: url + events: + - events + - events + properties: + name: + type: string + url: + type: string + events: + description: Events the webhook should be triggered with. + items: + type: string + type: array + configuration: + additionalProperties: + type: string + required: + - name + - url + PullRequests: + description: Configures pull request settings + example: + allowRebaseMerging: true + allowMergeCommits: true + properties: + allowMergeCommits: + default: true + description: Allows merge commits on pull requests + type: boolean + allowRebaseMerging: + default: true + description: Allows rebase merging on pull requests + type: boolean + RefProtections: + description: Configures available protections for git refs + example: + branches: + preventDeletion: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventPush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + requirePR: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventAllChanges: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventCreation: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventForcePush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + tags: + preventDeletion: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventAllChanges: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventCreation: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventForcePush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + properties: + branches: + $ref: '#/components/schemas/RefProtections_branches' + tags: + $ref: '#/components/schemas/RefProtections_tags' + ProtectedRef: + example: + exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + properties: + pattern: + description: "fnmatch pattern to define protected refs. Must not start with\ + \ refs/heads/ or refs/tags/. Special value :MAINLINE: matches the currently\ + \ configured mainline for branch protections." + pattern: ^(?!refs\/(heads|tags)\/).*$ + type: string + exemptions: + description: list of users or groups for which this protection does not + apply. + items: + description: A user or a group identifier. Groups are identified by @.. + Group identifiers will be resolved for this field during read operations. + type: string + type: array + exemptionsRoles: + description: list of group identifiers for which this protection does not + apply. This field is read-only and will be filled automatically from the + exemptions fields. + items: + description: A group identifier. Groups are identified by @.. + type: string + type: array + required: + - pattern + ErrorDto: + example: + details: details + message: message + timestamp: 2000-01-23T04:56:07.000+00:00 + properties: + details: + type: string + message: + type: string + timestamp: + format: date-time + type: string + HealthComponent: + example: + description: description + status: status + properties: + description: + type: string + status: + type: string + Notification_payload: + maxProperties: 1 + minProperties: 1 + properties: + Owner: + $ref: '#/components/schemas/OwnerDto' + Service: + $ref: '#/components/schemas/ServiceDto' + Repository: + $ref: '#/components/schemas/RepositoryDto' + RepositoryConfigurationDto_mergeConfig: + example: + strategies: + - id: no-ff + - id: no-ff + defaultStrategy: + id: no-ff + properties: + defaultStrategy: + $ref: '#/components/schemas/MergeStrategy' + strategies: + items: + $ref: '#/components/schemas/MergeStrategy' + type: array + RefProtections_branches: + example: + preventDeletion: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventPush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + requirePR: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventAllChanges: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventCreation: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventForcePush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + properties: + requirePR: + description: Forces creating a PR to update the protected refs. + items: + $ref: '#/components/schemas/ProtectedRef' + type: array + preventAllChanges: + description: Prevents all changes of the protected refs. + items: + $ref: '#/components/schemas/ProtectedRef' + type: array + preventCreation: + description: Prevents creation of the protected refs. + items: + $ref: '#/components/schemas/ProtectedRef' + type: array + preventDeletion: + description: Prevents deletion of the protected refs. + items: + $ref: '#/components/schemas/ProtectedRef' + type: array + preventPush: + description: Prevents pushes to the protected refs. + items: + $ref: '#/components/schemas/ProtectedRef' + type: array + preventForcePush: + description: Prevents force pushes to the protected refs for users with + push permission. + items: + $ref: '#/components/schemas/ProtectedRef' + type: array + RefProtections_tags: + example: + preventDeletion: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventAllChanges: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventCreation: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + preventForcePush: + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + - exemptions: + - exemptions + - exemptions + pattern: pattern + exemptionsRoles: + - exemptionsRoles + - exemptionsRoles + properties: + preventAllChanges: + description: Prevents all changes of the protected refs. + items: + $ref: '#/components/schemas/ProtectedRef' + type: array + preventCreation: + description: Prevents creation of the protected refs. + items: + $ref: '#/components/schemas/ProtectedRef' + type: array + preventDeletion: + description: Prevents deletion of the protected refs. + items: + $ref: '#/components/schemas/ProtectedRef' + type: array + preventForcePush: + description: Prevents force pushes to the protected refs for users with + push permission. + items: + $ref: '#/components/schemas/ProtectedRef' + type: array + securitySchemes: + bearerAuth: + bearerFormat: JWT + scheme: bearer + type: http + basicAuth: + scheme: basic + type: http diff --git a/api_management.go b/api_management.go new file mode 100644 index 0000000..62d813e --- /dev/null +++ b/api_management.go @@ -0,0 +1,238 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// ManagementAPIService ManagementAPI service +type ManagementAPIService service + +type ApiGetHealthRequest struct { + ctx context.Context + ApiService *ManagementAPIService +} + +func (r ApiGetHealthRequest) Execute() (*HealthComponent, *http.Response, error) { + return r.ApiService.GetHealthExecute(r) +} + +/* +GetHealth Method for GetHealth + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetHealthRequest +*/ +func (a *ManagementAPIService) GetHealth(ctx context.Context) ApiGetHealthRequest { + return ApiGetHealthRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return HealthComponent +func (a *ManagementAPIService) GetHealthExecute(r ApiGetHealthRequest) (*HealthComponent, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HealthComponent + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ManagementAPIService.GetHealth") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/health" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetHealth1Request struct { + ctx context.Context + ApiService *ManagementAPIService +} + +func (r ApiGetHealth1Request) Execute() (*HealthComponent, *http.Response, error) { + return r.ApiService.GetHealth1Execute(r) +} + +/* +GetHealth1 Method for GetHealth1 + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetHealth1Request +*/ +func (a *ManagementAPIService) GetHealth1(ctx context.Context) ApiGetHealth1Request { + return ApiGetHealth1Request{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return HealthComponent +func (a *ManagementAPIService) GetHealth1Execute(r ApiGetHealth1Request) (*HealthComponent, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HealthComponent + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ManagementAPIService.GetHealth1") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/management/health" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_rest_api_v1_owners.go b/api_rest_api_v1_owners.go new file mode 100644 index 0000000..ac4a2a9 --- /dev/null +++ b/api_rest_api_v1_owners.go @@ -0,0 +1,996 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// RestApiV1OwnersAPIService RestApiV1OwnersAPI service +type RestApiV1OwnersAPIService service + +type ApiCreateOwnerRequest struct { + ctx context.Context + ApiService *RestApiV1OwnersAPIService + owner string + ownerCreateDto *OwnerCreateDto +} + +func (r ApiCreateOwnerRequest) OwnerCreateDto(ownerCreateDto OwnerCreateDto) ApiCreateOwnerRequest { + r.ownerCreateDto = &ownerCreateDto + return r +} + +func (r ApiCreateOwnerRequest) Execute() (*OwnerDto, *http.Response, error) { + return r.ApiService.CreateOwnerExecute(r) +} + +/* +CreateOwner create a new owner with a given alias + +Create a new owner. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param owner + @return ApiCreateOwnerRequest +*/ +func (a *RestApiV1OwnersAPIService) CreateOwner(ctx context.Context, owner string) ApiCreateOwnerRequest { + return ApiCreateOwnerRequest{ + ApiService: a, + ctx: ctx, + owner: owner, + } +} + +// Execute executes the request +// @return OwnerDto +func (a *RestApiV1OwnersAPIService) CreateOwnerExecute(r ApiCreateOwnerRequest) (*OwnerDto, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OwnerDto + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RestApiV1OwnersAPIService.CreateOwner") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rest/api/v1/owners/{owner}" + localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", url.PathEscape(parameterValueToString(r.owner, "owner")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ownerCreateDto == nil { + return localVarReturnValue, nil, reportError("ownerCreateDto is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ownerCreateDto + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v OwnerDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 502 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteOwnerRequest struct { + ctx context.Context + ApiService *RestApiV1OwnersAPIService + owner string + deletionDto *DeletionDto +} + +func (r ApiDeleteOwnerRequest) DeletionDto(deletionDto DeletionDto) ApiDeleteOwnerRequest { + r.deletionDto = &deletionDto + return r +} + +func (r ApiDeleteOwnerRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteOwnerExecute(r) +} + +/* +DeleteOwner delete the owner with a given alias + +Delete an owner - cannot have any services or repositories left + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param owner + @return ApiDeleteOwnerRequest +*/ +func (a *RestApiV1OwnersAPIService) DeleteOwner(ctx context.Context, owner string) ApiDeleteOwnerRequest { + return ApiDeleteOwnerRequest{ + ApiService: a, + ctx: ctx, + owner: owner, + } +} + +// Execute executes the request +func (a *RestApiV1OwnersAPIService) DeleteOwnerExecute(r ApiDeleteOwnerRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RestApiV1OwnersAPIService.DeleteOwner") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rest/api/v1/owners/{owner}" + localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", url.PathEscape(parameterValueToString(r.owner, "owner")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.deletionDto == nil { + return nil, reportError("deletionDto is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.deletionDto + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 502 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetOwnerRequest struct { + ctx context.Context + ApiService *RestApiV1OwnersAPIService + owner string +} + +func (r ApiGetOwnerRequest) Execute() (*OwnerDto, *http.Response, error) { + return r.ApiService.GetOwnerExecute(r) +} + +/* +GetOwner get a single owner by alias + +Obtains owner information for a single owner. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param owner + @return ApiGetOwnerRequest +*/ +func (a *RestApiV1OwnersAPIService) GetOwner(ctx context.Context, owner string) ApiGetOwnerRequest { + return ApiGetOwnerRequest{ + ApiService: a, + ctx: ctx, + owner: owner, + } +} + +// Execute executes the request +// @return OwnerDto +func (a *RestApiV1OwnersAPIService) GetOwnerExecute(r ApiGetOwnerRequest) (*OwnerDto, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OwnerDto + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RestApiV1OwnersAPIService.GetOwner") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rest/api/v1/owners/{owner}" + localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", url.PathEscape(parameterValueToString(r.owner, "owner")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetOwnersRequest struct { + ctx context.Context + ApiService *RestApiV1OwnersAPIService +} + +func (r ApiGetOwnersRequest) Execute() (*OwnerListDto, *http.Response, error) { + return r.ApiService.GetOwnersExecute(r) +} + +/* +GetOwners get owners + +Obtains all owners. Currently, no filtering is available. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetOwnersRequest +*/ +func (a *RestApiV1OwnersAPIService) GetOwners(ctx context.Context) ApiGetOwnersRequest { + return ApiGetOwnersRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OwnerListDto +func (a *RestApiV1OwnersAPIService) GetOwnersExecute(r ApiGetOwnersRequest) (*OwnerListDto, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OwnerListDto + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RestApiV1OwnersAPIService.GetOwners") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rest/api/v1/owners" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPatchOwnerRequest struct { + ctx context.Context + ApiService *RestApiV1OwnersAPIService + owner string + ownerPatchDto *OwnerPatchDto +} + +func (r ApiPatchOwnerRequest) OwnerPatchDto(ownerPatchDto OwnerPatchDto) ApiPatchOwnerRequest { + r.ownerPatchDto = &ownerPatchDto + return r +} + +func (r ApiPatchOwnerRequest) Execute() (*OwnerDto, *http.Response, error) { + return r.ApiService.PatchOwnerExecute(r) +} + +/* +PatchOwner patch an existing owner with a given alias + +Patch an owner. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param owner + @return ApiPatchOwnerRequest +*/ +func (a *RestApiV1OwnersAPIService) PatchOwner(ctx context.Context, owner string) ApiPatchOwnerRequest { + return ApiPatchOwnerRequest{ + ApiService: a, + ctx: ctx, + owner: owner, + } +} + +// Execute executes the request +// @return OwnerDto +func (a *RestApiV1OwnersAPIService) PatchOwnerExecute(r ApiPatchOwnerRequest) (*OwnerDto, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OwnerDto + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RestApiV1OwnersAPIService.PatchOwner") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rest/api/v1/owners/{owner}" + localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", url.PathEscape(parameterValueToString(r.owner, "owner")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ownerPatchDto == nil { + return localVarReturnValue, nil, reportError("ownerPatchDto is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ownerPatchDto + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v OwnerDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 502 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateOwnerRequest struct { + ctx context.Context + ApiService *RestApiV1OwnersAPIService + owner string + ownerDto *OwnerDto +} + +func (r ApiUpdateOwnerRequest) OwnerDto(ownerDto OwnerDto) ApiUpdateOwnerRequest { + r.ownerDto = &ownerDto + return r +} + +func (r ApiUpdateOwnerRequest) Execute() (*OwnerDto, *http.Response, error) { + return r.ApiService.UpdateOwnerExecute(r) +} + +/* +UpdateOwner update an existing owner with a given alias + +Update an owner. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param owner + @return ApiUpdateOwnerRequest +*/ +func (a *RestApiV1OwnersAPIService) UpdateOwner(ctx context.Context, owner string) ApiUpdateOwnerRequest { + return ApiUpdateOwnerRequest{ + ApiService: a, + ctx: ctx, + owner: owner, + } +} + +// Execute executes the request +// @return OwnerDto +func (a *RestApiV1OwnersAPIService) UpdateOwnerExecute(r ApiUpdateOwnerRequest) (*OwnerDto, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OwnerDto + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RestApiV1OwnersAPIService.UpdateOwner") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rest/api/v1/owners/{owner}" + localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", url.PathEscape(parameterValueToString(r.owner, "owner")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.ownerDto == nil { + return localVarReturnValue, nil, reportError("ownerDto is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.ownerDto + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v OwnerDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 502 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_rest_api_v1_repositories.go b/api_rest_api_v1_repositories.go new file mode 100644 index 0000000..6d14d15 --- /dev/null +++ b/api_rest_api_v1_repositories.go @@ -0,0 +1,1044 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// RestApiV1RepositoriesAPIService RestApiV1RepositoriesAPI service +type RestApiV1RepositoriesAPIService service + +type ApiGetRepositoriesOfOwnerRequest struct { + ctx context.Context + ApiService *RestApiV1RepositoriesAPIService + url *string + owner *string + service *string + name *string + type_ *string +} + +// Optional - allows filtering the output by repository url. Must match `^[a-z](-?:?@?.?/?[a-z0-9]+)*$`. +func (r ApiGetRepositoriesOfOwnerRequest) Url(url string) ApiGetRepositoriesOfOwnerRequest { + r.url = &url + return r +} + +// Optional - the alias of an owner. If present, only repositories with this owner are returned. Must match `^[a-z](-?[a-z0-9]+)*$`. +func (r ApiGetRepositoriesOfOwnerRequest) Owner(owner string) ApiGetRepositoriesOfOwnerRequest { + r.owner = &owner + return r +} + +// Optional - the name of a service. If present, only repositories referenced by the given service are returned. Must match `^[a-z](-?[a-z0-9]+)*$`. +func (r ApiGetRepositoriesOfOwnerRequest) Service(service string) ApiGetRepositoriesOfOwnerRequest { + r.service = &service + return r +} + +// Optional - allows filtering the output by repository name (the first part of the key before the .). Must match `^[a-z](-?[a-z0-9]+)*$`. +func (r ApiGetRepositoriesOfOwnerRequest) Name(name string) ApiGetRepositoriesOfOwnerRequest { + r.name = &name + return r +} + +// Optional - allows filtering the output by repository type (the second part of the key after the .). Must currently be one of api, helm-chart, helm-deployment, implementation, terraform-module, javascript-module. +func (r ApiGetRepositoriesOfOwnerRequest) Type_(type_ string) ApiGetRepositoriesOfOwnerRequest { + r.type_ = &type_ + return r +} + +func (r ApiGetRepositoriesOfOwnerRequest) Execute() (*RepositoryListDto, *http.Response, error) { + return r.ApiService.GetRepositoriesOfOwnerExecute(r) +} + +/* +GetRepositoriesOfOwner get repositories + +Obtain a list of repositories, potentially filtered by owner alias or service name + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetRepositoriesOfOwnerRequest +*/ +func (a *RestApiV1RepositoriesAPIService) GetRepositoriesOfOwner(ctx context.Context) ApiGetRepositoriesOfOwnerRequest { + return ApiGetRepositoriesOfOwnerRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return RepositoryListDto +func (a *RestApiV1RepositoriesAPIService) GetRepositoriesOfOwnerExecute(r ApiGetRepositoriesOfOwnerRequest) (*RepositoryListDto, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RepositoryListDto + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RestApiV1RepositoriesAPIService.GetRepositoriesOfOwner") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rest/api/v1/repositories" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.url != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "url", r.url, "form", "") + } + if r.owner != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "owner", r.owner, "form", "") + } + if r.service != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "service", r.service, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.type_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetRepositoryRequest struct { + ctx context.Context + ApiService *RestApiV1RepositoriesAPIService + repository string +} + +func (r ApiGetRepositoryRequest) Execute() (*RepositoryDto, *http.Response, error) { + return r.ApiService.GetRepositoryExecute(r) +} + +/* +GetRepository get a single repository by key + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository + @return ApiGetRepositoryRequest +*/ +func (a *RestApiV1RepositoriesAPIService) GetRepository(ctx context.Context, repository string) ApiGetRepositoryRequest { + return ApiGetRepositoryRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +// @return RepositoryDto +func (a *RestApiV1RepositoriesAPIService) GetRepositoryExecute(r ApiGetRepositoryRequest) (*RepositoryDto, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RepositoryDto + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RestApiV1RepositoriesAPIService.GetRepository") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rest/api/v1/repositories/{repository}" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPatchRepositoryRequest struct { + ctx context.Context + ApiService *RestApiV1RepositoriesAPIService + repository string + repositoryPatchDto *RepositoryPatchDto +} + +func (r ApiPatchRepositoryRequest) RepositoryPatchDto(repositoryPatchDto RepositoryPatchDto) ApiPatchRepositoryRequest { + r.repositoryPatchDto = &repositoryPatchDto + return r +} + +func (r ApiPatchRepositoryRequest) Execute() (*RepositoryDto, *http.Response, error) { + return r.ApiService.PatchRepositoryExecute(r) +} + +/* +PatchRepository patch an existing repository with the given key + +Patch a repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository + @return ApiPatchRepositoryRequest +*/ +func (a *RestApiV1RepositoriesAPIService) PatchRepository(ctx context.Context, repository string) ApiPatchRepositoryRequest { + return ApiPatchRepositoryRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +// @return RepositoryDto +func (a *RestApiV1RepositoriesAPIService) PatchRepositoryExecute(r ApiPatchRepositoryRequest) (*RepositoryDto, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RepositoryDto + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RestApiV1RepositoriesAPIService.PatchRepository") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rest/api/v1/repositories/{repository}" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repositoryPatchDto == nil { + return localVarReturnValue, nil, reportError("repositoryPatchDto is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repositoryPatchDto + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v RepositoryDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 502 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRegisterRepositoryRequest struct { + ctx context.Context + ApiService *RestApiV1RepositoriesAPIService + repository string + repositoryCreateDto *RepositoryCreateDto +} + +func (r ApiRegisterRepositoryRequest) RepositoryCreateDto(repositoryCreateDto RepositoryCreateDto) ApiRegisterRepositoryRequest { + r.repositoryCreateDto = &repositoryCreateDto + return r +} + +func (r ApiRegisterRepositoryRequest) Execute() (*RepositoryDto, *http.Response, error) { + return r.ApiService.RegisterRepositoryExecute(r) +} + +/* +RegisterRepository register a new repository with the given key + +Register a new repository in the metadata. Note that this does not actually create it. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository + @return ApiRegisterRepositoryRequest +*/ +func (a *RestApiV1RepositoriesAPIService) RegisterRepository(ctx context.Context, repository string) ApiRegisterRepositoryRequest { + return ApiRegisterRepositoryRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +// @return RepositoryDto +func (a *RestApiV1RepositoriesAPIService) RegisterRepositoryExecute(r ApiRegisterRepositoryRequest) (*RepositoryDto, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RepositoryDto + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RestApiV1RepositoriesAPIService.RegisterRepository") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rest/api/v1/repositories/{repository}" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repositoryCreateDto == nil { + return localVarReturnValue, nil, reportError("repositoryCreateDto is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repositoryCreateDto + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v RepositoryDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 502 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRemoveRepositoryRequest struct { + ctx context.Context + ApiService *RestApiV1RepositoriesAPIService + repository string + deletionDto *DeletionDto +} + +func (r ApiRemoveRepositoryRequest) DeletionDto(deletionDto DeletionDto) ApiRemoveRepositoryRequest { + r.deletionDto = &deletionDto + return r +} + +func (r ApiRemoveRepositoryRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveRepositoryExecute(r) +} + +/* +RemoveRepository remove the repository with the given key + +Delete a repository from metadata. Will not delete the actual repository, just the metadata. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository + @return ApiRemoveRepositoryRequest +*/ +func (a *RestApiV1RepositoriesAPIService) RemoveRepository(ctx context.Context, repository string) ApiRemoveRepositoryRequest { + return ApiRemoveRepositoryRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +func (a *RestApiV1RepositoriesAPIService) RemoveRepositoryExecute(r ApiRemoveRepositoryRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RestApiV1RepositoriesAPIService.RemoveRepository") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rest/api/v1/repositories/{repository}" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.deletionDto == nil { + return nil, reportError("deletionDto is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.deletionDto + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 502 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiUpdateRepositoryRequest struct { + ctx context.Context + ApiService *RestApiV1RepositoriesAPIService + repository string + repositoryDto *RepositoryDto +} + +func (r ApiUpdateRepositoryRequest) RepositoryDto(repositoryDto RepositoryDto) ApiUpdateRepositoryRequest { + r.repositoryDto = &repositoryDto + return r +} + +func (r ApiUpdateRepositoryRequest) Execute() (*RepositoryDto, *http.Response, error) { + return r.ApiService.UpdateRepositoryExecute(r) +} + +/* +UpdateRepository update an existing repository with the given key + +Update a repository + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository + @return ApiUpdateRepositoryRequest +*/ +func (a *RestApiV1RepositoriesAPIService) UpdateRepository(ctx context.Context, repository string) ApiUpdateRepositoryRequest { + return ApiUpdateRepositoryRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +// @return RepositoryDto +func (a *RestApiV1RepositoriesAPIService) UpdateRepositoryExecute(r ApiUpdateRepositoryRequest) (*RepositoryDto, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RepositoryDto + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RestApiV1RepositoriesAPIService.UpdateRepository") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rest/api/v1/repositories/{repository}" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.repositoryDto == nil { + return localVarReturnValue, nil, reportError("repositoryDto is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.repositoryDto + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v RepositoryDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 502 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_rest_api_v1_services.go b/api_rest_api_v1_services.go new file mode 100644 index 0000000..87d3eaa --- /dev/null +++ b/api_rest_api_v1_services.go @@ -0,0 +1,1137 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// RestApiV1ServicesAPIService RestApiV1ServicesAPI service +type RestApiV1ServicesAPIService service + +type ApiDeleteServiceRequest struct { + ctx context.Context + ApiService *RestApiV1ServicesAPIService + service string + deletionDto *DeletionDto +} + +func (r ApiDeleteServiceRequest) DeletionDto(deletionDto DeletionDto) ApiDeleteServiceRequest { + r.deletionDto = &deletionDto + return r +} + +func (r ApiDeleteServiceRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteServiceExecute(r) +} + +/* +DeleteService delete the service with a given name + +Delete a service. Will not delete associated repositories from metadata. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param service The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`. + @return ApiDeleteServiceRequest +*/ +func (a *RestApiV1ServicesAPIService) DeleteService(ctx context.Context, service string) ApiDeleteServiceRequest { + return ApiDeleteServiceRequest{ + ApiService: a, + ctx: ctx, + service: service, + } +} + +// Execute executes the request +func (a *RestApiV1ServicesAPIService) DeleteServiceExecute(r ApiDeleteServiceRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RestApiV1ServicesAPIService.DeleteService") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rest/api/v1/services/{service}" + localVarPath = strings.Replace(localVarPath, "{"+"service"+"}", url.PathEscape(parameterValueToString(r.service, "service")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.deletionDto == nil { + return nil, reportError("deletionDto is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.deletionDto + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 502 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetServiceRequest struct { + ctx context.Context + ApiService *RestApiV1ServicesAPIService + service string +} + +func (r ApiGetServiceRequest) Execute() (*ServiceDto, *http.Response, error) { + return r.ApiService.GetServiceExecute(r) +} + +/* +GetService get a single service by name + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param service The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`. + @return ApiGetServiceRequest +*/ +func (a *RestApiV1ServicesAPIService) GetService(ctx context.Context, service string) ApiGetServiceRequest { + return ApiGetServiceRequest{ + ApiService: a, + ctx: ctx, + service: service, + } +} + +// Execute executes the request +// @return ServiceDto +func (a *RestApiV1ServicesAPIService) GetServiceExecute(r ApiGetServiceRequest) (*ServiceDto, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ServiceDto + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RestApiV1ServicesAPIService.GetService") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rest/api/v1/services/{service}" + localVarPath = strings.Replace(localVarPath, "{"+"service"+"}", url.PathEscape(parameterValueToString(r.service, "service")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetServicePromotersRequest struct { + ctx context.Context + ApiService *RestApiV1ServicesAPIService + service string +} + +func (r ApiGetServicePromotersRequest) Execute() (*ServicePromotersDto, *http.Response, error) { + return r.ApiService.GetServicePromotersExecute(r) +} + +/* +GetServicePromoters get all users who may promote a service + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param service The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`. + @return ApiGetServicePromotersRequest +*/ +func (a *RestApiV1ServicesAPIService) GetServicePromoters(ctx context.Context, service string) ApiGetServicePromotersRequest { + return ApiGetServicePromotersRequest{ + ApiService: a, + ctx: ctx, + service: service, + } +} + +// Execute executes the request +// @return ServicePromotersDto +func (a *RestApiV1ServicesAPIService) GetServicePromotersExecute(r ApiGetServicePromotersRequest) (*ServicePromotersDto, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ServicePromotersDto + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RestApiV1ServicesAPIService.GetServicePromoters") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rest/api/v1/services/{service}/promoters" + localVarPath = strings.Replace(localVarPath, "{"+"service"+"}", url.PathEscape(parameterValueToString(r.service, "service")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetServicesRequest struct { + ctx context.Context + ApiService *RestApiV1ServicesAPIService + owner *string +} + +// Allows filtering the output by owner alias. Valid aliases match `^[a-z](-?[a-z0-9]+)*$`. +func (r ApiGetServicesRequest) Owner(owner string) ApiGetServicesRequest { + r.owner = &owner + return r +} + +func (r ApiGetServicesRequest) Execute() (*ServiceListDto, *http.Response, error) { + return r.ApiService.GetServicesExecute(r) +} + +/* +GetServices get services + +Obtains the list of services, possibly filtered by an owner alias. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetServicesRequest +*/ +func (a *RestApiV1ServicesAPIService) GetServices(ctx context.Context) ApiGetServicesRequest { + return ApiGetServicesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ServiceListDto +func (a *RestApiV1ServicesAPIService) GetServicesExecute(r ApiGetServicesRequest) (*ServiceListDto, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ServiceListDto + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RestApiV1ServicesAPIService.GetServices") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rest/api/v1/services" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.owner != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "owner", r.owner, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPatchServiceRequest struct { + ctx context.Context + ApiService *RestApiV1ServicesAPIService + service string + servicePatchDto *ServicePatchDto +} + +func (r ApiPatchServiceRequest) ServicePatchDto(servicePatchDto ServicePatchDto) ApiPatchServiceRequest { + r.servicePatchDto = &servicePatchDto + return r +} + +func (r ApiPatchServiceRequest) Execute() (*ServiceDto, *http.Response, error) { + return r.ApiService.PatchServiceExecute(r) +} + +/* +PatchService patch an existing service with the given name + +Patch a service. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param service The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`. + @return ApiPatchServiceRequest +*/ +func (a *RestApiV1ServicesAPIService) PatchService(ctx context.Context, service string) ApiPatchServiceRequest { + return ApiPatchServiceRequest{ + ApiService: a, + ctx: ctx, + service: service, + } +} + +// Execute executes the request +// @return ServiceDto +func (a *RestApiV1ServicesAPIService) PatchServiceExecute(r ApiPatchServiceRequest) (*ServiceDto, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ServiceDto + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RestApiV1ServicesAPIService.PatchService") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rest/api/v1/services/{service}" + localVarPath = strings.Replace(localVarPath, "{"+"service"+"}", url.PathEscape(parameterValueToString(r.service, "service")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.servicePatchDto == nil { + return localVarReturnValue, nil, reportError("servicePatchDto is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.servicePatchDto + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ServiceDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 502 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRegisterServiceRequest struct { + ctx context.Context + ApiService *RestApiV1ServicesAPIService + service string + serviceCreateDto *ServiceCreateDto +} + +func (r ApiRegisterServiceRequest) ServiceCreateDto(serviceCreateDto ServiceCreateDto) ApiRegisterServiceRequest { + r.serviceCreateDto = &serviceCreateDto + return r +} + +func (r ApiRegisterServiceRequest) Execute() (*ServiceDto, *http.Response, error) { + return r.ApiService.RegisterServiceExecute(r) +} + +/* +RegisterService register a new service with the given name + +Register a new service in the metadata. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param service The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`. + @return ApiRegisterServiceRequest +*/ +func (a *RestApiV1ServicesAPIService) RegisterService(ctx context.Context, service string) ApiRegisterServiceRequest { + return ApiRegisterServiceRequest{ + ApiService: a, + ctx: ctx, + service: service, + } +} + +// Execute executes the request +// @return ServiceDto +func (a *RestApiV1ServicesAPIService) RegisterServiceExecute(r ApiRegisterServiceRequest) (*ServiceDto, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ServiceDto + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RestApiV1ServicesAPIService.RegisterService") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rest/api/v1/services/{service}" + localVarPath = strings.Replace(localVarPath, "{"+"service"+"}", url.PathEscape(parameterValueToString(r.service, "service")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.serviceCreateDto == nil { + return localVarReturnValue, nil, reportError("serviceCreateDto is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.serviceCreateDto + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ServiceDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 502 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateServiceRequest struct { + ctx context.Context + ApiService *RestApiV1ServicesAPIService + service string + serviceDto *ServiceDto +} + +func (r ApiUpdateServiceRequest) ServiceDto(serviceDto ServiceDto) ApiUpdateServiceRequest { + r.serviceDto = &serviceDto + return r +} + +func (r ApiUpdateServiceRequest) Execute() (*ServiceDto, *http.Response, error) { + return r.ApiService.UpdateServiceExecute(r) +} + +/* +UpdateService update an existing service with the given name + +Update a service. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param service The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`. + @return ApiUpdateServiceRequest +*/ +func (a *RestApiV1ServicesAPIService) UpdateService(ctx context.Context, service string) ApiUpdateServiceRequest { + return ApiUpdateServiceRequest{ + ApiService: a, + ctx: ctx, + service: service, + } +} + +// Execute executes the request +// @return ServiceDto +func (a *RestApiV1ServicesAPIService) UpdateServiceExecute(r ApiUpdateServiceRequest) (*ServiceDto, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ServiceDto + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RestApiV1ServicesAPIService.UpdateService") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/rest/api/v1/services/{service}" + localVarPath = strings.Replace(localVarPath, "{"+"service"+"}", url.PathEscape(parameterValueToString(r.service, "service")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.serviceDto == nil { + return localVarReturnValue, nil, reportError("serviceDto is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.serviceDto + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ServiceDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 502 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_webhooks.go b/api_webhooks.go new file mode 100644 index 0000000..37042c6 --- /dev/null +++ b/api_webhooks.go @@ -0,0 +1,131 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// WebhooksAPIService WebhooksAPI service +type WebhooksAPIService service + +type ApiPostWebhookRequest struct { + ctx context.Context + ApiService *WebhooksAPIService + body *map[string]interface{} +} + +func (r ApiPostWebhookRequest) Body(body map[string]interface{}) ApiPostWebhookRequest { + r.body = &body + return r +} + +func (r ApiPostWebhookRequest) Execute() (*http.Response, error) { + return r.ApiService.PostWebhookExecute(r) +} + +/* +PostWebhook Method for PostWebhook + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiPostWebhookRequest +*/ +func (a *WebhooksAPIService) PostWebhook(ctx context.Context) ApiPostWebhookRequest { + return ApiPostWebhookRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *WebhooksAPIService) PostWebhookExecute(r ApiPostWebhookRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhooksAPIService.PostWebhook") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/webhooks/vcs/github" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.body == nil { + return nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorDto + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/client.go b/client.go new file mode 100644 index 0000000..3e71b9b --- /dev/null +++ b/client.go @@ -0,0 +1,679 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + +) + +var ( + JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`) + XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) +) + +// APIClient manages communication with the Metadata API vv1 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + ManagementAPI *ManagementAPIService + + RestApiV1OwnersAPI *RestApiV1OwnersAPIService + + RestApiV1RepositoriesAPI *RestApiV1RepositoriesAPIService + + RestApiV1ServicesAPI *RestApiV1ServicesAPIService + + WebhooksAPI *WebhooksAPIService +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.ManagementAPI = (*ManagementAPIService)(&c.common) + c.RestApiV1OwnersAPI = (*RestApiV1OwnersAPIService)(&c.common) + c.RestApiV1RepositoriesAPI = (*RestApiV1RepositoriesAPIService)(&c.common) + c.RestApiV1ServicesAPI = (*RestApiV1ServicesAPIService)(&c.common) + c.WebhooksAPI = (*WebhooksAPIService)(&c.common) + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +func parameterValueToString( obj interface{}, key string ) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok { + return fmt.Sprintf("%v", actualObj.GetActualInstanceValue()) + } + + return fmt.Sprintf("%v", obj) + } + var param,ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap,err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, style string, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + + case reflect.Struct: + if t,ok := obj.(MappedNullable); ok { + dataMap,err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, style, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i:=0;i 0 || (len(formFiles) > 0) { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + // Basic HTTP Authentication + if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { + localVarRequest.SetBasicAuth(auth.UserName, auth.Password) + } + + // AccessToken Authentication + if auth, ok := ctx.Value(ContextAccessToken).(string); ok { + localVarRequest.Header.Add("Authorization", "Bearer "+auth) + } + + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } + if XmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if JsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + err = file.Close() + if err != nil { + return err + } + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if JsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if XmlCheck.MatchString(contentType) { + var bs []byte + bs, err = xml.Marshal(body) + if err == nil { + bodyBuf.Write(bs) + } + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericOpenAPIError Provides access to the body, error and model on returned errors. +type GenericOpenAPIError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericOpenAPIError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericOpenAPIError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericOpenAPIError) Model() interface{} { + return e.model +} + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + if metaValue.Kind() == reflect.Struct { + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + } + + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/configuration.go b/configuration.go new file mode 100644 index 0000000..6fc878f --- /dev/null +++ b/configuration.go @@ -0,0 +1,222 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "context" + "fmt" + "net/http" + "strings" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextBasicAuth takes BasicAuth as authentication for the request. + ContextBasicAuth = contextKey("basic") + + // ContextAccessToken takes a string oauth2 access token as authentication for the request. + ContextAccessToken = contextKey("accesstoken") + + // ContextServerIndex uses a server configuration from the index. + ContextServerIndex = contextKey("serverIndex") + + // ContextOperationServerIndices uses a server configuration from the index mapping. + ContextOperationServerIndices = contextKey("serverOperationIndices") + + // ContextServerVariables overrides a server configuration variables. + ContextServerVariables = contextKey("serverVariables") + + // ContextOperationServerVariables overrides a server configuration variables using operation specific values. + ContextOperationServerVariables = contextKey("serverOperationVariables") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +// ServerVariable stores the information about a server variable +type ServerVariable struct { + Description string + DefaultValue string + EnumValues []string +} + +// ServerConfiguration stores the information about a server +type ServerConfiguration struct { + URL string + Description string + Variables map[string]ServerVariable +} + +// ServerConfigurations stores multiple ServerConfiguration items +type ServerConfigurations []ServerConfiguration + +// Configuration stores the configuration of the API client +type Configuration struct { + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + Debug bool `json:"debug,omitempty"` + Servers ServerConfigurations + OperationServers map[string]ServerConfigurations + HTTPClient *http.Client +} + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *Configuration { + cfg := &Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Servers: ServerConfigurations{ + { + URL: "", + Description: "No description provided", + }, + }, + OperationServers: map[string]ServerConfigurations{ + }, + } + return cfg +} + +// AddDefaultHeader adds a new HTTP header to the default header in the request +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} + +// URL formats template on a index using given variables +func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { + if index < 0 || len(sc) <= index { + return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) + } + server := sc[index] + url := server.URL + + // go through variables and replace placeholders + for name, variable := range server.Variables { + if value, ok := variables[name]; ok { + found := bool(len(variable.EnumValues) == 0) + for _, enumValue := range variable.EnumValues { + if value == enumValue { + found = true + } + } + if !found { + return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) + } + url = strings.Replace(url, "{"+name+"}", value, -1) + } else { + url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) + } + } + return url, nil +} + +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { + return c.Servers.URL(index, variables) +} + +func getServerIndex(ctx context.Context) (int, error) { + si := ctx.Value(ContextServerIndex) + if si != nil { + if index, ok := si.(int); ok { + return index, nil + } + return 0, reportError("Invalid type %T should be int", si) + } + return 0, nil +} + +func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { + osi := ctx.Value(ContextOperationServerIndices) + if osi != nil { + if operationIndices, ok := osi.(map[string]int); !ok { + return 0, reportError("Invalid type %T should be map[string]int", osi) + } else { + index, ok := operationIndices[endpoint] + if ok { + return index, nil + } + } + } + return getServerIndex(ctx) +} + +func getServerVariables(ctx context.Context) (map[string]string, error) { + sv := ctx.Value(ContextServerVariables) + if sv != nil { + if variables, ok := sv.(map[string]string); ok { + return variables, nil + } + return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) + } + return nil, nil +} + +func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { + osv := ctx.Value(ContextOperationServerVariables) + if osv != nil { + if operationVariables, ok := osv.(map[string]map[string]string); !ok { + return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) + } else { + variables, ok := operationVariables[endpoint] + if ok { + return variables, nil + } + } + } + return getServerVariables(ctx) +} + +// ServerURLWithContext returns a new server URL given an endpoint +func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { + sc, ok := c.OperationServers[endpoint] + if !ok { + sc = c.Servers + } + + if ctx == nil { + return sc.URL(0, nil) + } + + index, err := getServerOperationIndex(ctx, endpoint) + if err != nil { + return "", err + } + + variables, err := getServerOperationVariables(ctx, endpoint) + if err != nil { + return "", err + } + + return sc.URL(index, variables) +} diff --git a/docs/Binary.md b/docs/Binary.md new file mode 100644 index 0000000..c5e2d3b --- /dev/null +++ b/docs/Binary.md @@ -0,0 +1,145 @@ +# Binary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**GroupId** | **string** | The group id of binary | +**ArtifactId** | **string** | The artifact id of binary | +**VersionPrefix** | **string** | The version prefix of binary | +**Classifier** | Pointer to **string** | The classifier of binary | [optional] +**FileType** | Pointer to **string** | The file type of binary e.g. tar.gz | [optional] + +## Methods + +### NewBinary + +`func NewBinary(groupId string, artifactId string, versionPrefix string, ) *Binary` + +NewBinary instantiates a new Binary object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBinaryWithDefaults + +`func NewBinaryWithDefaults() *Binary` + +NewBinaryWithDefaults instantiates a new Binary object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetGroupId + +`func (o *Binary) GetGroupId() string` + +GetGroupId returns the GroupId field if non-nil, zero value otherwise. + +### GetGroupIdOk + +`func (o *Binary) GetGroupIdOk() (*string, bool)` + +GetGroupIdOk returns a tuple with the GroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroupId + +`func (o *Binary) SetGroupId(v string)` + +SetGroupId sets GroupId field to given value. + + +### GetArtifactId + +`func (o *Binary) GetArtifactId() string` + +GetArtifactId returns the ArtifactId field if non-nil, zero value otherwise. + +### GetArtifactIdOk + +`func (o *Binary) GetArtifactIdOk() (*string, bool)` + +GetArtifactIdOk returns a tuple with the ArtifactId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArtifactId + +`func (o *Binary) SetArtifactId(v string)` + +SetArtifactId sets ArtifactId field to given value. + + +### GetVersionPrefix + +`func (o *Binary) GetVersionPrefix() string` + +GetVersionPrefix returns the VersionPrefix field if non-nil, zero value otherwise. + +### GetVersionPrefixOk + +`func (o *Binary) GetVersionPrefixOk() (*string, bool)` + +GetVersionPrefixOk returns a tuple with the VersionPrefix field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersionPrefix + +`func (o *Binary) SetVersionPrefix(v string)` + +SetVersionPrefix sets VersionPrefix field to given value. + + +### GetClassifier + +`func (o *Binary) GetClassifier() string` + +GetClassifier returns the Classifier field if non-nil, zero value otherwise. + +### GetClassifierOk + +`func (o *Binary) GetClassifierOk() (*string, bool)` + +GetClassifierOk returns a tuple with the Classifier field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClassifier + +`func (o *Binary) SetClassifier(v string)` + +SetClassifier sets Classifier field to given value. + +### HasClassifier + +`func (o *Binary) HasClassifier() bool` + +HasClassifier returns a boolean if a field has been set. + +### GetFileType + +`func (o *Binary) GetFileType() string` + +GetFileType returns the FileType field if non-nil, zero value otherwise. + +### GetFileTypeOk + +`func (o *Binary) GetFileTypeOk() (*string, bool)` + +GetFileTypeOk returns a tuple with the FileType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFileType + +`func (o *Binary) SetFileType(v string)` + +SetFileType sets FileType field to given value. + +### HasFileType + +`func (o *Binary) HasFileType() bool` + +HasFileType returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ConditionReferenceDto.md b/docs/ConditionReferenceDto.md new file mode 100644 index 0000000..d30fd0f --- /dev/null +++ b/docs/ConditionReferenceDto.md @@ -0,0 +1,103 @@ +# ConditionReferenceDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RefMatcher** | **string** | Reference of a branch. | +**Exemptions** | Pointer to **[]string** | list of users or groups for which this protection does not apply. | [optional] +**Source** | Pointer to **string** | The expected source for the required conditional build. | [optional] + +## Methods + +### NewConditionReferenceDto + +`func NewConditionReferenceDto(refMatcher string, ) *ConditionReferenceDto` + +NewConditionReferenceDto instantiates a new ConditionReferenceDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConditionReferenceDtoWithDefaults + +`func NewConditionReferenceDtoWithDefaults() *ConditionReferenceDto` + +NewConditionReferenceDtoWithDefaults instantiates a new ConditionReferenceDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRefMatcher + +`func (o *ConditionReferenceDto) GetRefMatcher() string` + +GetRefMatcher returns the RefMatcher field if non-nil, zero value otherwise. + +### GetRefMatcherOk + +`func (o *ConditionReferenceDto) GetRefMatcherOk() (*string, bool)` + +GetRefMatcherOk returns a tuple with the RefMatcher field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefMatcher + +`func (o *ConditionReferenceDto) SetRefMatcher(v string)` + +SetRefMatcher sets RefMatcher field to given value. + + +### GetExemptions + +`func (o *ConditionReferenceDto) GetExemptions() []string` + +GetExemptions returns the Exemptions field if non-nil, zero value otherwise. + +### GetExemptionsOk + +`func (o *ConditionReferenceDto) GetExemptionsOk() (*[]string, bool)` + +GetExemptionsOk returns a tuple with the Exemptions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExemptions + +`func (o *ConditionReferenceDto) SetExemptions(v []string)` + +SetExemptions sets Exemptions field to given value. + +### HasExemptions + +`func (o *ConditionReferenceDto) HasExemptions() bool` + +HasExemptions returns a boolean if a field has been set. + +### GetSource + +`func (o *ConditionReferenceDto) GetSource() string` + +GetSource returns the Source field if non-nil, zero value otherwise. + +### GetSourceOk + +`func (o *ConditionReferenceDto) GetSourceOk() (*string, bool)` + +GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSource + +`func (o *ConditionReferenceDto) SetSource(v string)` + +SetSource sets Source field to given value. + +### HasSource + +`func (o *ConditionReferenceDto) HasSource() bool` + +HasSource returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeletionDto.md b/docs/DeletionDto.md new file mode 100644 index 0000000..d582cb8 --- /dev/null +++ b/docs/DeletionDto.md @@ -0,0 +1,51 @@ +# DeletionDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JiraIssue** | **string** | The jira issue to use for committing the deletion. | + +## Methods + +### NewDeletionDto + +`func NewDeletionDto(jiraIssue string, ) *DeletionDto` + +NewDeletionDto instantiates a new DeletionDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDeletionDtoWithDefaults + +`func NewDeletionDtoWithDefaults() *DeletionDto` + +NewDeletionDtoWithDefaults instantiates a new DeletionDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetJiraIssue + +`func (o *DeletionDto) GetJiraIssue() string` + +GetJiraIssue returns the JiraIssue field if non-nil, zero value otherwise. + +### GetJiraIssueOk + +`func (o *DeletionDto) GetJiraIssueOk() (*string, bool)` + +GetJiraIssueOk returns a tuple with the JiraIssue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJiraIssue + +`func (o *DeletionDto) SetJiraIssue(v string)` + +SetJiraIssue sets JiraIssue field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ErrorDto.md b/docs/ErrorDto.md new file mode 100644 index 0000000..2e88ffe --- /dev/null +++ b/docs/ErrorDto.md @@ -0,0 +1,108 @@ +# ErrorDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Details** | Pointer to **string** | | [optional] +**Message** | Pointer to **string** | | [optional] +**Timestamp** | Pointer to **time.Time** | | [optional] + +## Methods + +### NewErrorDto + +`func NewErrorDto() *ErrorDto` + +NewErrorDto instantiates a new ErrorDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewErrorDtoWithDefaults + +`func NewErrorDtoWithDefaults() *ErrorDto` + +NewErrorDtoWithDefaults instantiates a new ErrorDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDetails + +`func (o *ErrorDto) GetDetails() string` + +GetDetails returns the Details field if non-nil, zero value otherwise. + +### GetDetailsOk + +`func (o *ErrorDto) GetDetailsOk() (*string, bool)` + +GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetails + +`func (o *ErrorDto) SetDetails(v string)` + +SetDetails sets Details field to given value. + +### HasDetails + +`func (o *ErrorDto) HasDetails() bool` + +HasDetails returns a boolean if a field has been set. + +### GetMessage + +`func (o *ErrorDto) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *ErrorDto) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *ErrorDto) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *ErrorDto) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetTimestamp + +`func (o *ErrorDto) GetTimestamp() time.Time` + +GetTimestamp returns the Timestamp field if non-nil, zero value otherwise. + +### GetTimestampOk + +`func (o *ErrorDto) GetTimestampOk() (*time.Time, bool)` + +GetTimestampOk returns a tuple with the Timestamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimestamp + +`func (o *ErrorDto) SetTimestamp(v time.Time)` + +SetTimestamp sets Timestamp field to given value. + +### HasTimestamp + +`func (o *ErrorDto) HasTimestamp() bool` + +HasTimestamp returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExcludeMergeCheckUserDto.md b/docs/ExcludeMergeCheckUserDto.md new file mode 100644 index 0000000..b077a9e --- /dev/null +++ b/docs/ExcludeMergeCheckUserDto.md @@ -0,0 +1,51 @@ +# ExcludeMergeCheckUserDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of merge check exclude user | + +## Methods + +### NewExcludeMergeCheckUserDto + +`func NewExcludeMergeCheckUserDto(name string, ) *ExcludeMergeCheckUserDto` + +NewExcludeMergeCheckUserDto instantiates a new ExcludeMergeCheckUserDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewExcludeMergeCheckUserDtoWithDefaults + +`func NewExcludeMergeCheckUserDtoWithDefaults() *ExcludeMergeCheckUserDto` + +NewExcludeMergeCheckUserDtoWithDefaults instantiates a new ExcludeMergeCheckUserDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ExcludeMergeCheckUserDto) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ExcludeMergeCheckUserDto) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ExcludeMergeCheckUserDto) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HealthComponent.md b/docs/HealthComponent.md new file mode 100644 index 0000000..71090ab --- /dev/null +++ b/docs/HealthComponent.md @@ -0,0 +1,82 @@ +# HealthComponent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | Pointer to **string** | | [optional] +**Status** | Pointer to **string** | | [optional] + +## Methods + +### NewHealthComponent + +`func NewHealthComponent() *HealthComponent` + +NewHealthComponent instantiates a new HealthComponent object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHealthComponentWithDefaults + +`func NewHealthComponentWithDefaults() *HealthComponent` + +NewHealthComponentWithDefaults instantiates a new HealthComponent object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDescription + +`func (o *HealthComponent) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *HealthComponent) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *HealthComponent) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *HealthComponent) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetStatus + +`func (o *HealthComponent) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *HealthComponent) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *HealthComponent) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *HealthComponent) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Link.md b/docs/Link.md new file mode 100644 index 0000000..715d356 --- /dev/null +++ b/docs/Link.md @@ -0,0 +1,82 @@ +# Link + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | Pointer to **string** | | [optional] +**Title** | Pointer to **string** | | [optional] + +## Methods + +### NewLink + +`func NewLink() *Link` + +NewLink instantiates a new Link object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLinkWithDefaults + +`func NewLinkWithDefaults() *Link` + +NewLinkWithDefaults instantiates a new Link object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUrl + +`func (o *Link) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *Link) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *Link) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *Link) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + +### GetTitle + +`func (o *Link) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *Link) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *Link) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *Link) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ManagementAPI.md b/docs/ManagementAPI.md new file mode 100644 index 0000000..7cfda5e --- /dev/null +++ b/docs/ManagementAPI.md @@ -0,0 +1,128 @@ +# \ManagementAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetHealth**](ManagementAPI.md#GetHealth) | **Get** /health | +[**GetHealth1**](ManagementAPI.md#GetHealth1) | **Get** /management/health | + + + +## GetHealth + +> HealthComponent GetHealth(ctx).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ManagementAPI.GetHealth(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ManagementAPI.GetHealth``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetHealth`: HealthComponent + fmt.Fprintf(os.Stdout, "Response from `ManagementAPI.GetHealth`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetHealthRequest struct via the builder pattern + + +### Return type + +[**HealthComponent**](HealthComponent.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetHealth1 + +> HealthComponent GetHealth1(ctx).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ManagementAPI.GetHealth1(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ManagementAPI.GetHealth1``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetHealth1`: HealthComponent + fmt.Fprintf(os.Stdout, "Response from `ManagementAPI.GetHealth1`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetHealth1Request struct via the builder pattern + + +### Return type + +[**HealthComponent**](HealthComponent.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/MergeStrategy.md b/docs/MergeStrategy.md new file mode 100644 index 0000000..6e62e93 --- /dev/null +++ b/docs/MergeStrategy.md @@ -0,0 +1,51 @@ +# MergeStrategy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | + +## Methods + +### NewMergeStrategy + +`func NewMergeStrategy(id string, ) *MergeStrategy` + +NewMergeStrategy instantiates a new MergeStrategy object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMergeStrategyWithDefaults + +`func NewMergeStrategyWithDefaults() *MergeStrategy` + +NewMergeStrategyWithDefaults instantiates a new MergeStrategy object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *MergeStrategy) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *MergeStrategy) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *MergeStrategy) SetId(v string)` + +SetId sets Id field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Notification.md b/docs/Notification.md new file mode 100644 index 0000000..8f52088 --- /dev/null +++ b/docs/Notification.md @@ -0,0 +1,119 @@ +# Notification + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | name of the service that was updated | +**Event** | **string** | | +**Type** | **string** | | +**Payload** | Pointer to [**NotificationPayload**](NotificationPayload.md) | | [optional] + +## Methods + +### NewNotification + +`func NewNotification(name string, event string, type_ string, ) *Notification` + +NewNotification instantiates a new Notification object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNotificationWithDefaults + +`func NewNotificationWithDefaults() *Notification` + +NewNotificationWithDefaults instantiates a new Notification object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *Notification) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Notification) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Notification) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEvent + +`func (o *Notification) GetEvent() string` + +GetEvent returns the Event field if non-nil, zero value otherwise. + +### GetEventOk + +`func (o *Notification) GetEventOk() (*string, bool)` + +GetEventOk returns a tuple with the Event field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEvent + +`func (o *Notification) SetEvent(v string)` + +SetEvent sets Event field to given value. + + +### GetType + +`func (o *Notification) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Notification) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Notification) SetType(v string)` + +SetType sets Type field to given value. + + +### GetPayload + +`func (o *Notification) GetPayload() NotificationPayload` + +GetPayload returns the Payload field if non-nil, zero value otherwise. + +### GetPayloadOk + +`func (o *Notification) GetPayloadOk() (*NotificationPayload, bool)` + +GetPayloadOk returns a tuple with the Payload field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPayload + +`func (o *Notification) SetPayload(v NotificationPayload)` + +SetPayload sets Payload field to given value. + +### HasPayload + +`func (o *Notification) HasPayload() bool` + +HasPayload returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NotificationPayload.md b/docs/NotificationPayload.md new file mode 100644 index 0000000..b7c9501 --- /dev/null +++ b/docs/NotificationPayload.md @@ -0,0 +1,108 @@ +# NotificationPayload + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Owner** | Pointer to [**OwnerDto**](OwnerDto.md) | | [optional] +**Service** | Pointer to [**ServiceDto**](ServiceDto.md) | | [optional] +**Repository** | Pointer to [**RepositoryDto**](RepositoryDto.md) | | [optional] + +## Methods + +### NewNotificationPayload + +`func NewNotificationPayload() *NotificationPayload` + +NewNotificationPayload instantiates a new NotificationPayload object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNotificationPayloadWithDefaults + +`func NewNotificationPayloadWithDefaults() *NotificationPayload` + +NewNotificationPayloadWithDefaults instantiates a new NotificationPayload object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOwner + +`func (o *NotificationPayload) GetOwner() OwnerDto` + +GetOwner returns the Owner field if non-nil, zero value otherwise. + +### GetOwnerOk + +`func (o *NotificationPayload) GetOwnerOk() (*OwnerDto, bool)` + +GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwner + +`func (o *NotificationPayload) SetOwner(v OwnerDto)` + +SetOwner sets Owner field to given value. + +### HasOwner + +`func (o *NotificationPayload) HasOwner() bool` + +HasOwner returns a boolean if a field has been set. + +### GetService + +`func (o *NotificationPayload) GetService() ServiceDto` + +GetService returns the Service field if non-nil, zero value otherwise. + +### GetServiceOk + +`func (o *NotificationPayload) GetServiceOk() (*ServiceDto, bool)` + +GetServiceOk returns a tuple with the Service field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetService + +`func (o *NotificationPayload) SetService(v ServiceDto)` + +SetService sets Service field to given value. + +### HasService + +`func (o *NotificationPayload) HasService() bool` + +HasService returns a boolean if a field has been set. + +### GetRepository + +`func (o *NotificationPayload) GetRepository() RepositoryDto` + +GetRepository returns the Repository field if non-nil, zero value otherwise. + +### GetRepositoryOk + +`func (o *NotificationPayload) GetRepositoryOk() (*RepositoryDto, bool)` + +GetRepositoryOk returns a tuple with the Repository field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRepository + +`func (o *NotificationPayload) SetRepository(v RepositoryDto)` + +SetRepository sets Repository field to given value. + +### HasRepository + +`func (o *NotificationPayload) HasRepository() bool` + +HasRepository returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OwnerCreateDto.md b/docs/OwnerCreateDto.md new file mode 100644 index 0000000..548dc4c --- /dev/null +++ b/docs/OwnerCreateDto.md @@ -0,0 +1,280 @@ +# OwnerCreateDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Contact** | **string** | The contact information of the owner | +**TeamsChannelURL** | Pointer to **string** | The teams channel url information of the owner | [optional] +**ProductOwner** | Pointer to **string** | The product owner of this owner space | [optional] +**Promoters** | Pointer to **[]string** | A list of users that are allowed to promote services in this owner space | [optional] +**Members** | Pointer to **[]string** | A list of users which constitute this owner | [optional] +**Groups** | Pointer to **map[string][]string** | Map of string (group name e.g. some-owner) of strings (list of usernames), one username for each group is required. | [optional] +**DefaultJiraProject** | Pointer to **string** | The default jira project that is used by this owner space | [optional] +**JiraIssue** | **string** | The jira issue to use for committing a change, or the last jira issue used. | +**DisplayName** | Pointer to **string** | A display name of the owner, to be presented in user interfaces instead of the owner's name, when available | [optional] +**Links** | Pointer to [**[]Link**](Link.md) | | [optional] + +## Methods + +### NewOwnerCreateDto + +`func NewOwnerCreateDto(contact string, jiraIssue string, ) *OwnerCreateDto` + +NewOwnerCreateDto instantiates a new OwnerCreateDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOwnerCreateDtoWithDefaults + +`func NewOwnerCreateDtoWithDefaults() *OwnerCreateDto` + +NewOwnerCreateDtoWithDefaults instantiates a new OwnerCreateDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetContact + +`func (o *OwnerCreateDto) GetContact() string` + +GetContact returns the Contact field if non-nil, zero value otherwise. + +### GetContactOk + +`func (o *OwnerCreateDto) GetContactOk() (*string, bool)` + +GetContactOk returns a tuple with the Contact field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContact + +`func (o *OwnerCreateDto) SetContact(v string)` + +SetContact sets Contact field to given value. + + +### GetTeamsChannelURL + +`func (o *OwnerCreateDto) GetTeamsChannelURL() string` + +GetTeamsChannelURL returns the TeamsChannelURL field if non-nil, zero value otherwise. + +### GetTeamsChannelURLOk + +`func (o *OwnerCreateDto) GetTeamsChannelURLOk() (*string, bool)` + +GetTeamsChannelURLOk returns a tuple with the TeamsChannelURL field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTeamsChannelURL + +`func (o *OwnerCreateDto) SetTeamsChannelURL(v string)` + +SetTeamsChannelURL sets TeamsChannelURL field to given value. + +### HasTeamsChannelURL + +`func (o *OwnerCreateDto) HasTeamsChannelURL() bool` + +HasTeamsChannelURL returns a boolean if a field has been set. + +### GetProductOwner + +`func (o *OwnerCreateDto) GetProductOwner() string` + +GetProductOwner returns the ProductOwner field if non-nil, zero value otherwise. + +### GetProductOwnerOk + +`func (o *OwnerCreateDto) GetProductOwnerOk() (*string, bool)` + +GetProductOwnerOk returns a tuple with the ProductOwner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductOwner + +`func (o *OwnerCreateDto) SetProductOwner(v string)` + +SetProductOwner sets ProductOwner field to given value. + +### HasProductOwner + +`func (o *OwnerCreateDto) HasProductOwner() bool` + +HasProductOwner returns a boolean if a field has been set. + +### GetPromoters + +`func (o *OwnerCreateDto) GetPromoters() []string` + +GetPromoters returns the Promoters field if non-nil, zero value otherwise. + +### GetPromotersOk + +`func (o *OwnerCreateDto) GetPromotersOk() (*[]string, bool)` + +GetPromotersOk returns a tuple with the Promoters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPromoters + +`func (o *OwnerCreateDto) SetPromoters(v []string)` + +SetPromoters sets Promoters field to given value. + +### HasPromoters + +`func (o *OwnerCreateDto) HasPromoters() bool` + +HasPromoters returns a boolean if a field has been set. + +### GetMembers + +`func (o *OwnerCreateDto) GetMembers() []string` + +GetMembers returns the Members field if non-nil, zero value otherwise. + +### GetMembersOk + +`func (o *OwnerCreateDto) GetMembersOk() (*[]string, bool)` + +GetMembersOk returns a tuple with the Members field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMembers + +`func (o *OwnerCreateDto) SetMembers(v []string)` + +SetMembers sets Members field to given value. + +### HasMembers + +`func (o *OwnerCreateDto) HasMembers() bool` + +HasMembers returns a boolean if a field has been set. + +### GetGroups + +`func (o *OwnerCreateDto) GetGroups() map[string][]string` + +GetGroups returns the Groups field if non-nil, zero value otherwise. + +### GetGroupsOk + +`func (o *OwnerCreateDto) GetGroupsOk() (*map[string][]string, bool)` + +GetGroupsOk returns a tuple with the Groups field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroups + +`func (o *OwnerCreateDto) SetGroups(v map[string][]string)` + +SetGroups sets Groups field to given value. + +### HasGroups + +`func (o *OwnerCreateDto) HasGroups() bool` + +HasGroups returns a boolean if a field has been set. + +### GetDefaultJiraProject + +`func (o *OwnerCreateDto) GetDefaultJiraProject() string` + +GetDefaultJiraProject returns the DefaultJiraProject field if non-nil, zero value otherwise. + +### GetDefaultJiraProjectOk + +`func (o *OwnerCreateDto) GetDefaultJiraProjectOk() (*string, bool)` + +GetDefaultJiraProjectOk returns a tuple with the DefaultJiraProject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultJiraProject + +`func (o *OwnerCreateDto) SetDefaultJiraProject(v string)` + +SetDefaultJiraProject sets DefaultJiraProject field to given value. + +### HasDefaultJiraProject + +`func (o *OwnerCreateDto) HasDefaultJiraProject() bool` + +HasDefaultJiraProject returns a boolean if a field has been set. + +### GetJiraIssue + +`func (o *OwnerCreateDto) GetJiraIssue() string` + +GetJiraIssue returns the JiraIssue field if non-nil, zero value otherwise. + +### GetJiraIssueOk + +`func (o *OwnerCreateDto) GetJiraIssueOk() (*string, bool)` + +GetJiraIssueOk returns a tuple with the JiraIssue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJiraIssue + +`func (o *OwnerCreateDto) SetJiraIssue(v string)` + +SetJiraIssue sets JiraIssue field to given value. + + +### GetDisplayName + +`func (o *OwnerCreateDto) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *OwnerCreateDto) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *OwnerCreateDto) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + +### HasDisplayName + +`func (o *OwnerCreateDto) HasDisplayName() bool` + +HasDisplayName returns a boolean if a field has been set. + +### GetLinks + +`func (o *OwnerCreateDto) GetLinks() []Link` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *OwnerCreateDto) GetLinksOk() (*[]Link, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *OwnerCreateDto) SetLinks(v []Link)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *OwnerCreateDto) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OwnerDto.md b/docs/OwnerDto.md new file mode 100644 index 0000000..0cad78a --- /dev/null +++ b/docs/OwnerDto.md @@ -0,0 +1,322 @@ +# OwnerDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Contact** | **string** | The contact information of the owner | +**TeamsChannelURL** | Pointer to **string** | The teams channel url information of the owner | [optional] +**ProductOwner** | Pointer to **string** | The product owner of this owner space | [optional] +**Members** | Pointer to **[]string** | A list of users which constitute this owner | [optional] +**Groups** | Pointer to **map[string][]string** | Collection of arbitrary user groups which can be referenced in service configurations. Map of string (group name e.g. some-owner) of strings (list of usernames), one username for each group is required. | [optional] +**Promoters** | Pointer to **[]string** | A list of users that are allowed to promote services in this owner space | [optional] +**DefaultJiraProject** | Pointer to **string** | The default jira project that is used by this owner space | [optional] +**TimeStamp** | **string** | ISO-8601 UTC date time at which this information was originally committed. When sending an update, include the original timestamp you got so we can detect concurrent updates. | +**CommitHash** | **string** | The git commit hash this information was originally committed under. When sending an update, include the original commitHash you got so we can detect concurrent updates. | +**JiraIssue** | **string** | The jira issue to use for committing a change, or the last jira issue used. | +**DisplayName** | Pointer to **string** | A display name of the owner, to be presented in user interfaces instead of the owner's name, when available | [optional] +**Links** | Pointer to [**[]Link**](Link.md) | | [optional] + +## Methods + +### NewOwnerDto + +`func NewOwnerDto(contact string, timeStamp string, commitHash string, jiraIssue string, ) *OwnerDto` + +NewOwnerDto instantiates a new OwnerDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOwnerDtoWithDefaults + +`func NewOwnerDtoWithDefaults() *OwnerDto` + +NewOwnerDtoWithDefaults instantiates a new OwnerDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetContact + +`func (o *OwnerDto) GetContact() string` + +GetContact returns the Contact field if non-nil, zero value otherwise. + +### GetContactOk + +`func (o *OwnerDto) GetContactOk() (*string, bool)` + +GetContactOk returns a tuple with the Contact field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContact + +`func (o *OwnerDto) SetContact(v string)` + +SetContact sets Contact field to given value. + + +### GetTeamsChannelURL + +`func (o *OwnerDto) GetTeamsChannelURL() string` + +GetTeamsChannelURL returns the TeamsChannelURL field if non-nil, zero value otherwise. + +### GetTeamsChannelURLOk + +`func (o *OwnerDto) GetTeamsChannelURLOk() (*string, bool)` + +GetTeamsChannelURLOk returns a tuple with the TeamsChannelURL field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTeamsChannelURL + +`func (o *OwnerDto) SetTeamsChannelURL(v string)` + +SetTeamsChannelURL sets TeamsChannelURL field to given value. + +### HasTeamsChannelURL + +`func (o *OwnerDto) HasTeamsChannelURL() bool` + +HasTeamsChannelURL returns a boolean if a field has been set. + +### GetProductOwner + +`func (o *OwnerDto) GetProductOwner() string` + +GetProductOwner returns the ProductOwner field if non-nil, zero value otherwise. + +### GetProductOwnerOk + +`func (o *OwnerDto) GetProductOwnerOk() (*string, bool)` + +GetProductOwnerOk returns a tuple with the ProductOwner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductOwner + +`func (o *OwnerDto) SetProductOwner(v string)` + +SetProductOwner sets ProductOwner field to given value. + +### HasProductOwner + +`func (o *OwnerDto) HasProductOwner() bool` + +HasProductOwner returns a boolean if a field has been set. + +### GetMembers + +`func (o *OwnerDto) GetMembers() []string` + +GetMembers returns the Members field if non-nil, zero value otherwise. + +### GetMembersOk + +`func (o *OwnerDto) GetMembersOk() (*[]string, bool)` + +GetMembersOk returns a tuple with the Members field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMembers + +`func (o *OwnerDto) SetMembers(v []string)` + +SetMembers sets Members field to given value. + +### HasMembers + +`func (o *OwnerDto) HasMembers() bool` + +HasMembers returns a boolean if a field has been set. + +### GetGroups + +`func (o *OwnerDto) GetGroups() map[string][]string` + +GetGroups returns the Groups field if non-nil, zero value otherwise. + +### GetGroupsOk + +`func (o *OwnerDto) GetGroupsOk() (*map[string][]string, bool)` + +GetGroupsOk returns a tuple with the Groups field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroups + +`func (o *OwnerDto) SetGroups(v map[string][]string)` + +SetGroups sets Groups field to given value. + +### HasGroups + +`func (o *OwnerDto) HasGroups() bool` + +HasGroups returns a boolean if a field has been set. + +### GetPromoters + +`func (o *OwnerDto) GetPromoters() []string` + +GetPromoters returns the Promoters field if non-nil, zero value otherwise. + +### GetPromotersOk + +`func (o *OwnerDto) GetPromotersOk() (*[]string, bool)` + +GetPromotersOk returns a tuple with the Promoters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPromoters + +`func (o *OwnerDto) SetPromoters(v []string)` + +SetPromoters sets Promoters field to given value. + +### HasPromoters + +`func (o *OwnerDto) HasPromoters() bool` + +HasPromoters returns a boolean if a field has been set. + +### GetDefaultJiraProject + +`func (o *OwnerDto) GetDefaultJiraProject() string` + +GetDefaultJiraProject returns the DefaultJiraProject field if non-nil, zero value otherwise. + +### GetDefaultJiraProjectOk + +`func (o *OwnerDto) GetDefaultJiraProjectOk() (*string, bool)` + +GetDefaultJiraProjectOk returns a tuple with the DefaultJiraProject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultJiraProject + +`func (o *OwnerDto) SetDefaultJiraProject(v string)` + +SetDefaultJiraProject sets DefaultJiraProject field to given value. + +### HasDefaultJiraProject + +`func (o *OwnerDto) HasDefaultJiraProject() bool` + +HasDefaultJiraProject returns a boolean if a field has been set. + +### GetTimeStamp + +`func (o *OwnerDto) GetTimeStamp() string` + +GetTimeStamp returns the TimeStamp field if non-nil, zero value otherwise. + +### GetTimeStampOk + +`func (o *OwnerDto) GetTimeStampOk() (*string, bool)` + +GetTimeStampOk returns a tuple with the TimeStamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeStamp + +`func (o *OwnerDto) SetTimeStamp(v string)` + +SetTimeStamp sets TimeStamp field to given value. + + +### GetCommitHash + +`func (o *OwnerDto) GetCommitHash() string` + +GetCommitHash returns the CommitHash field if non-nil, zero value otherwise. + +### GetCommitHashOk + +`func (o *OwnerDto) GetCommitHashOk() (*string, bool)` + +GetCommitHashOk returns a tuple with the CommitHash field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommitHash + +`func (o *OwnerDto) SetCommitHash(v string)` + +SetCommitHash sets CommitHash field to given value. + + +### GetJiraIssue + +`func (o *OwnerDto) GetJiraIssue() string` + +GetJiraIssue returns the JiraIssue field if non-nil, zero value otherwise. + +### GetJiraIssueOk + +`func (o *OwnerDto) GetJiraIssueOk() (*string, bool)` + +GetJiraIssueOk returns a tuple with the JiraIssue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJiraIssue + +`func (o *OwnerDto) SetJiraIssue(v string)` + +SetJiraIssue sets JiraIssue field to given value. + + +### GetDisplayName + +`func (o *OwnerDto) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *OwnerDto) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *OwnerDto) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + +### HasDisplayName + +`func (o *OwnerDto) HasDisplayName() bool` + +HasDisplayName returns a boolean if a field has been set. + +### GetLinks + +`func (o *OwnerDto) GetLinks() []Link` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *OwnerDto) GetLinksOk() (*[]Link, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *OwnerDto) SetLinks(v []Link)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *OwnerDto) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OwnerListDto.md b/docs/OwnerListDto.md new file mode 100644 index 0000000..8aeea29 --- /dev/null +++ b/docs/OwnerListDto.md @@ -0,0 +1,72 @@ +# OwnerListDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Owners** | [**map[string]OwnerDto**](OwnerDto.md) | | +**TimeStamp** | **string** | ISO-8601 UTC date time at which the list of owners was obtained from service-metadata | + +## Methods + +### NewOwnerListDto + +`func NewOwnerListDto(owners map[string]OwnerDto, timeStamp string, ) *OwnerListDto` + +NewOwnerListDto instantiates a new OwnerListDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOwnerListDtoWithDefaults + +`func NewOwnerListDtoWithDefaults() *OwnerListDto` + +NewOwnerListDtoWithDefaults instantiates a new OwnerListDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOwners + +`func (o *OwnerListDto) GetOwners() map[string]OwnerDto` + +GetOwners returns the Owners field if non-nil, zero value otherwise. + +### GetOwnersOk + +`func (o *OwnerListDto) GetOwnersOk() (*map[string]OwnerDto, bool)` + +GetOwnersOk returns a tuple with the Owners field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwners + +`func (o *OwnerListDto) SetOwners(v map[string]OwnerDto)` + +SetOwners sets Owners field to given value. + + +### GetTimeStamp + +`func (o *OwnerListDto) GetTimeStamp() string` + +GetTimeStamp returns the TimeStamp field if non-nil, zero value otherwise. + +### GetTimeStampOk + +`func (o *OwnerListDto) GetTimeStampOk() (*string, bool)` + +GetTimeStampOk returns a tuple with the TimeStamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeStamp + +`func (o *OwnerListDto) SetTimeStamp(v string)` + +SetTimeStamp sets TimeStamp field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OwnerPatchDto.md b/docs/OwnerPatchDto.md new file mode 100644 index 0000000..1799895 --- /dev/null +++ b/docs/OwnerPatchDto.md @@ -0,0 +1,327 @@ +# OwnerPatchDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Contact** | Pointer to **string** | The contact information of the owner | [optional] +**TeamsChannelURL** | Pointer to **string** | The teams channel url information of the owner | [optional] +**ProductOwner** | Pointer to **string** | The product owner of this owner space | [optional] +**Members** | Pointer to **[]string** | A list of users which constitute this owner | [optional] +**Groups** | Pointer to **map[string][]string** | Map of string (group name e.g. some-owner) of strings (list of usernames), one username for each group is required. | [optional] +**Promoters** | Pointer to **[]string** | A list of users that are allowed to promote services in this owner space | [optional] +**DefaultJiraProject** | Pointer to **string** | The default jira project that is used by this owner space | [optional] +**TimeStamp** | **string** | ISO-8601 UTC date time at which this information was originally committed. When sending an update, include the original timestamp you got so we can detect concurrent updates. | +**CommitHash** | **string** | The git commit hash this information was originally committed under. When sending an update, include the original commitHash you got so we can detect concurrent updates. | +**JiraIssue** | **string** | The jira issue to use for committing a change, or the last jira issue used. | +**DisplayName** | Pointer to **string** | A display name of the owner, to be presented in user interfaces instead of the owner's name, when available | [optional] +**Links** | Pointer to [**[]Link**](Link.md) | | [optional] + +## Methods + +### NewOwnerPatchDto + +`func NewOwnerPatchDto(timeStamp string, commitHash string, jiraIssue string, ) *OwnerPatchDto` + +NewOwnerPatchDto instantiates a new OwnerPatchDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOwnerPatchDtoWithDefaults + +`func NewOwnerPatchDtoWithDefaults() *OwnerPatchDto` + +NewOwnerPatchDtoWithDefaults instantiates a new OwnerPatchDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetContact + +`func (o *OwnerPatchDto) GetContact() string` + +GetContact returns the Contact field if non-nil, zero value otherwise. + +### GetContactOk + +`func (o *OwnerPatchDto) GetContactOk() (*string, bool)` + +GetContactOk returns a tuple with the Contact field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContact + +`func (o *OwnerPatchDto) SetContact(v string)` + +SetContact sets Contact field to given value. + +### HasContact + +`func (o *OwnerPatchDto) HasContact() bool` + +HasContact returns a boolean if a field has been set. + +### GetTeamsChannelURL + +`func (o *OwnerPatchDto) GetTeamsChannelURL() string` + +GetTeamsChannelURL returns the TeamsChannelURL field if non-nil, zero value otherwise. + +### GetTeamsChannelURLOk + +`func (o *OwnerPatchDto) GetTeamsChannelURLOk() (*string, bool)` + +GetTeamsChannelURLOk returns a tuple with the TeamsChannelURL field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTeamsChannelURL + +`func (o *OwnerPatchDto) SetTeamsChannelURL(v string)` + +SetTeamsChannelURL sets TeamsChannelURL field to given value. + +### HasTeamsChannelURL + +`func (o *OwnerPatchDto) HasTeamsChannelURL() bool` + +HasTeamsChannelURL returns a boolean if a field has been set. + +### GetProductOwner + +`func (o *OwnerPatchDto) GetProductOwner() string` + +GetProductOwner returns the ProductOwner field if non-nil, zero value otherwise. + +### GetProductOwnerOk + +`func (o *OwnerPatchDto) GetProductOwnerOk() (*string, bool)` + +GetProductOwnerOk returns a tuple with the ProductOwner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductOwner + +`func (o *OwnerPatchDto) SetProductOwner(v string)` + +SetProductOwner sets ProductOwner field to given value. + +### HasProductOwner + +`func (o *OwnerPatchDto) HasProductOwner() bool` + +HasProductOwner returns a boolean if a field has been set. + +### GetMembers + +`func (o *OwnerPatchDto) GetMembers() []string` + +GetMembers returns the Members field if non-nil, zero value otherwise. + +### GetMembersOk + +`func (o *OwnerPatchDto) GetMembersOk() (*[]string, bool)` + +GetMembersOk returns a tuple with the Members field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMembers + +`func (o *OwnerPatchDto) SetMembers(v []string)` + +SetMembers sets Members field to given value. + +### HasMembers + +`func (o *OwnerPatchDto) HasMembers() bool` + +HasMembers returns a boolean if a field has been set. + +### GetGroups + +`func (o *OwnerPatchDto) GetGroups() map[string][]string` + +GetGroups returns the Groups field if non-nil, zero value otherwise. + +### GetGroupsOk + +`func (o *OwnerPatchDto) GetGroupsOk() (*map[string][]string, bool)` + +GetGroupsOk returns a tuple with the Groups field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroups + +`func (o *OwnerPatchDto) SetGroups(v map[string][]string)` + +SetGroups sets Groups field to given value. + +### HasGroups + +`func (o *OwnerPatchDto) HasGroups() bool` + +HasGroups returns a boolean if a field has been set. + +### GetPromoters + +`func (o *OwnerPatchDto) GetPromoters() []string` + +GetPromoters returns the Promoters field if non-nil, zero value otherwise. + +### GetPromotersOk + +`func (o *OwnerPatchDto) GetPromotersOk() (*[]string, bool)` + +GetPromotersOk returns a tuple with the Promoters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPromoters + +`func (o *OwnerPatchDto) SetPromoters(v []string)` + +SetPromoters sets Promoters field to given value. + +### HasPromoters + +`func (o *OwnerPatchDto) HasPromoters() bool` + +HasPromoters returns a boolean if a field has been set. + +### GetDefaultJiraProject + +`func (o *OwnerPatchDto) GetDefaultJiraProject() string` + +GetDefaultJiraProject returns the DefaultJiraProject field if non-nil, zero value otherwise. + +### GetDefaultJiraProjectOk + +`func (o *OwnerPatchDto) GetDefaultJiraProjectOk() (*string, bool)` + +GetDefaultJiraProjectOk returns a tuple with the DefaultJiraProject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultJiraProject + +`func (o *OwnerPatchDto) SetDefaultJiraProject(v string)` + +SetDefaultJiraProject sets DefaultJiraProject field to given value. + +### HasDefaultJiraProject + +`func (o *OwnerPatchDto) HasDefaultJiraProject() bool` + +HasDefaultJiraProject returns a boolean if a field has been set. + +### GetTimeStamp + +`func (o *OwnerPatchDto) GetTimeStamp() string` + +GetTimeStamp returns the TimeStamp field if non-nil, zero value otherwise. + +### GetTimeStampOk + +`func (o *OwnerPatchDto) GetTimeStampOk() (*string, bool)` + +GetTimeStampOk returns a tuple with the TimeStamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeStamp + +`func (o *OwnerPatchDto) SetTimeStamp(v string)` + +SetTimeStamp sets TimeStamp field to given value. + + +### GetCommitHash + +`func (o *OwnerPatchDto) GetCommitHash() string` + +GetCommitHash returns the CommitHash field if non-nil, zero value otherwise. + +### GetCommitHashOk + +`func (o *OwnerPatchDto) GetCommitHashOk() (*string, bool)` + +GetCommitHashOk returns a tuple with the CommitHash field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommitHash + +`func (o *OwnerPatchDto) SetCommitHash(v string)` + +SetCommitHash sets CommitHash field to given value. + + +### GetJiraIssue + +`func (o *OwnerPatchDto) GetJiraIssue() string` + +GetJiraIssue returns the JiraIssue field if non-nil, zero value otherwise. + +### GetJiraIssueOk + +`func (o *OwnerPatchDto) GetJiraIssueOk() (*string, bool)` + +GetJiraIssueOk returns a tuple with the JiraIssue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJiraIssue + +`func (o *OwnerPatchDto) SetJiraIssue(v string)` + +SetJiraIssue sets JiraIssue field to given value. + + +### GetDisplayName + +`func (o *OwnerPatchDto) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *OwnerPatchDto) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *OwnerPatchDto) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + +### HasDisplayName + +`func (o *OwnerPatchDto) HasDisplayName() bool` + +HasDisplayName returns a boolean if a field has been set. + +### GetLinks + +`func (o *OwnerPatchDto) GetLinks() []Link` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *OwnerPatchDto) GetLinksOk() (*[]Link, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *OwnerPatchDto) SetLinks(v []Link)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *OwnerPatchDto) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PostPromote.md b/docs/PostPromote.md new file mode 100644 index 0000000..0d06823 --- /dev/null +++ b/docs/PostPromote.md @@ -0,0 +1,56 @@ +# PostPromote + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Binaries** | Pointer to [**[]Binary**](Binary.md) | | [optional] + +## Methods + +### NewPostPromote + +`func NewPostPromote() *PostPromote` + +NewPostPromote instantiates a new PostPromote object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPostPromoteWithDefaults + +`func NewPostPromoteWithDefaults() *PostPromote` + +NewPostPromoteWithDefaults instantiates a new PostPromote object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetBinaries + +`func (o *PostPromote) GetBinaries() []Binary` + +GetBinaries returns the Binaries field if non-nil, zero value otherwise. + +### GetBinariesOk + +`func (o *PostPromote) GetBinariesOk() (*[]Binary, bool)` + +GetBinariesOk returns a tuple with the Binaries field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBinaries + +`func (o *PostPromote) SetBinaries(v []Binary)` + +SetBinaries sets Binaries field to given value. + +### HasBinaries + +`func (o *PostPromote) HasBinaries() bool` + +HasBinaries returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProtectedRef.md b/docs/ProtectedRef.md new file mode 100644 index 0000000..4b3486c --- /dev/null +++ b/docs/ProtectedRef.md @@ -0,0 +1,103 @@ +# ProtectedRef + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Pattern** | **string** | fnmatch pattern to define protected refs. Must not start with refs/heads/ or refs/tags/. Special value :MAINLINE: matches the currently configured mainline for branch protections. | +**Exemptions** | Pointer to **[]string** | list of users or groups for which this protection does not apply. | [optional] +**ExemptionsRoles** | Pointer to **[]string** | list of group identifiers for which this protection does not apply. This field is read-only and will be filled automatically from the exemptions fields. | [optional] + +## Methods + +### NewProtectedRef + +`func NewProtectedRef(pattern string, ) *ProtectedRef` + +NewProtectedRef instantiates a new ProtectedRef object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewProtectedRefWithDefaults + +`func NewProtectedRefWithDefaults() *ProtectedRef` + +NewProtectedRefWithDefaults instantiates a new ProtectedRef object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPattern + +`func (o *ProtectedRef) GetPattern() string` + +GetPattern returns the Pattern field if non-nil, zero value otherwise. + +### GetPatternOk + +`func (o *ProtectedRef) GetPatternOk() (*string, bool)` + +GetPatternOk returns a tuple with the Pattern field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPattern + +`func (o *ProtectedRef) SetPattern(v string)` + +SetPattern sets Pattern field to given value. + + +### GetExemptions + +`func (o *ProtectedRef) GetExemptions() []string` + +GetExemptions returns the Exemptions field if non-nil, zero value otherwise. + +### GetExemptionsOk + +`func (o *ProtectedRef) GetExemptionsOk() (*[]string, bool)` + +GetExemptionsOk returns a tuple with the Exemptions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExemptions + +`func (o *ProtectedRef) SetExemptions(v []string)` + +SetExemptions sets Exemptions field to given value. + +### HasExemptions + +`func (o *ProtectedRef) HasExemptions() bool` + +HasExemptions returns a boolean if a field has been set. + +### GetExemptionsRoles + +`func (o *ProtectedRef) GetExemptionsRoles() []string` + +GetExemptionsRoles returns the ExemptionsRoles field if non-nil, zero value otherwise. + +### GetExemptionsRolesOk + +`func (o *ProtectedRef) GetExemptionsRolesOk() (*[]string, bool)` + +GetExemptionsRolesOk returns a tuple with the ExemptionsRoles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExemptionsRoles + +`func (o *ProtectedRef) SetExemptionsRoles(v []string)` + +SetExemptionsRoles sets ExemptionsRoles field to given value. + +### HasExemptionsRoles + +`func (o *ProtectedRef) HasExemptionsRoles() bool` + +HasExemptionsRoles returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PullRequests.md b/docs/PullRequests.md new file mode 100644 index 0000000..a8fb39d --- /dev/null +++ b/docs/PullRequests.md @@ -0,0 +1,82 @@ +# PullRequests + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AllowMergeCommits** | Pointer to **bool** | Allows merge commits on pull requests | [optional] [default to true] +**AllowRebaseMerging** | Pointer to **bool** | Allows rebase merging on pull requests | [optional] [default to true] + +## Methods + +### NewPullRequests + +`func NewPullRequests() *PullRequests` + +NewPullRequests instantiates a new PullRequests object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPullRequestsWithDefaults + +`func NewPullRequestsWithDefaults() *PullRequests` + +NewPullRequestsWithDefaults instantiates a new PullRequests object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAllowMergeCommits + +`func (o *PullRequests) GetAllowMergeCommits() bool` + +GetAllowMergeCommits returns the AllowMergeCommits field if non-nil, zero value otherwise. + +### GetAllowMergeCommitsOk + +`func (o *PullRequests) GetAllowMergeCommitsOk() (*bool, bool)` + +GetAllowMergeCommitsOk returns a tuple with the AllowMergeCommits field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllowMergeCommits + +`func (o *PullRequests) SetAllowMergeCommits(v bool)` + +SetAllowMergeCommits sets AllowMergeCommits field to given value. + +### HasAllowMergeCommits + +`func (o *PullRequests) HasAllowMergeCommits() bool` + +HasAllowMergeCommits returns a boolean if a field has been set. + +### GetAllowRebaseMerging + +`func (o *PullRequests) GetAllowRebaseMerging() bool` + +GetAllowRebaseMerging returns the AllowRebaseMerging field if non-nil, zero value otherwise. + +### GetAllowRebaseMergingOk + +`func (o *PullRequests) GetAllowRebaseMergingOk() (*bool, bool)` + +GetAllowRebaseMergingOk returns a tuple with the AllowRebaseMerging field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllowRebaseMerging + +`func (o *PullRequests) SetAllowRebaseMerging(v bool)` + +SetAllowRebaseMerging sets AllowRebaseMerging field to given value. + +### HasAllowRebaseMerging + +`func (o *PullRequests) HasAllowRebaseMerging() bool` + +HasAllowRebaseMerging returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Quicklink.md b/docs/Quicklink.md new file mode 100644 index 0000000..3388e07 --- /dev/null +++ b/docs/Quicklink.md @@ -0,0 +1,108 @@ +# Quicklink + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | Pointer to **string** | | [optional] +**Title** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] + +## Methods + +### NewQuicklink + +`func NewQuicklink() *Quicklink` + +NewQuicklink instantiates a new Quicklink object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewQuicklinkWithDefaults + +`func NewQuicklinkWithDefaults() *Quicklink` + +NewQuicklinkWithDefaults instantiates a new Quicklink object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUrl + +`func (o *Quicklink) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *Quicklink) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *Quicklink) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *Quicklink) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + +### GetTitle + +`func (o *Quicklink) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *Quicklink) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *Quicklink) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *Quicklink) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetDescription + +`func (o *Quicklink) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Quicklink) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Quicklink) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *Quicklink) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RefProtections.md b/docs/RefProtections.md new file mode 100644 index 0000000..5f540a2 --- /dev/null +++ b/docs/RefProtections.md @@ -0,0 +1,82 @@ +# RefProtections + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Branches** | Pointer to [**RefProtectionsBranches**](RefProtectionsBranches.md) | | [optional] +**Tags** | Pointer to [**RefProtectionsTags**](RefProtectionsTags.md) | | [optional] + +## Methods + +### NewRefProtections + +`func NewRefProtections() *RefProtections` + +NewRefProtections instantiates a new RefProtections object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRefProtectionsWithDefaults + +`func NewRefProtectionsWithDefaults() *RefProtections` + +NewRefProtectionsWithDefaults instantiates a new RefProtections object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetBranches + +`func (o *RefProtections) GetBranches() RefProtectionsBranches` + +GetBranches returns the Branches field if non-nil, zero value otherwise. + +### GetBranchesOk + +`func (o *RefProtections) GetBranchesOk() (*RefProtectionsBranches, bool)` + +GetBranchesOk returns a tuple with the Branches field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBranches + +`func (o *RefProtections) SetBranches(v RefProtectionsBranches)` + +SetBranches sets Branches field to given value. + +### HasBranches + +`func (o *RefProtections) HasBranches() bool` + +HasBranches returns a boolean if a field has been set. + +### GetTags + +`func (o *RefProtections) GetTags() RefProtectionsTags` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *RefProtections) GetTagsOk() (*RefProtectionsTags, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *RefProtections) SetTags(v RefProtectionsTags)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *RefProtections) HasTags() bool` + +HasTags returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RefProtectionsBranches.md b/docs/RefProtectionsBranches.md new file mode 100644 index 0000000..d42ec96 --- /dev/null +++ b/docs/RefProtectionsBranches.md @@ -0,0 +1,186 @@ +# RefProtectionsBranches + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequirePR** | Pointer to [**[]ProtectedRef**](ProtectedRef.md) | Forces creating a PR to update the protected refs. | [optional] +**PreventAllChanges** | Pointer to [**[]ProtectedRef**](ProtectedRef.md) | Prevents all changes of the protected refs. | [optional] +**PreventCreation** | Pointer to [**[]ProtectedRef**](ProtectedRef.md) | Prevents creation of the protected refs. | [optional] +**PreventDeletion** | Pointer to [**[]ProtectedRef**](ProtectedRef.md) | Prevents deletion of the protected refs. | [optional] +**PreventPush** | Pointer to [**[]ProtectedRef**](ProtectedRef.md) | Prevents pushes to the protected refs. | [optional] +**PreventForcePush** | Pointer to [**[]ProtectedRef**](ProtectedRef.md) | Prevents force pushes to the protected refs for users with push permission. | [optional] + +## Methods + +### NewRefProtectionsBranches + +`func NewRefProtectionsBranches() *RefProtectionsBranches` + +NewRefProtectionsBranches instantiates a new RefProtectionsBranches object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRefProtectionsBranchesWithDefaults + +`func NewRefProtectionsBranchesWithDefaults() *RefProtectionsBranches` + +NewRefProtectionsBranchesWithDefaults instantiates a new RefProtectionsBranches object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRequirePR + +`func (o *RefProtectionsBranches) GetRequirePR() []ProtectedRef` + +GetRequirePR returns the RequirePR field if non-nil, zero value otherwise. + +### GetRequirePROk + +`func (o *RefProtectionsBranches) GetRequirePROk() (*[]ProtectedRef, bool)` + +GetRequirePROk returns a tuple with the RequirePR field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequirePR + +`func (o *RefProtectionsBranches) SetRequirePR(v []ProtectedRef)` + +SetRequirePR sets RequirePR field to given value. + +### HasRequirePR + +`func (o *RefProtectionsBranches) HasRequirePR() bool` + +HasRequirePR returns a boolean if a field has been set. + +### GetPreventAllChanges + +`func (o *RefProtectionsBranches) GetPreventAllChanges() []ProtectedRef` + +GetPreventAllChanges returns the PreventAllChanges field if non-nil, zero value otherwise. + +### GetPreventAllChangesOk + +`func (o *RefProtectionsBranches) GetPreventAllChangesOk() (*[]ProtectedRef, bool)` + +GetPreventAllChangesOk returns a tuple with the PreventAllChanges field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreventAllChanges + +`func (o *RefProtectionsBranches) SetPreventAllChanges(v []ProtectedRef)` + +SetPreventAllChanges sets PreventAllChanges field to given value. + +### HasPreventAllChanges + +`func (o *RefProtectionsBranches) HasPreventAllChanges() bool` + +HasPreventAllChanges returns a boolean if a field has been set. + +### GetPreventCreation + +`func (o *RefProtectionsBranches) GetPreventCreation() []ProtectedRef` + +GetPreventCreation returns the PreventCreation field if non-nil, zero value otherwise. + +### GetPreventCreationOk + +`func (o *RefProtectionsBranches) GetPreventCreationOk() (*[]ProtectedRef, bool)` + +GetPreventCreationOk returns a tuple with the PreventCreation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreventCreation + +`func (o *RefProtectionsBranches) SetPreventCreation(v []ProtectedRef)` + +SetPreventCreation sets PreventCreation field to given value. + +### HasPreventCreation + +`func (o *RefProtectionsBranches) HasPreventCreation() bool` + +HasPreventCreation returns a boolean if a field has been set. + +### GetPreventDeletion + +`func (o *RefProtectionsBranches) GetPreventDeletion() []ProtectedRef` + +GetPreventDeletion returns the PreventDeletion field if non-nil, zero value otherwise. + +### GetPreventDeletionOk + +`func (o *RefProtectionsBranches) GetPreventDeletionOk() (*[]ProtectedRef, bool)` + +GetPreventDeletionOk returns a tuple with the PreventDeletion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreventDeletion + +`func (o *RefProtectionsBranches) SetPreventDeletion(v []ProtectedRef)` + +SetPreventDeletion sets PreventDeletion field to given value. + +### HasPreventDeletion + +`func (o *RefProtectionsBranches) HasPreventDeletion() bool` + +HasPreventDeletion returns a boolean if a field has been set. + +### GetPreventPush + +`func (o *RefProtectionsBranches) GetPreventPush() []ProtectedRef` + +GetPreventPush returns the PreventPush field if non-nil, zero value otherwise. + +### GetPreventPushOk + +`func (o *RefProtectionsBranches) GetPreventPushOk() (*[]ProtectedRef, bool)` + +GetPreventPushOk returns a tuple with the PreventPush field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreventPush + +`func (o *RefProtectionsBranches) SetPreventPush(v []ProtectedRef)` + +SetPreventPush sets PreventPush field to given value. + +### HasPreventPush + +`func (o *RefProtectionsBranches) HasPreventPush() bool` + +HasPreventPush returns a boolean if a field has been set. + +### GetPreventForcePush + +`func (o *RefProtectionsBranches) GetPreventForcePush() []ProtectedRef` + +GetPreventForcePush returns the PreventForcePush field if non-nil, zero value otherwise. + +### GetPreventForcePushOk + +`func (o *RefProtectionsBranches) GetPreventForcePushOk() (*[]ProtectedRef, bool)` + +GetPreventForcePushOk returns a tuple with the PreventForcePush field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreventForcePush + +`func (o *RefProtectionsBranches) SetPreventForcePush(v []ProtectedRef)` + +SetPreventForcePush sets PreventForcePush field to given value. + +### HasPreventForcePush + +`func (o *RefProtectionsBranches) HasPreventForcePush() bool` + +HasPreventForcePush returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RefProtectionsTags.md b/docs/RefProtectionsTags.md new file mode 100644 index 0000000..c9d00b3 --- /dev/null +++ b/docs/RefProtectionsTags.md @@ -0,0 +1,134 @@ +# RefProtectionsTags + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PreventAllChanges** | Pointer to [**[]ProtectedRef**](ProtectedRef.md) | Prevents all changes of the protected refs. | [optional] +**PreventCreation** | Pointer to [**[]ProtectedRef**](ProtectedRef.md) | Prevents creation of the protected refs. | [optional] +**PreventDeletion** | Pointer to [**[]ProtectedRef**](ProtectedRef.md) | Prevents deletion of the protected refs. | [optional] +**PreventForcePush** | Pointer to [**[]ProtectedRef**](ProtectedRef.md) | Prevents force pushes to the protected refs for users with push permission. | [optional] + +## Methods + +### NewRefProtectionsTags + +`func NewRefProtectionsTags() *RefProtectionsTags` + +NewRefProtectionsTags instantiates a new RefProtectionsTags object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRefProtectionsTagsWithDefaults + +`func NewRefProtectionsTagsWithDefaults() *RefProtectionsTags` + +NewRefProtectionsTagsWithDefaults instantiates a new RefProtectionsTags object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPreventAllChanges + +`func (o *RefProtectionsTags) GetPreventAllChanges() []ProtectedRef` + +GetPreventAllChanges returns the PreventAllChanges field if non-nil, zero value otherwise. + +### GetPreventAllChangesOk + +`func (o *RefProtectionsTags) GetPreventAllChangesOk() (*[]ProtectedRef, bool)` + +GetPreventAllChangesOk returns a tuple with the PreventAllChanges field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreventAllChanges + +`func (o *RefProtectionsTags) SetPreventAllChanges(v []ProtectedRef)` + +SetPreventAllChanges sets PreventAllChanges field to given value. + +### HasPreventAllChanges + +`func (o *RefProtectionsTags) HasPreventAllChanges() bool` + +HasPreventAllChanges returns a boolean if a field has been set. + +### GetPreventCreation + +`func (o *RefProtectionsTags) GetPreventCreation() []ProtectedRef` + +GetPreventCreation returns the PreventCreation field if non-nil, zero value otherwise. + +### GetPreventCreationOk + +`func (o *RefProtectionsTags) GetPreventCreationOk() (*[]ProtectedRef, bool)` + +GetPreventCreationOk returns a tuple with the PreventCreation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreventCreation + +`func (o *RefProtectionsTags) SetPreventCreation(v []ProtectedRef)` + +SetPreventCreation sets PreventCreation field to given value. + +### HasPreventCreation + +`func (o *RefProtectionsTags) HasPreventCreation() bool` + +HasPreventCreation returns a boolean if a field has been set. + +### GetPreventDeletion + +`func (o *RefProtectionsTags) GetPreventDeletion() []ProtectedRef` + +GetPreventDeletion returns the PreventDeletion field if non-nil, zero value otherwise. + +### GetPreventDeletionOk + +`func (o *RefProtectionsTags) GetPreventDeletionOk() (*[]ProtectedRef, bool)` + +GetPreventDeletionOk returns a tuple with the PreventDeletion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreventDeletion + +`func (o *RefProtectionsTags) SetPreventDeletion(v []ProtectedRef)` + +SetPreventDeletion sets PreventDeletion field to given value. + +### HasPreventDeletion + +`func (o *RefProtectionsTags) HasPreventDeletion() bool` + +HasPreventDeletion returns a boolean if a field has been set. + +### GetPreventForcePush + +`func (o *RefProtectionsTags) GetPreventForcePush() []ProtectedRef` + +GetPreventForcePush returns the PreventForcePush field if non-nil, zero value otherwise. + +### GetPreventForcePushOk + +`func (o *RefProtectionsTags) GetPreventForcePushOk() (*[]ProtectedRef, bool)` + +GetPreventForcePushOk returns a tuple with the PreventForcePush field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreventForcePush + +`func (o *RefProtectionsTags) SetPreventForcePush(v []ProtectedRef)` + +SetPreventForcePush sets PreventForcePush field to given value. + +### HasPreventForcePush + +`func (o *RefProtectionsTags) HasPreventForcePush() bool` + +HasPreventForcePush returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepositoryConfigurationAccessKeyDto.md b/docs/RepositoryConfigurationAccessKeyDto.md new file mode 100644 index 0000000..c5cf876 --- /dev/null +++ b/docs/RepositoryConfigurationAccessKeyDto.md @@ -0,0 +1,108 @@ +# RepositoryConfigurationAccessKeyDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | Pointer to **string** | | [optional] +**Data** | Pointer to **string** | | [optional] +**Permission** | Pointer to **string** | | [optional] + +## Methods + +### NewRepositoryConfigurationAccessKeyDto + +`func NewRepositoryConfigurationAccessKeyDto() *RepositoryConfigurationAccessKeyDto` + +NewRepositoryConfigurationAccessKeyDto instantiates a new RepositoryConfigurationAccessKeyDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRepositoryConfigurationAccessKeyDtoWithDefaults + +`func NewRepositoryConfigurationAccessKeyDtoWithDefaults() *RepositoryConfigurationAccessKeyDto` + +NewRepositoryConfigurationAccessKeyDtoWithDefaults instantiates a new RepositoryConfigurationAccessKeyDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetKey + +`func (o *RepositoryConfigurationAccessKeyDto) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *RepositoryConfigurationAccessKeyDto) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *RepositoryConfigurationAccessKeyDto) SetKey(v string)` + +SetKey sets Key field to given value. + +### HasKey + +`func (o *RepositoryConfigurationAccessKeyDto) HasKey() bool` + +HasKey returns a boolean if a field has been set. + +### GetData + +`func (o *RepositoryConfigurationAccessKeyDto) GetData() string` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RepositoryConfigurationAccessKeyDto) GetDataOk() (*string, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *RepositoryConfigurationAccessKeyDto) SetData(v string)` + +SetData sets Data field to given value. + +### HasData + +`func (o *RepositoryConfigurationAccessKeyDto) HasData() bool` + +HasData returns a boolean if a field has been set. + +### GetPermission + +`func (o *RepositoryConfigurationAccessKeyDto) GetPermission() string` + +GetPermission returns the Permission field if non-nil, zero value otherwise. + +### GetPermissionOk + +`func (o *RepositoryConfigurationAccessKeyDto) GetPermissionOk() (*string, bool)` + +GetPermissionOk returns a tuple with the Permission field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPermission + +`func (o *RepositoryConfigurationAccessKeyDto) SetPermission(v string)` + +SetPermission sets Permission field to given value. + +### HasPermission + +`func (o *RepositoryConfigurationAccessKeyDto) HasPermission() bool` + +HasPermission returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepositoryConfigurationDefaultTaskDto.md b/docs/RepositoryConfigurationDefaultTaskDto.md new file mode 100644 index 0000000..0a8c201 --- /dev/null +++ b/docs/RepositoryConfigurationDefaultTaskDto.md @@ -0,0 +1,51 @@ +# RepositoryConfigurationDefaultTaskDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Text** | **string** | | + +## Methods + +### NewRepositoryConfigurationDefaultTaskDto + +`func NewRepositoryConfigurationDefaultTaskDto(text string, ) *RepositoryConfigurationDefaultTaskDto` + +NewRepositoryConfigurationDefaultTaskDto instantiates a new RepositoryConfigurationDefaultTaskDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRepositoryConfigurationDefaultTaskDtoWithDefaults + +`func NewRepositoryConfigurationDefaultTaskDtoWithDefaults() *RepositoryConfigurationDefaultTaskDto` + +NewRepositoryConfigurationDefaultTaskDtoWithDefaults instantiates a new RepositoryConfigurationDefaultTaskDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetText + +`func (o *RepositoryConfigurationDefaultTaskDto) GetText() string` + +GetText returns the Text field if non-nil, zero value otherwise. + +### GetTextOk + +`func (o *RepositoryConfigurationDefaultTaskDto) GetTextOk() (*string, bool)` + +GetTextOk returns a tuple with the Text field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetText + +`func (o *RepositoryConfigurationDefaultTaskDto) SetText(v string)` + +SetText sets Text field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepositoryConfigurationDto.md b/docs/RepositoryConfigurationDto.md new file mode 100644 index 0000000..c43f8bd --- /dev/null +++ b/docs/RepositoryConfigurationDto.md @@ -0,0 +1,602 @@ +# RepositoryConfigurationDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessKeys** | Pointer to [**[]RepositoryConfigurationAccessKeyDto**](RepositoryConfigurationAccessKeyDto.md) | Ssh-Keys configured on the repository. | [optional] +**MergeConfig** | Pointer to [**RepositoryConfigurationDtoMergeConfig**](RepositoryConfigurationDtoMergeConfig.md) | | [optional] +**DefaultTasks** | Pointer to [**[]RepositoryConfigurationDefaultTaskDto**](RepositoryConfigurationDefaultTaskDto.md) | | [optional] +**BranchNameRegex** | Pointer to **string** | Use an explicit branch name regex. | [optional] +**CommitMessageRegex** | Pointer to **string** | Use an explicit commit message regex. | [optional] +**CommitMessageType** | Pointer to **string** | Adds a corresponding commit message regex. | [optional] +**RequireSuccessfulBuilds** | Pointer to **int32** | Set the required successful builds counter. | [optional] +**RequireApprovals** | Pointer to **int32** | Set the required approvals counter. | [optional] +**ExcludeMergeCommits** | Pointer to **bool** | Exclude merge commits from commit checks. | [optional] +**ExcludeMergeCheckUsers** | Pointer to [**[]ExcludeMergeCheckUserDto**](ExcludeMergeCheckUserDto.md) | Exclude users from commit checks. | [optional] +**Webhooks** | Pointer to [**RepositoryConfigurationWebhooksDto**](RepositoryConfigurationWebhooksDto.md) | | [optional] +**Approvers** | Pointer to **map[string][]string** | Map of string (group name e.g. some-owner) of strings (list of approvers), one approval for each group is required. | [optional] +**RawApprovers** | Pointer to **map[string][]string** | Raw data of approvers | [optional] +**Watchers** | Pointer to **[]string** | List of strings (list of watchers, either usernames or group identifier), which are added as reviewers but require no approval. | [optional] +**RawWatchers** | Pointer to **[]string** | Raw data of watchers | [optional] +**Archived** | Pointer to **bool** | Moves the repository into the archive. | [optional] +**Unmanaged** | Pointer to **bool** | Repository will not be configured, also not archived. | [optional] +**RefProtections** | Pointer to [**RefProtections**](RefProtections.md) | | [optional] +**PullRequests** | Pointer to [**PullRequests**](PullRequests.md) | | [optional] +**RequireIssue** | Pointer to **bool** | Configures JQL matcher with query: issuetype in (Story, Bug) AND 'Risk Level' is not EMPTY | [optional] +**RequireConditions** | Pointer to [**map[string]ConditionReferenceDto**](ConditionReferenceDto.md) | Configuration of conditional builds as map of structs (key name e.g. some-key) of target references. | [optional] +**ActionsAccess** | Pointer to **string** | Control how the repository is used by GitHub Actions workflows in other repositories | [optional] + +## Methods + +### NewRepositoryConfigurationDto + +`func NewRepositoryConfigurationDto() *RepositoryConfigurationDto` + +NewRepositoryConfigurationDto instantiates a new RepositoryConfigurationDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRepositoryConfigurationDtoWithDefaults + +`func NewRepositoryConfigurationDtoWithDefaults() *RepositoryConfigurationDto` + +NewRepositoryConfigurationDtoWithDefaults instantiates a new RepositoryConfigurationDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccessKeys + +`func (o *RepositoryConfigurationDto) GetAccessKeys() []RepositoryConfigurationAccessKeyDto` + +GetAccessKeys returns the AccessKeys field if non-nil, zero value otherwise. + +### GetAccessKeysOk + +`func (o *RepositoryConfigurationDto) GetAccessKeysOk() (*[]RepositoryConfigurationAccessKeyDto, bool)` + +GetAccessKeysOk returns a tuple with the AccessKeys field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessKeys + +`func (o *RepositoryConfigurationDto) SetAccessKeys(v []RepositoryConfigurationAccessKeyDto)` + +SetAccessKeys sets AccessKeys field to given value. + +### HasAccessKeys + +`func (o *RepositoryConfigurationDto) HasAccessKeys() bool` + +HasAccessKeys returns a boolean if a field has been set. + +### GetMergeConfig + +`func (o *RepositoryConfigurationDto) GetMergeConfig() RepositoryConfigurationDtoMergeConfig` + +GetMergeConfig returns the MergeConfig field if non-nil, zero value otherwise. + +### GetMergeConfigOk + +`func (o *RepositoryConfigurationDto) GetMergeConfigOk() (*RepositoryConfigurationDtoMergeConfig, bool)` + +GetMergeConfigOk returns a tuple with the MergeConfig field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMergeConfig + +`func (o *RepositoryConfigurationDto) SetMergeConfig(v RepositoryConfigurationDtoMergeConfig)` + +SetMergeConfig sets MergeConfig field to given value. + +### HasMergeConfig + +`func (o *RepositoryConfigurationDto) HasMergeConfig() bool` + +HasMergeConfig returns a boolean if a field has been set. + +### GetDefaultTasks + +`func (o *RepositoryConfigurationDto) GetDefaultTasks() []RepositoryConfigurationDefaultTaskDto` + +GetDefaultTasks returns the DefaultTasks field if non-nil, zero value otherwise. + +### GetDefaultTasksOk + +`func (o *RepositoryConfigurationDto) GetDefaultTasksOk() (*[]RepositoryConfigurationDefaultTaskDto, bool)` + +GetDefaultTasksOk returns a tuple with the DefaultTasks field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultTasks + +`func (o *RepositoryConfigurationDto) SetDefaultTasks(v []RepositoryConfigurationDefaultTaskDto)` + +SetDefaultTasks sets DefaultTasks field to given value. + +### HasDefaultTasks + +`func (o *RepositoryConfigurationDto) HasDefaultTasks() bool` + +HasDefaultTasks returns a boolean if a field has been set. + +### GetBranchNameRegex + +`func (o *RepositoryConfigurationDto) GetBranchNameRegex() string` + +GetBranchNameRegex returns the BranchNameRegex field if non-nil, zero value otherwise. + +### GetBranchNameRegexOk + +`func (o *RepositoryConfigurationDto) GetBranchNameRegexOk() (*string, bool)` + +GetBranchNameRegexOk returns a tuple with the BranchNameRegex field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBranchNameRegex + +`func (o *RepositoryConfigurationDto) SetBranchNameRegex(v string)` + +SetBranchNameRegex sets BranchNameRegex field to given value. + +### HasBranchNameRegex + +`func (o *RepositoryConfigurationDto) HasBranchNameRegex() bool` + +HasBranchNameRegex returns a boolean if a field has been set. + +### GetCommitMessageRegex + +`func (o *RepositoryConfigurationDto) GetCommitMessageRegex() string` + +GetCommitMessageRegex returns the CommitMessageRegex field if non-nil, zero value otherwise. + +### GetCommitMessageRegexOk + +`func (o *RepositoryConfigurationDto) GetCommitMessageRegexOk() (*string, bool)` + +GetCommitMessageRegexOk returns a tuple with the CommitMessageRegex field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommitMessageRegex + +`func (o *RepositoryConfigurationDto) SetCommitMessageRegex(v string)` + +SetCommitMessageRegex sets CommitMessageRegex field to given value. + +### HasCommitMessageRegex + +`func (o *RepositoryConfigurationDto) HasCommitMessageRegex() bool` + +HasCommitMessageRegex returns a boolean if a field has been set. + +### GetCommitMessageType + +`func (o *RepositoryConfigurationDto) GetCommitMessageType() string` + +GetCommitMessageType returns the CommitMessageType field if non-nil, zero value otherwise. + +### GetCommitMessageTypeOk + +`func (o *RepositoryConfigurationDto) GetCommitMessageTypeOk() (*string, bool)` + +GetCommitMessageTypeOk returns a tuple with the CommitMessageType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommitMessageType + +`func (o *RepositoryConfigurationDto) SetCommitMessageType(v string)` + +SetCommitMessageType sets CommitMessageType field to given value. + +### HasCommitMessageType + +`func (o *RepositoryConfigurationDto) HasCommitMessageType() bool` + +HasCommitMessageType returns a boolean if a field has been set. + +### GetRequireSuccessfulBuilds + +`func (o *RepositoryConfigurationDto) GetRequireSuccessfulBuilds() int32` + +GetRequireSuccessfulBuilds returns the RequireSuccessfulBuilds field if non-nil, zero value otherwise. + +### GetRequireSuccessfulBuildsOk + +`func (o *RepositoryConfigurationDto) GetRequireSuccessfulBuildsOk() (*int32, bool)` + +GetRequireSuccessfulBuildsOk returns a tuple with the RequireSuccessfulBuilds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequireSuccessfulBuilds + +`func (o *RepositoryConfigurationDto) SetRequireSuccessfulBuilds(v int32)` + +SetRequireSuccessfulBuilds sets RequireSuccessfulBuilds field to given value. + +### HasRequireSuccessfulBuilds + +`func (o *RepositoryConfigurationDto) HasRequireSuccessfulBuilds() bool` + +HasRequireSuccessfulBuilds returns a boolean if a field has been set. + +### GetRequireApprovals + +`func (o *RepositoryConfigurationDto) GetRequireApprovals() int32` + +GetRequireApprovals returns the RequireApprovals field if non-nil, zero value otherwise. + +### GetRequireApprovalsOk + +`func (o *RepositoryConfigurationDto) GetRequireApprovalsOk() (*int32, bool)` + +GetRequireApprovalsOk returns a tuple with the RequireApprovals field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequireApprovals + +`func (o *RepositoryConfigurationDto) SetRequireApprovals(v int32)` + +SetRequireApprovals sets RequireApprovals field to given value. + +### HasRequireApprovals + +`func (o *RepositoryConfigurationDto) HasRequireApprovals() bool` + +HasRequireApprovals returns a boolean if a field has been set. + +### GetExcludeMergeCommits + +`func (o *RepositoryConfigurationDto) GetExcludeMergeCommits() bool` + +GetExcludeMergeCommits returns the ExcludeMergeCommits field if non-nil, zero value otherwise. + +### GetExcludeMergeCommitsOk + +`func (o *RepositoryConfigurationDto) GetExcludeMergeCommitsOk() (*bool, bool)` + +GetExcludeMergeCommitsOk returns a tuple with the ExcludeMergeCommits field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExcludeMergeCommits + +`func (o *RepositoryConfigurationDto) SetExcludeMergeCommits(v bool)` + +SetExcludeMergeCommits sets ExcludeMergeCommits field to given value. + +### HasExcludeMergeCommits + +`func (o *RepositoryConfigurationDto) HasExcludeMergeCommits() bool` + +HasExcludeMergeCommits returns a boolean if a field has been set. + +### GetExcludeMergeCheckUsers + +`func (o *RepositoryConfigurationDto) GetExcludeMergeCheckUsers() []ExcludeMergeCheckUserDto` + +GetExcludeMergeCheckUsers returns the ExcludeMergeCheckUsers field if non-nil, zero value otherwise. + +### GetExcludeMergeCheckUsersOk + +`func (o *RepositoryConfigurationDto) GetExcludeMergeCheckUsersOk() (*[]ExcludeMergeCheckUserDto, bool)` + +GetExcludeMergeCheckUsersOk returns a tuple with the ExcludeMergeCheckUsers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExcludeMergeCheckUsers + +`func (o *RepositoryConfigurationDto) SetExcludeMergeCheckUsers(v []ExcludeMergeCheckUserDto)` + +SetExcludeMergeCheckUsers sets ExcludeMergeCheckUsers field to given value. + +### HasExcludeMergeCheckUsers + +`func (o *RepositoryConfigurationDto) HasExcludeMergeCheckUsers() bool` + +HasExcludeMergeCheckUsers returns a boolean if a field has been set. + +### GetWebhooks + +`func (o *RepositoryConfigurationDto) GetWebhooks() RepositoryConfigurationWebhooksDto` + +GetWebhooks returns the Webhooks field if non-nil, zero value otherwise. + +### GetWebhooksOk + +`func (o *RepositoryConfigurationDto) GetWebhooksOk() (*RepositoryConfigurationWebhooksDto, bool)` + +GetWebhooksOk returns a tuple with the Webhooks field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWebhooks + +`func (o *RepositoryConfigurationDto) SetWebhooks(v RepositoryConfigurationWebhooksDto)` + +SetWebhooks sets Webhooks field to given value. + +### HasWebhooks + +`func (o *RepositoryConfigurationDto) HasWebhooks() bool` + +HasWebhooks returns a boolean if a field has been set. + +### GetApprovers + +`func (o *RepositoryConfigurationDto) GetApprovers() map[string][]string` + +GetApprovers returns the Approvers field if non-nil, zero value otherwise. + +### GetApproversOk + +`func (o *RepositoryConfigurationDto) GetApproversOk() (*map[string][]string, bool)` + +GetApproversOk returns a tuple with the Approvers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApprovers + +`func (o *RepositoryConfigurationDto) SetApprovers(v map[string][]string)` + +SetApprovers sets Approvers field to given value. + +### HasApprovers + +`func (o *RepositoryConfigurationDto) HasApprovers() bool` + +HasApprovers returns a boolean if a field has been set. + +### GetRawApprovers + +`func (o *RepositoryConfigurationDto) GetRawApprovers() map[string][]string` + +GetRawApprovers returns the RawApprovers field if non-nil, zero value otherwise. + +### GetRawApproversOk + +`func (o *RepositoryConfigurationDto) GetRawApproversOk() (*map[string][]string, bool)` + +GetRawApproversOk returns a tuple with the RawApprovers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRawApprovers + +`func (o *RepositoryConfigurationDto) SetRawApprovers(v map[string][]string)` + +SetRawApprovers sets RawApprovers field to given value. + +### HasRawApprovers + +`func (o *RepositoryConfigurationDto) HasRawApprovers() bool` + +HasRawApprovers returns a boolean if a field has been set. + +### GetWatchers + +`func (o *RepositoryConfigurationDto) GetWatchers() []string` + +GetWatchers returns the Watchers field if non-nil, zero value otherwise. + +### GetWatchersOk + +`func (o *RepositoryConfigurationDto) GetWatchersOk() (*[]string, bool)` + +GetWatchersOk returns a tuple with the Watchers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWatchers + +`func (o *RepositoryConfigurationDto) SetWatchers(v []string)` + +SetWatchers sets Watchers field to given value. + +### HasWatchers + +`func (o *RepositoryConfigurationDto) HasWatchers() bool` + +HasWatchers returns a boolean if a field has been set. + +### GetRawWatchers + +`func (o *RepositoryConfigurationDto) GetRawWatchers() []string` + +GetRawWatchers returns the RawWatchers field if non-nil, zero value otherwise. + +### GetRawWatchersOk + +`func (o *RepositoryConfigurationDto) GetRawWatchersOk() (*[]string, bool)` + +GetRawWatchersOk returns a tuple with the RawWatchers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRawWatchers + +`func (o *RepositoryConfigurationDto) SetRawWatchers(v []string)` + +SetRawWatchers sets RawWatchers field to given value. + +### HasRawWatchers + +`func (o *RepositoryConfigurationDto) HasRawWatchers() bool` + +HasRawWatchers returns a boolean if a field has been set. + +### GetArchived + +`func (o *RepositoryConfigurationDto) GetArchived() bool` + +GetArchived returns the Archived field if non-nil, zero value otherwise. + +### GetArchivedOk + +`func (o *RepositoryConfigurationDto) GetArchivedOk() (*bool, bool)` + +GetArchivedOk returns a tuple with the Archived field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArchived + +`func (o *RepositoryConfigurationDto) SetArchived(v bool)` + +SetArchived sets Archived field to given value. + +### HasArchived + +`func (o *RepositoryConfigurationDto) HasArchived() bool` + +HasArchived returns a boolean if a field has been set. + +### GetUnmanaged + +`func (o *RepositoryConfigurationDto) GetUnmanaged() bool` + +GetUnmanaged returns the Unmanaged field if non-nil, zero value otherwise. + +### GetUnmanagedOk + +`func (o *RepositoryConfigurationDto) GetUnmanagedOk() (*bool, bool)` + +GetUnmanagedOk returns a tuple with the Unmanaged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUnmanaged + +`func (o *RepositoryConfigurationDto) SetUnmanaged(v bool)` + +SetUnmanaged sets Unmanaged field to given value. + +### HasUnmanaged + +`func (o *RepositoryConfigurationDto) HasUnmanaged() bool` + +HasUnmanaged returns a boolean if a field has been set. + +### GetRefProtections + +`func (o *RepositoryConfigurationDto) GetRefProtections() RefProtections` + +GetRefProtections returns the RefProtections field if non-nil, zero value otherwise. + +### GetRefProtectionsOk + +`func (o *RepositoryConfigurationDto) GetRefProtectionsOk() (*RefProtections, bool)` + +GetRefProtectionsOk returns a tuple with the RefProtections field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefProtections + +`func (o *RepositoryConfigurationDto) SetRefProtections(v RefProtections)` + +SetRefProtections sets RefProtections field to given value. + +### HasRefProtections + +`func (o *RepositoryConfigurationDto) HasRefProtections() bool` + +HasRefProtections returns a boolean if a field has been set. + +### GetPullRequests + +`func (o *RepositoryConfigurationDto) GetPullRequests() PullRequests` + +GetPullRequests returns the PullRequests field if non-nil, zero value otherwise. + +### GetPullRequestsOk + +`func (o *RepositoryConfigurationDto) GetPullRequestsOk() (*PullRequests, bool)` + +GetPullRequestsOk returns a tuple with the PullRequests field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPullRequests + +`func (o *RepositoryConfigurationDto) SetPullRequests(v PullRequests)` + +SetPullRequests sets PullRequests field to given value. + +### HasPullRequests + +`func (o *RepositoryConfigurationDto) HasPullRequests() bool` + +HasPullRequests returns a boolean if a field has been set. + +### GetRequireIssue + +`func (o *RepositoryConfigurationDto) GetRequireIssue() bool` + +GetRequireIssue returns the RequireIssue field if non-nil, zero value otherwise. + +### GetRequireIssueOk + +`func (o *RepositoryConfigurationDto) GetRequireIssueOk() (*bool, bool)` + +GetRequireIssueOk returns a tuple with the RequireIssue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequireIssue + +`func (o *RepositoryConfigurationDto) SetRequireIssue(v bool)` + +SetRequireIssue sets RequireIssue field to given value. + +### HasRequireIssue + +`func (o *RepositoryConfigurationDto) HasRequireIssue() bool` + +HasRequireIssue returns a boolean if a field has been set. + +### GetRequireConditions + +`func (o *RepositoryConfigurationDto) GetRequireConditions() map[string]ConditionReferenceDto` + +GetRequireConditions returns the RequireConditions field if non-nil, zero value otherwise. + +### GetRequireConditionsOk + +`func (o *RepositoryConfigurationDto) GetRequireConditionsOk() (*map[string]ConditionReferenceDto, bool)` + +GetRequireConditionsOk returns a tuple with the RequireConditions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequireConditions + +`func (o *RepositoryConfigurationDto) SetRequireConditions(v map[string]ConditionReferenceDto)` + +SetRequireConditions sets RequireConditions field to given value. + +### HasRequireConditions + +`func (o *RepositoryConfigurationDto) HasRequireConditions() bool` + +HasRequireConditions returns a boolean if a field has been set. + +### GetActionsAccess + +`func (o *RepositoryConfigurationDto) GetActionsAccess() string` + +GetActionsAccess returns the ActionsAccess field if non-nil, zero value otherwise. + +### GetActionsAccessOk + +`func (o *RepositoryConfigurationDto) GetActionsAccessOk() (*string, bool)` + +GetActionsAccessOk returns a tuple with the ActionsAccess field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActionsAccess + +`func (o *RepositoryConfigurationDto) SetActionsAccess(v string)` + +SetActionsAccess sets ActionsAccess field to given value. + +### HasActionsAccess + +`func (o *RepositoryConfigurationDto) HasActionsAccess() bool` + +HasActionsAccess returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepositoryConfigurationDtoMergeConfig.md b/docs/RepositoryConfigurationDtoMergeConfig.md new file mode 100644 index 0000000..15cf39f --- /dev/null +++ b/docs/RepositoryConfigurationDtoMergeConfig.md @@ -0,0 +1,82 @@ +# RepositoryConfigurationDtoMergeConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DefaultStrategy** | Pointer to [**MergeStrategy**](MergeStrategy.md) | | [optional] +**Strategies** | Pointer to [**[]MergeStrategy**](MergeStrategy.md) | | [optional] + +## Methods + +### NewRepositoryConfigurationDtoMergeConfig + +`func NewRepositoryConfigurationDtoMergeConfig() *RepositoryConfigurationDtoMergeConfig` + +NewRepositoryConfigurationDtoMergeConfig instantiates a new RepositoryConfigurationDtoMergeConfig object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRepositoryConfigurationDtoMergeConfigWithDefaults + +`func NewRepositoryConfigurationDtoMergeConfigWithDefaults() *RepositoryConfigurationDtoMergeConfig` + +NewRepositoryConfigurationDtoMergeConfigWithDefaults instantiates a new RepositoryConfigurationDtoMergeConfig object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDefaultStrategy + +`func (o *RepositoryConfigurationDtoMergeConfig) GetDefaultStrategy() MergeStrategy` + +GetDefaultStrategy returns the DefaultStrategy field if non-nil, zero value otherwise. + +### GetDefaultStrategyOk + +`func (o *RepositoryConfigurationDtoMergeConfig) GetDefaultStrategyOk() (*MergeStrategy, bool)` + +GetDefaultStrategyOk returns a tuple with the DefaultStrategy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultStrategy + +`func (o *RepositoryConfigurationDtoMergeConfig) SetDefaultStrategy(v MergeStrategy)` + +SetDefaultStrategy sets DefaultStrategy field to given value. + +### HasDefaultStrategy + +`func (o *RepositoryConfigurationDtoMergeConfig) HasDefaultStrategy() bool` + +HasDefaultStrategy returns a boolean if a field has been set. + +### GetStrategies + +`func (o *RepositoryConfigurationDtoMergeConfig) GetStrategies() []MergeStrategy` + +GetStrategies returns the Strategies field if non-nil, zero value otherwise. + +### GetStrategiesOk + +`func (o *RepositoryConfigurationDtoMergeConfig) GetStrategiesOk() (*[]MergeStrategy, bool)` + +GetStrategiesOk returns a tuple with the Strategies field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStrategies + +`func (o *RepositoryConfigurationDtoMergeConfig) SetStrategies(v []MergeStrategy)` + +SetStrategies sets Strategies field to given value. + +### HasStrategies + +`func (o *RepositoryConfigurationDtoMergeConfig) HasStrategies() bool` + +HasStrategies returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepositoryConfigurationPatchDto.md b/docs/RepositoryConfigurationPatchDto.md new file mode 100644 index 0000000..d24b3cf --- /dev/null +++ b/docs/RepositoryConfigurationPatchDto.md @@ -0,0 +1,550 @@ +# RepositoryConfigurationPatchDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessKeys** | Pointer to [**[]RepositoryConfigurationAccessKeyDto**](RepositoryConfigurationAccessKeyDto.md) | Ssh-Keys configured on the repository. | [optional] +**MergeConfig** | Pointer to [**RepositoryConfigurationDtoMergeConfig**](RepositoryConfigurationDtoMergeConfig.md) | | [optional] +**DefaultTasks** | Pointer to [**[]RepositoryConfigurationDefaultTaskDto**](RepositoryConfigurationDefaultTaskDto.md) | | [optional] +**BranchNameRegex** | Pointer to **string** | Use an explicit branch name regex. | [optional] +**CommitMessageRegex** | Pointer to **string** | Use an explicit commit message regex. | [optional] +**CommitMessageType** | Pointer to **string** | Adds a corresponding commit message regex. | [optional] +**RequireSuccessfulBuilds** | Pointer to **int32** | Set the required successful builds counter. | [optional] +**RequireApprovals** | Pointer to **int32** | Set the required approvals counter. | [optional] +**ExcludeMergeCommits** | Pointer to **bool** | Exclude merge commits from commit checks. | [optional] +**ExcludeMergeCheckUsers** | Pointer to [**[]ExcludeMergeCheckUserDto**](ExcludeMergeCheckUserDto.md) | Exclude users from commit checks. | [optional] +**Webhooks** | Pointer to [**RepositoryConfigurationWebhooksDto**](RepositoryConfigurationWebhooksDto.md) | | [optional] +**Approvers** | Pointer to **map[string][]string** | Map of string (group name e.g. some-owner) of strings (list of approvers), one approval for each group is required. | [optional] +**Watchers** | Pointer to **[]string** | List of strings (list of watchers, either usernames or group identifier), which are added as reviewers but require no approval. | [optional] +**Archived** | Pointer to **bool** | Moves the repository into the archive. | [optional] +**Unmanaged** | Pointer to **bool** | Repository will not be configured, also not archived. | [optional] +**RefProtections** | Pointer to [**RefProtections**](RefProtections.md) | | [optional] +**RequireIssue** | Pointer to **bool** | Configures JQL matcher with query: issuetype in (Story, Bug) AND 'Risk Level' is not EMPTY | [optional] +**RequireConditions** | Pointer to [**map[string]ConditionReferenceDto**](ConditionReferenceDto.md) | Configuration of conditional builds as map of structs (key name e.g. some-key) of target references. | [optional] +**ActionsAccess** | Pointer to **string** | Control how the repository is used by GitHub Actions workflows in other repositories | [optional] +**PullRequests** | Pointer to [**PullRequests**](PullRequests.md) | | [optional] + +## Methods + +### NewRepositoryConfigurationPatchDto + +`func NewRepositoryConfigurationPatchDto() *RepositoryConfigurationPatchDto` + +NewRepositoryConfigurationPatchDto instantiates a new RepositoryConfigurationPatchDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRepositoryConfigurationPatchDtoWithDefaults + +`func NewRepositoryConfigurationPatchDtoWithDefaults() *RepositoryConfigurationPatchDto` + +NewRepositoryConfigurationPatchDtoWithDefaults instantiates a new RepositoryConfigurationPatchDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccessKeys + +`func (o *RepositoryConfigurationPatchDto) GetAccessKeys() []RepositoryConfigurationAccessKeyDto` + +GetAccessKeys returns the AccessKeys field if non-nil, zero value otherwise. + +### GetAccessKeysOk + +`func (o *RepositoryConfigurationPatchDto) GetAccessKeysOk() (*[]RepositoryConfigurationAccessKeyDto, bool)` + +GetAccessKeysOk returns a tuple with the AccessKeys field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessKeys + +`func (o *RepositoryConfigurationPatchDto) SetAccessKeys(v []RepositoryConfigurationAccessKeyDto)` + +SetAccessKeys sets AccessKeys field to given value. + +### HasAccessKeys + +`func (o *RepositoryConfigurationPatchDto) HasAccessKeys() bool` + +HasAccessKeys returns a boolean if a field has been set. + +### GetMergeConfig + +`func (o *RepositoryConfigurationPatchDto) GetMergeConfig() RepositoryConfigurationDtoMergeConfig` + +GetMergeConfig returns the MergeConfig field if non-nil, zero value otherwise. + +### GetMergeConfigOk + +`func (o *RepositoryConfigurationPatchDto) GetMergeConfigOk() (*RepositoryConfigurationDtoMergeConfig, bool)` + +GetMergeConfigOk returns a tuple with the MergeConfig field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMergeConfig + +`func (o *RepositoryConfigurationPatchDto) SetMergeConfig(v RepositoryConfigurationDtoMergeConfig)` + +SetMergeConfig sets MergeConfig field to given value. + +### HasMergeConfig + +`func (o *RepositoryConfigurationPatchDto) HasMergeConfig() bool` + +HasMergeConfig returns a boolean if a field has been set. + +### GetDefaultTasks + +`func (o *RepositoryConfigurationPatchDto) GetDefaultTasks() []RepositoryConfigurationDefaultTaskDto` + +GetDefaultTasks returns the DefaultTasks field if non-nil, zero value otherwise. + +### GetDefaultTasksOk + +`func (o *RepositoryConfigurationPatchDto) GetDefaultTasksOk() (*[]RepositoryConfigurationDefaultTaskDto, bool)` + +GetDefaultTasksOk returns a tuple with the DefaultTasks field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultTasks + +`func (o *RepositoryConfigurationPatchDto) SetDefaultTasks(v []RepositoryConfigurationDefaultTaskDto)` + +SetDefaultTasks sets DefaultTasks field to given value. + +### HasDefaultTasks + +`func (o *RepositoryConfigurationPatchDto) HasDefaultTasks() bool` + +HasDefaultTasks returns a boolean if a field has been set. + +### GetBranchNameRegex + +`func (o *RepositoryConfigurationPatchDto) GetBranchNameRegex() string` + +GetBranchNameRegex returns the BranchNameRegex field if non-nil, zero value otherwise. + +### GetBranchNameRegexOk + +`func (o *RepositoryConfigurationPatchDto) GetBranchNameRegexOk() (*string, bool)` + +GetBranchNameRegexOk returns a tuple with the BranchNameRegex field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBranchNameRegex + +`func (o *RepositoryConfigurationPatchDto) SetBranchNameRegex(v string)` + +SetBranchNameRegex sets BranchNameRegex field to given value. + +### HasBranchNameRegex + +`func (o *RepositoryConfigurationPatchDto) HasBranchNameRegex() bool` + +HasBranchNameRegex returns a boolean if a field has been set. + +### GetCommitMessageRegex + +`func (o *RepositoryConfigurationPatchDto) GetCommitMessageRegex() string` + +GetCommitMessageRegex returns the CommitMessageRegex field if non-nil, zero value otherwise. + +### GetCommitMessageRegexOk + +`func (o *RepositoryConfigurationPatchDto) GetCommitMessageRegexOk() (*string, bool)` + +GetCommitMessageRegexOk returns a tuple with the CommitMessageRegex field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommitMessageRegex + +`func (o *RepositoryConfigurationPatchDto) SetCommitMessageRegex(v string)` + +SetCommitMessageRegex sets CommitMessageRegex field to given value. + +### HasCommitMessageRegex + +`func (o *RepositoryConfigurationPatchDto) HasCommitMessageRegex() bool` + +HasCommitMessageRegex returns a boolean if a field has been set. + +### GetCommitMessageType + +`func (o *RepositoryConfigurationPatchDto) GetCommitMessageType() string` + +GetCommitMessageType returns the CommitMessageType field if non-nil, zero value otherwise. + +### GetCommitMessageTypeOk + +`func (o *RepositoryConfigurationPatchDto) GetCommitMessageTypeOk() (*string, bool)` + +GetCommitMessageTypeOk returns a tuple with the CommitMessageType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommitMessageType + +`func (o *RepositoryConfigurationPatchDto) SetCommitMessageType(v string)` + +SetCommitMessageType sets CommitMessageType field to given value. + +### HasCommitMessageType + +`func (o *RepositoryConfigurationPatchDto) HasCommitMessageType() bool` + +HasCommitMessageType returns a boolean if a field has been set. + +### GetRequireSuccessfulBuilds + +`func (o *RepositoryConfigurationPatchDto) GetRequireSuccessfulBuilds() int32` + +GetRequireSuccessfulBuilds returns the RequireSuccessfulBuilds field if non-nil, zero value otherwise. + +### GetRequireSuccessfulBuildsOk + +`func (o *RepositoryConfigurationPatchDto) GetRequireSuccessfulBuildsOk() (*int32, bool)` + +GetRequireSuccessfulBuildsOk returns a tuple with the RequireSuccessfulBuilds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequireSuccessfulBuilds + +`func (o *RepositoryConfigurationPatchDto) SetRequireSuccessfulBuilds(v int32)` + +SetRequireSuccessfulBuilds sets RequireSuccessfulBuilds field to given value. + +### HasRequireSuccessfulBuilds + +`func (o *RepositoryConfigurationPatchDto) HasRequireSuccessfulBuilds() bool` + +HasRequireSuccessfulBuilds returns a boolean if a field has been set. + +### GetRequireApprovals + +`func (o *RepositoryConfigurationPatchDto) GetRequireApprovals() int32` + +GetRequireApprovals returns the RequireApprovals field if non-nil, zero value otherwise. + +### GetRequireApprovalsOk + +`func (o *RepositoryConfigurationPatchDto) GetRequireApprovalsOk() (*int32, bool)` + +GetRequireApprovalsOk returns a tuple with the RequireApprovals field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequireApprovals + +`func (o *RepositoryConfigurationPatchDto) SetRequireApprovals(v int32)` + +SetRequireApprovals sets RequireApprovals field to given value. + +### HasRequireApprovals + +`func (o *RepositoryConfigurationPatchDto) HasRequireApprovals() bool` + +HasRequireApprovals returns a boolean if a field has been set. + +### GetExcludeMergeCommits + +`func (o *RepositoryConfigurationPatchDto) GetExcludeMergeCommits() bool` + +GetExcludeMergeCommits returns the ExcludeMergeCommits field if non-nil, zero value otherwise. + +### GetExcludeMergeCommitsOk + +`func (o *RepositoryConfigurationPatchDto) GetExcludeMergeCommitsOk() (*bool, bool)` + +GetExcludeMergeCommitsOk returns a tuple with the ExcludeMergeCommits field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExcludeMergeCommits + +`func (o *RepositoryConfigurationPatchDto) SetExcludeMergeCommits(v bool)` + +SetExcludeMergeCommits sets ExcludeMergeCommits field to given value. + +### HasExcludeMergeCommits + +`func (o *RepositoryConfigurationPatchDto) HasExcludeMergeCommits() bool` + +HasExcludeMergeCommits returns a boolean if a field has been set. + +### GetExcludeMergeCheckUsers + +`func (o *RepositoryConfigurationPatchDto) GetExcludeMergeCheckUsers() []ExcludeMergeCheckUserDto` + +GetExcludeMergeCheckUsers returns the ExcludeMergeCheckUsers field if non-nil, zero value otherwise. + +### GetExcludeMergeCheckUsersOk + +`func (o *RepositoryConfigurationPatchDto) GetExcludeMergeCheckUsersOk() (*[]ExcludeMergeCheckUserDto, bool)` + +GetExcludeMergeCheckUsersOk returns a tuple with the ExcludeMergeCheckUsers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExcludeMergeCheckUsers + +`func (o *RepositoryConfigurationPatchDto) SetExcludeMergeCheckUsers(v []ExcludeMergeCheckUserDto)` + +SetExcludeMergeCheckUsers sets ExcludeMergeCheckUsers field to given value. + +### HasExcludeMergeCheckUsers + +`func (o *RepositoryConfigurationPatchDto) HasExcludeMergeCheckUsers() bool` + +HasExcludeMergeCheckUsers returns a boolean if a field has been set. + +### GetWebhooks + +`func (o *RepositoryConfigurationPatchDto) GetWebhooks() RepositoryConfigurationWebhooksDto` + +GetWebhooks returns the Webhooks field if non-nil, zero value otherwise. + +### GetWebhooksOk + +`func (o *RepositoryConfigurationPatchDto) GetWebhooksOk() (*RepositoryConfigurationWebhooksDto, bool)` + +GetWebhooksOk returns a tuple with the Webhooks field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWebhooks + +`func (o *RepositoryConfigurationPatchDto) SetWebhooks(v RepositoryConfigurationWebhooksDto)` + +SetWebhooks sets Webhooks field to given value. + +### HasWebhooks + +`func (o *RepositoryConfigurationPatchDto) HasWebhooks() bool` + +HasWebhooks returns a boolean if a field has been set. + +### GetApprovers + +`func (o *RepositoryConfigurationPatchDto) GetApprovers() map[string][]string` + +GetApprovers returns the Approvers field if non-nil, zero value otherwise. + +### GetApproversOk + +`func (o *RepositoryConfigurationPatchDto) GetApproversOk() (*map[string][]string, bool)` + +GetApproversOk returns a tuple with the Approvers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApprovers + +`func (o *RepositoryConfigurationPatchDto) SetApprovers(v map[string][]string)` + +SetApprovers sets Approvers field to given value. + +### HasApprovers + +`func (o *RepositoryConfigurationPatchDto) HasApprovers() bool` + +HasApprovers returns a boolean if a field has been set. + +### GetWatchers + +`func (o *RepositoryConfigurationPatchDto) GetWatchers() []string` + +GetWatchers returns the Watchers field if non-nil, zero value otherwise. + +### GetWatchersOk + +`func (o *RepositoryConfigurationPatchDto) GetWatchersOk() (*[]string, bool)` + +GetWatchersOk returns a tuple with the Watchers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWatchers + +`func (o *RepositoryConfigurationPatchDto) SetWatchers(v []string)` + +SetWatchers sets Watchers field to given value. + +### HasWatchers + +`func (o *RepositoryConfigurationPatchDto) HasWatchers() bool` + +HasWatchers returns a boolean if a field has been set. + +### GetArchived + +`func (o *RepositoryConfigurationPatchDto) GetArchived() bool` + +GetArchived returns the Archived field if non-nil, zero value otherwise. + +### GetArchivedOk + +`func (o *RepositoryConfigurationPatchDto) GetArchivedOk() (*bool, bool)` + +GetArchivedOk returns a tuple with the Archived field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArchived + +`func (o *RepositoryConfigurationPatchDto) SetArchived(v bool)` + +SetArchived sets Archived field to given value. + +### HasArchived + +`func (o *RepositoryConfigurationPatchDto) HasArchived() bool` + +HasArchived returns a boolean if a field has been set. + +### GetUnmanaged + +`func (o *RepositoryConfigurationPatchDto) GetUnmanaged() bool` + +GetUnmanaged returns the Unmanaged field if non-nil, zero value otherwise. + +### GetUnmanagedOk + +`func (o *RepositoryConfigurationPatchDto) GetUnmanagedOk() (*bool, bool)` + +GetUnmanagedOk returns a tuple with the Unmanaged field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUnmanaged + +`func (o *RepositoryConfigurationPatchDto) SetUnmanaged(v bool)` + +SetUnmanaged sets Unmanaged field to given value. + +### HasUnmanaged + +`func (o *RepositoryConfigurationPatchDto) HasUnmanaged() bool` + +HasUnmanaged returns a boolean if a field has been set. + +### GetRefProtections + +`func (o *RepositoryConfigurationPatchDto) GetRefProtections() RefProtections` + +GetRefProtections returns the RefProtections field if non-nil, zero value otherwise. + +### GetRefProtectionsOk + +`func (o *RepositoryConfigurationPatchDto) GetRefProtectionsOk() (*RefProtections, bool)` + +GetRefProtectionsOk returns a tuple with the RefProtections field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefProtections + +`func (o *RepositoryConfigurationPatchDto) SetRefProtections(v RefProtections)` + +SetRefProtections sets RefProtections field to given value. + +### HasRefProtections + +`func (o *RepositoryConfigurationPatchDto) HasRefProtections() bool` + +HasRefProtections returns a boolean if a field has been set. + +### GetRequireIssue + +`func (o *RepositoryConfigurationPatchDto) GetRequireIssue() bool` + +GetRequireIssue returns the RequireIssue field if non-nil, zero value otherwise. + +### GetRequireIssueOk + +`func (o *RepositoryConfigurationPatchDto) GetRequireIssueOk() (*bool, bool)` + +GetRequireIssueOk returns a tuple with the RequireIssue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequireIssue + +`func (o *RepositoryConfigurationPatchDto) SetRequireIssue(v bool)` + +SetRequireIssue sets RequireIssue field to given value. + +### HasRequireIssue + +`func (o *RepositoryConfigurationPatchDto) HasRequireIssue() bool` + +HasRequireIssue returns a boolean if a field has been set. + +### GetRequireConditions + +`func (o *RepositoryConfigurationPatchDto) GetRequireConditions() map[string]ConditionReferenceDto` + +GetRequireConditions returns the RequireConditions field if non-nil, zero value otherwise. + +### GetRequireConditionsOk + +`func (o *RepositoryConfigurationPatchDto) GetRequireConditionsOk() (*map[string]ConditionReferenceDto, bool)` + +GetRequireConditionsOk returns a tuple with the RequireConditions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequireConditions + +`func (o *RepositoryConfigurationPatchDto) SetRequireConditions(v map[string]ConditionReferenceDto)` + +SetRequireConditions sets RequireConditions field to given value. + +### HasRequireConditions + +`func (o *RepositoryConfigurationPatchDto) HasRequireConditions() bool` + +HasRequireConditions returns a boolean if a field has been set. + +### GetActionsAccess + +`func (o *RepositoryConfigurationPatchDto) GetActionsAccess() string` + +GetActionsAccess returns the ActionsAccess field if non-nil, zero value otherwise. + +### GetActionsAccessOk + +`func (o *RepositoryConfigurationPatchDto) GetActionsAccessOk() (*string, bool)` + +GetActionsAccessOk returns a tuple with the ActionsAccess field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActionsAccess + +`func (o *RepositoryConfigurationPatchDto) SetActionsAccess(v string)` + +SetActionsAccess sets ActionsAccess field to given value. + +### HasActionsAccess + +`func (o *RepositoryConfigurationPatchDto) HasActionsAccess() bool` + +HasActionsAccess returns a boolean if a field has been set. + +### GetPullRequests + +`func (o *RepositoryConfigurationPatchDto) GetPullRequests() PullRequests` + +GetPullRequests returns the PullRequests field if non-nil, zero value otherwise. + +### GetPullRequestsOk + +`func (o *RepositoryConfigurationPatchDto) GetPullRequestsOk() (*PullRequests, bool)` + +GetPullRequestsOk returns a tuple with the PullRequests field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPullRequests + +`func (o *RepositoryConfigurationPatchDto) SetPullRequests(v PullRequests)` + +SetPullRequests sets PullRequests field to given value. + +### HasPullRequests + +`func (o *RepositoryConfigurationPatchDto) HasPullRequests() bool` + +HasPullRequests returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepositoryConfigurationWebhookDto.md b/docs/RepositoryConfigurationWebhookDto.md new file mode 100644 index 0000000..d4f8e28 --- /dev/null +++ b/docs/RepositoryConfigurationWebhookDto.md @@ -0,0 +1,124 @@ +# RepositoryConfigurationWebhookDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Url** | **string** | | +**Events** | Pointer to **[]string** | Events the webhook should be triggered with. | [optional] +**Configuration** | Pointer to **map[string]string** | | [optional] + +## Methods + +### NewRepositoryConfigurationWebhookDto + +`func NewRepositoryConfigurationWebhookDto(name string, url string, ) *RepositoryConfigurationWebhookDto` + +NewRepositoryConfigurationWebhookDto instantiates a new RepositoryConfigurationWebhookDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRepositoryConfigurationWebhookDtoWithDefaults + +`func NewRepositoryConfigurationWebhookDtoWithDefaults() *RepositoryConfigurationWebhookDto` + +NewRepositoryConfigurationWebhookDtoWithDefaults instantiates a new RepositoryConfigurationWebhookDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *RepositoryConfigurationWebhookDto) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *RepositoryConfigurationWebhookDto) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *RepositoryConfigurationWebhookDto) SetName(v string)` + +SetName sets Name field to given value. + + +### GetUrl + +`func (o *RepositoryConfigurationWebhookDto) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *RepositoryConfigurationWebhookDto) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *RepositoryConfigurationWebhookDto) SetUrl(v string)` + +SetUrl sets Url field to given value. + + +### GetEvents + +`func (o *RepositoryConfigurationWebhookDto) GetEvents() []string` + +GetEvents returns the Events field if non-nil, zero value otherwise. + +### GetEventsOk + +`func (o *RepositoryConfigurationWebhookDto) GetEventsOk() (*[]string, bool)` + +GetEventsOk returns a tuple with the Events field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEvents + +`func (o *RepositoryConfigurationWebhookDto) SetEvents(v []string)` + +SetEvents sets Events field to given value. + +### HasEvents + +`func (o *RepositoryConfigurationWebhookDto) HasEvents() bool` + +HasEvents returns a boolean if a field has been set. + +### GetConfiguration + +`func (o *RepositoryConfigurationWebhookDto) GetConfiguration() map[string]string` + +GetConfiguration returns the Configuration field if non-nil, zero value otherwise. + +### GetConfigurationOk + +`func (o *RepositoryConfigurationWebhookDto) GetConfigurationOk() (*map[string]string, bool)` + +GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfiguration + +`func (o *RepositoryConfigurationWebhookDto) SetConfiguration(v map[string]string)` + +SetConfiguration sets Configuration field to given value. + +### HasConfiguration + +`func (o *RepositoryConfigurationWebhookDto) HasConfiguration() bool` + +HasConfiguration returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepositoryConfigurationWebhooksDto.md b/docs/RepositoryConfigurationWebhooksDto.md new file mode 100644 index 0000000..7298a35 --- /dev/null +++ b/docs/RepositoryConfigurationWebhooksDto.md @@ -0,0 +1,82 @@ +# RepositoryConfigurationWebhooksDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Predefined** | Pointer to **[]string** | List of predefined webhooks | [optional] +**Additional** | Pointer to [**[]RepositoryConfigurationWebhookDto**](RepositoryConfigurationWebhookDto.md) | Additional webhooks to be configured. | [optional] + +## Methods + +### NewRepositoryConfigurationWebhooksDto + +`func NewRepositoryConfigurationWebhooksDto() *RepositoryConfigurationWebhooksDto` + +NewRepositoryConfigurationWebhooksDto instantiates a new RepositoryConfigurationWebhooksDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRepositoryConfigurationWebhooksDtoWithDefaults + +`func NewRepositoryConfigurationWebhooksDtoWithDefaults() *RepositoryConfigurationWebhooksDto` + +NewRepositoryConfigurationWebhooksDtoWithDefaults instantiates a new RepositoryConfigurationWebhooksDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPredefined + +`func (o *RepositoryConfigurationWebhooksDto) GetPredefined() []string` + +GetPredefined returns the Predefined field if non-nil, zero value otherwise. + +### GetPredefinedOk + +`func (o *RepositoryConfigurationWebhooksDto) GetPredefinedOk() (*[]string, bool)` + +GetPredefinedOk returns a tuple with the Predefined field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPredefined + +`func (o *RepositoryConfigurationWebhooksDto) SetPredefined(v []string)` + +SetPredefined sets Predefined field to given value. + +### HasPredefined + +`func (o *RepositoryConfigurationWebhooksDto) HasPredefined() bool` + +HasPredefined returns a boolean if a field has been set. + +### GetAdditional + +`func (o *RepositoryConfigurationWebhooksDto) GetAdditional() []RepositoryConfigurationWebhookDto` + +GetAdditional returns the Additional field if non-nil, zero value otherwise. + +### GetAdditionalOk + +`func (o *RepositoryConfigurationWebhooksDto) GetAdditionalOk() (*[]RepositoryConfigurationWebhookDto, bool)` + +GetAdditionalOk returns a tuple with the Additional field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAdditional + +`func (o *RepositoryConfigurationWebhooksDto) SetAdditional(v []RepositoryConfigurationWebhookDto)` + +SetAdditional sets Additional field to given value. + +### HasAdditional + +`func (o *RepositoryConfigurationWebhooksDto) HasAdditional() bool` + +HasAdditional returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepositoryCreateDto.md b/docs/RepositoryCreateDto.md new file mode 100644 index 0000000..d40bfe6 --- /dev/null +++ b/docs/RepositoryCreateDto.md @@ -0,0 +1,192 @@ +# RepositoryCreateDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Owner** | **string** | The alias of the repository owner | +**Url** | **string** | | +**Mainline** | **string** | | +**Generator** | Pointer to **string** | the generator used for the initial contents of this repository | [optional] +**Configuration** | Pointer to [**RepositoryConfigurationDto**](RepositoryConfigurationDto.md) | | [optional] +**JiraIssue** | **string** | The jira issue to use for committing a change, or the last jira issue used. | +**Labels** | Pointer to **map[string]string** | A map of arbitrary string labels attached to this repository. | [optional] + +## Methods + +### NewRepositoryCreateDto + +`func NewRepositoryCreateDto(owner string, url string, mainline string, jiraIssue string, ) *RepositoryCreateDto` + +NewRepositoryCreateDto instantiates a new RepositoryCreateDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRepositoryCreateDtoWithDefaults + +`func NewRepositoryCreateDtoWithDefaults() *RepositoryCreateDto` + +NewRepositoryCreateDtoWithDefaults instantiates a new RepositoryCreateDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOwner + +`func (o *RepositoryCreateDto) GetOwner() string` + +GetOwner returns the Owner field if non-nil, zero value otherwise. + +### GetOwnerOk + +`func (o *RepositoryCreateDto) GetOwnerOk() (*string, bool)` + +GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwner + +`func (o *RepositoryCreateDto) SetOwner(v string)` + +SetOwner sets Owner field to given value. + + +### GetUrl + +`func (o *RepositoryCreateDto) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *RepositoryCreateDto) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *RepositoryCreateDto) SetUrl(v string)` + +SetUrl sets Url field to given value. + + +### GetMainline + +`func (o *RepositoryCreateDto) GetMainline() string` + +GetMainline returns the Mainline field if non-nil, zero value otherwise. + +### GetMainlineOk + +`func (o *RepositoryCreateDto) GetMainlineOk() (*string, bool)` + +GetMainlineOk returns a tuple with the Mainline field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMainline + +`func (o *RepositoryCreateDto) SetMainline(v string)` + +SetMainline sets Mainline field to given value. + + +### GetGenerator + +`func (o *RepositoryCreateDto) GetGenerator() string` + +GetGenerator returns the Generator field if non-nil, zero value otherwise. + +### GetGeneratorOk + +`func (o *RepositoryCreateDto) GetGeneratorOk() (*string, bool)` + +GetGeneratorOk returns a tuple with the Generator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGenerator + +`func (o *RepositoryCreateDto) SetGenerator(v string)` + +SetGenerator sets Generator field to given value. + +### HasGenerator + +`func (o *RepositoryCreateDto) HasGenerator() bool` + +HasGenerator returns a boolean if a field has been set. + +### GetConfiguration + +`func (o *RepositoryCreateDto) GetConfiguration() RepositoryConfigurationDto` + +GetConfiguration returns the Configuration field if non-nil, zero value otherwise. + +### GetConfigurationOk + +`func (o *RepositoryCreateDto) GetConfigurationOk() (*RepositoryConfigurationDto, bool)` + +GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfiguration + +`func (o *RepositoryCreateDto) SetConfiguration(v RepositoryConfigurationDto)` + +SetConfiguration sets Configuration field to given value. + +### HasConfiguration + +`func (o *RepositoryCreateDto) HasConfiguration() bool` + +HasConfiguration returns a boolean if a field has been set. + +### GetJiraIssue + +`func (o *RepositoryCreateDto) GetJiraIssue() string` + +GetJiraIssue returns the JiraIssue field if non-nil, zero value otherwise. + +### GetJiraIssueOk + +`func (o *RepositoryCreateDto) GetJiraIssueOk() (*string, bool)` + +GetJiraIssueOk returns a tuple with the JiraIssue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJiraIssue + +`func (o *RepositoryCreateDto) SetJiraIssue(v string)` + +SetJiraIssue sets JiraIssue field to given value. + + +### GetLabels + +`func (o *RepositoryCreateDto) GetLabels() map[string]string` + +GetLabels returns the Labels field if non-nil, zero value otherwise. + +### GetLabelsOk + +`func (o *RepositoryCreateDto) GetLabelsOk() (*map[string]string, bool)` + +GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabels + +`func (o *RepositoryCreateDto) SetLabels(v map[string]string)` + +SetLabels sets Labels field to given value. + +### HasLabels + +`func (o *RepositoryCreateDto) HasLabels() bool` + +HasLabels returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepositoryDto.md b/docs/RepositoryDto.md new file mode 100644 index 0000000..d58479e --- /dev/null +++ b/docs/RepositoryDto.md @@ -0,0 +1,286 @@ +# RepositoryDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | The type of the repository as determined by its key. | [optional] +**Owner** | **string** | The alias of the repository owner | +**Description** | Pointer to **string** | | [optional] +**Url** | **string** | | +**Mainline** | **string** | | +**Generator** | Pointer to **string** | the generator used for the initial contents of this repository | [optional] +**Configuration** | Pointer to [**RepositoryConfigurationDto**](RepositoryConfigurationDto.md) | | [optional] +**TimeStamp** | **string** | ISO-8601 UTC date time at which this information was originally committed. When sending an update, include the original timestamp you got so we can detect concurrent updates. | +**CommitHash** | **string** | The git commit hash this information was originally committed under. When sending an update, include the original commitHash you got so we can detect concurrent updates. | +**JiraIssue** | **string** | The jira issue to use for committing a change, or the last jira issue used. | +**Labels** | Pointer to **map[string]string** | A map of arbitrary string labels attached to this repository. | [optional] + +## Methods + +### NewRepositoryDto + +`func NewRepositoryDto(owner string, url string, mainline string, timeStamp string, commitHash string, jiraIssue string, ) *RepositoryDto` + +NewRepositoryDto instantiates a new RepositoryDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRepositoryDtoWithDefaults + +`func NewRepositoryDtoWithDefaults() *RepositoryDto` + +NewRepositoryDtoWithDefaults instantiates a new RepositoryDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *RepositoryDto) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RepositoryDto) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *RepositoryDto) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *RepositoryDto) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetOwner + +`func (o *RepositoryDto) GetOwner() string` + +GetOwner returns the Owner field if non-nil, zero value otherwise. + +### GetOwnerOk + +`func (o *RepositoryDto) GetOwnerOk() (*string, bool)` + +GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwner + +`func (o *RepositoryDto) SetOwner(v string)` + +SetOwner sets Owner field to given value. + + +### GetDescription + +`func (o *RepositoryDto) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *RepositoryDto) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *RepositoryDto) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *RepositoryDto) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetUrl + +`func (o *RepositoryDto) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *RepositoryDto) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *RepositoryDto) SetUrl(v string)` + +SetUrl sets Url field to given value. + + +### GetMainline + +`func (o *RepositoryDto) GetMainline() string` + +GetMainline returns the Mainline field if non-nil, zero value otherwise. + +### GetMainlineOk + +`func (o *RepositoryDto) GetMainlineOk() (*string, bool)` + +GetMainlineOk returns a tuple with the Mainline field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMainline + +`func (o *RepositoryDto) SetMainline(v string)` + +SetMainline sets Mainline field to given value. + + +### GetGenerator + +`func (o *RepositoryDto) GetGenerator() string` + +GetGenerator returns the Generator field if non-nil, zero value otherwise. + +### GetGeneratorOk + +`func (o *RepositoryDto) GetGeneratorOk() (*string, bool)` + +GetGeneratorOk returns a tuple with the Generator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGenerator + +`func (o *RepositoryDto) SetGenerator(v string)` + +SetGenerator sets Generator field to given value. + +### HasGenerator + +`func (o *RepositoryDto) HasGenerator() bool` + +HasGenerator returns a boolean if a field has been set. + +### GetConfiguration + +`func (o *RepositoryDto) GetConfiguration() RepositoryConfigurationDto` + +GetConfiguration returns the Configuration field if non-nil, zero value otherwise. + +### GetConfigurationOk + +`func (o *RepositoryDto) GetConfigurationOk() (*RepositoryConfigurationDto, bool)` + +GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfiguration + +`func (o *RepositoryDto) SetConfiguration(v RepositoryConfigurationDto)` + +SetConfiguration sets Configuration field to given value. + +### HasConfiguration + +`func (o *RepositoryDto) HasConfiguration() bool` + +HasConfiguration returns a boolean if a field has been set. + +### GetTimeStamp + +`func (o *RepositoryDto) GetTimeStamp() string` + +GetTimeStamp returns the TimeStamp field if non-nil, zero value otherwise. + +### GetTimeStampOk + +`func (o *RepositoryDto) GetTimeStampOk() (*string, bool)` + +GetTimeStampOk returns a tuple with the TimeStamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeStamp + +`func (o *RepositoryDto) SetTimeStamp(v string)` + +SetTimeStamp sets TimeStamp field to given value. + + +### GetCommitHash + +`func (o *RepositoryDto) GetCommitHash() string` + +GetCommitHash returns the CommitHash field if non-nil, zero value otherwise. + +### GetCommitHashOk + +`func (o *RepositoryDto) GetCommitHashOk() (*string, bool)` + +GetCommitHashOk returns a tuple with the CommitHash field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommitHash + +`func (o *RepositoryDto) SetCommitHash(v string)` + +SetCommitHash sets CommitHash field to given value. + + +### GetJiraIssue + +`func (o *RepositoryDto) GetJiraIssue() string` + +GetJiraIssue returns the JiraIssue field if non-nil, zero value otherwise. + +### GetJiraIssueOk + +`func (o *RepositoryDto) GetJiraIssueOk() (*string, bool)` + +GetJiraIssueOk returns a tuple with the JiraIssue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJiraIssue + +`func (o *RepositoryDto) SetJiraIssue(v string)` + +SetJiraIssue sets JiraIssue field to given value. + + +### GetLabels + +`func (o *RepositoryDto) GetLabels() map[string]string` + +GetLabels returns the Labels field if non-nil, zero value otherwise. + +### GetLabelsOk + +`func (o *RepositoryDto) GetLabelsOk() (*map[string]string, bool)` + +GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabels + +`func (o *RepositoryDto) SetLabels(v map[string]string)` + +SetLabels sets Labels field to given value. + +### HasLabels + +`func (o *RepositoryDto) HasLabels() bool` + +HasLabels returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepositoryListDto.md b/docs/RepositoryListDto.md new file mode 100644 index 0000000..80a03d3 --- /dev/null +++ b/docs/RepositoryListDto.md @@ -0,0 +1,72 @@ +# RepositoryListDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Repositories** | [**map[string]RepositoryDto**](RepositoryDto.md) | | +**TimeStamp** | **string** | ISO-8601 UTC date time at which the list of repositories was obtained from service-metadata | + +## Methods + +### NewRepositoryListDto + +`func NewRepositoryListDto(repositories map[string]RepositoryDto, timeStamp string, ) *RepositoryListDto` + +NewRepositoryListDto instantiates a new RepositoryListDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRepositoryListDtoWithDefaults + +`func NewRepositoryListDtoWithDefaults() *RepositoryListDto` + +NewRepositoryListDtoWithDefaults instantiates a new RepositoryListDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRepositories + +`func (o *RepositoryListDto) GetRepositories() map[string]RepositoryDto` + +GetRepositories returns the Repositories field if non-nil, zero value otherwise. + +### GetRepositoriesOk + +`func (o *RepositoryListDto) GetRepositoriesOk() (*map[string]RepositoryDto, bool)` + +GetRepositoriesOk returns a tuple with the Repositories field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRepositories + +`func (o *RepositoryListDto) SetRepositories(v map[string]RepositoryDto)` + +SetRepositories sets Repositories field to given value. + + +### GetTimeStamp + +`func (o *RepositoryListDto) GetTimeStamp() string` + +GetTimeStamp returns the TimeStamp field if non-nil, zero value otherwise. + +### GetTimeStampOk + +`func (o *RepositoryListDto) GetTimeStampOk() (*string, bool)` + +GetTimeStampOk returns a tuple with the TimeStamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeStamp + +`func (o *RepositoryListDto) SetTimeStamp(v string)` + +SetTimeStamp sets TimeStamp field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepositoryPatchDto.md b/docs/RepositoryPatchDto.md new file mode 100644 index 0000000..414051d --- /dev/null +++ b/docs/RepositoryPatchDto.md @@ -0,0 +1,249 @@ +# RepositoryPatchDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Owner** | Pointer to **string** | The alias of the repository owner | [optional] +**Url** | Pointer to **string** | | [optional] +**Mainline** | Pointer to **string** | | [optional] +**Generator** | Pointer to **string** | the generator used for the initial contents of this repository | [optional] +**Configuration** | Pointer to [**RepositoryConfigurationPatchDto**](RepositoryConfigurationPatchDto.md) | | [optional] +**TimeStamp** | **string** | ISO-8601 UTC date time at which this information was originally committed. When sending an update, include the original timestamp you got so we can detect concurrent updates. | +**CommitHash** | **string** | The git commit hash this information was originally committed under. When sending an update, include the original commitHash you got so we can detect concurrent updates. | +**JiraIssue** | **string** | The jira issue to use for committing a change, or the last jira issue used. | +**Labels** | Pointer to **map[string]string** | A map of arbitrary string labels attached to this repository. | [optional] + +## Methods + +### NewRepositoryPatchDto + +`func NewRepositoryPatchDto(timeStamp string, commitHash string, jiraIssue string, ) *RepositoryPatchDto` + +NewRepositoryPatchDto instantiates a new RepositoryPatchDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRepositoryPatchDtoWithDefaults + +`func NewRepositoryPatchDtoWithDefaults() *RepositoryPatchDto` + +NewRepositoryPatchDtoWithDefaults instantiates a new RepositoryPatchDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOwner + +`func (o *RepositoryPatchDto) GetOwner() string` + +GetOwner returns the Owner field if non-nil, zero value otherwise. + +### GetOwnerOk + +`func (o *RepositoryPatchDto) GetOwnerOk() (*string, bool)` + +GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwner + +`func (o *RepositoryPatchDto) SetOwner(v string)` + +SetOwner sets Owner field to given value. + +### HasOwner + +`func (o *RepositoryPatchDto) HasOwner() bool` + +HasOwner returns a boolean if a field has been set. + +### GetUrl + +`func (o *RepositoryPatchDto) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *RepositoryPatchDto) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *RepositoryPatchDto) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *RepositoryPatchDto) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + +### GetMainline + +`func (o *RepositoryPatchDto) GetMainline() string` + +GetMainline returns the Mainline field if non-nil, zero value otherwise. + +### GetMainlineOk + +`func (o *RepositoryPatchDto) GetMainlineOk() (*string, bool)` + +GetMainlineOk returns a tuple with the Mainline field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMainline + +`func (o *RepositoryPatchDto) SetMainline(v string)` + +SetMainline sets Mainline field to given value. + +### HasMainline + +`func (o *RepositoryPatchDto) HasMainline() bool` + +HasMainline returns a boolean if a field has been set. + +### GetGenerator + +`func (o *RepositoryPatchDto) GetGenerator() string` + +GetGenerator returns the Generator field if non-nil, zero value otherwise. + +### GetGeneratorOk + +`func (o *RepositoryPatchDto) GetGeneratorOk() (*string, bool)` + +GetGeneratorOk returns a tuple with the Generator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGenerator + +`func (o *RepositoryPatchDto) SetGenerator(v string)` + +SetGenerator sets Generator field to given value. + +### HasGenerator + +`func (o *RepositoryPatchDto) HasGenerator() bool` + +HasGenerator returns a boolean if a field has been set. + +### GetConfiguration + +`func (o *RepositoryPatchDto) GetConfiguration() RepositoryConfigurationPatchDto` + +GetConfiguration returns the Configuration field if non-nil, zero value otherwise. + +### GetConfigurationOk + +`func (o *RepositoryPatchDto) GetConfigurationOk() (*RepositoryConfigurationPatchDto, bool)` + +GetConfigurationOk returns a tuple with the Configuration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfiguration + +`func (o *RepositoryPatchDto) SetConfiguration(v RepositoryConfigurationPatchDto)` + +SetConfiguration sets Configuration field to given value. + +### HasConfiguration + +`func (o *RepositoryPatchDto) HasConfiguration() bool` + +HasConfiguration returns a boolean if a field has been set. + +### GetTimeStamp + +`func (o *RepositoryPatchDto) GetTimeStamp() string` + +GetTimeStamp returns the TimeStamp field if non-nil, zero value otherwise. + +### GetTimeStampOk + +`func (o *RepositoryPatchDto) GetTimeStampOk() (*string, bool)` + +GetTimeStampOk returns a tuple with the TimeStamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeStamp + +`func (o *RepositoryPatchDto) SetTimeStamp(v string)` + +SetTimeStamp sets TimeStamp field to given value. + + +### GetCommitHash + +`func (o *RepositoryPatchDto) GetCommitHash() string` + +GetCommitHash returns the CommitHash field if non-nil, zero value otherwise. + +### GetCommitHashOk + +`func (o *RepositoryPatchDto) GetCommitHashOk() (*string, bool)` + +GetCommitHashOk returns a tuple with the CommitHash field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommitHash + +`func (o *RepositoryPatchDto) SetCommitHash(v string)` + +SetCommitHash sets CommitHash field to given value. + + +### GetJiraIssue + +`func (o *RepositoryPatchDto) GetJiraIssue() string` + +GetJiraIssue returns the JiraIssue field if non-nil, zero value otherwise. + +### GetJiraIssueOk + +`func (o *RepositoryPatchDto) GetJiraIssueOk() (*string, bool)` + +GetJiraIssueOk returns a tuple with the JiraIssue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJiraIssue + +`func (o *RepositoryPatchDto) SetJiraIssue(v string)` + +SetJiraIssue sets JiraIssue field to given value. + + +### GetLabels + +`func (o *RepositoryPatchDto) GetLabels() map[string]string` + +GetLabels returns the Labels field if non-nil, zero value otherwise. + +### GetLabelsOk + +`func (o *RepositoryPatchDto) GetLabelsOk() (*map[string]string, bool)` + +GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabels + +`func (o *RepositoryPatchDto) SetLabels(v map[string]string)` + +SetLabels sets Labels field to given value. + +### HasLabels + +`func (o *RepositoryPatchDto) HasLabels() bool` + +HasLabels returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RestApiV1OwnersAPI.md b/docs/RestApiV1OwnersAPI.md new file mode 100644 index 0000000..47b3689 --- /dev/null +++ b/docs/RestApiV1OwnersAPI.md @@ -0,0 +1,431 @@ +# \RestApiV1OwnersAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateOwner**](RestApiV1OwnersAPI.md#CreateOwner) | **Post** /rest/api/v1/owners/{owner} | create a new owner with a given alias +[**DeleteOwner**](RestApiV1OwnersAPI.md#DeleteOwner) | **Delete** /rest/api/v1/owners/{owner} | delete the owner with a given alias +[**GetOwner**](RestApiV1OwnersAPI.md#GetOwner) | **Get** /rest/api/v1/owners/{owner} | get a single owner by alias +[**GetOwners**](RestApiV1OwnersAPI.md#GetOwners) | **Get** /rest/api/v1/owners | get owners +[**PatchOwner**](RestApiV1OwnersAPI.md#PatchOwner) | **Patch** /rest/api/v1/owners/{owner} | patch an existing owner with a given alias +[**UpdateOwner**](RestApiV1OwnersAPI.md#UpdateOwner) | **Put** /rest/api/v1/owners/{owner} | update an existing owner with a given alias + + + +## CreateOwner + +> OwnerDto CreateOwner(ctx, owner).OwnerCreateDto(ownerCreateDto).Execute() + +create a new owner with a given alias + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + owner := "owner_example" // string | + ownerCreateDto := *openapiclient.NewOwnerCreateDto("Contact_example", "JiraIssue_example") // OwnerCreateDto | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RestApiV1OwnersAPI.CreateOwner(context.Background(), owner).OwnerCreateDto(ownerCreateDto).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RestApiV1OwnersAPI.CreateOwner``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateOwner`: OwnerDto + fmt.Fprintf(os.Stdout, "Response from `RestApiV1OwnersAPI.CreateOwner`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**owner** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateOwnerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ownerCreateDto** | [**OwnerCreateDto**](OwnerCreateDto.md) | | + +### Return type + +[**OwnerDto**](OwnerDto.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteOwner + +> DeleteOwner(ctx, owner).DeletionDto(deletionDto).Execute() + +delete the owner with a given alias + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + owner := "owner_example" // string | + deletionDto := *openapiclient.NewDeletionDto("JiraIssue_example") // DeletionDto | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RestApiV1OwnersAPI.DeleteOwner(context.Background(), owner).DeletionDto(deletionDto).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RestApiV1OwnersAPI.DeleteOwner``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**owner** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteOwnerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **deletionDto** | [**DeletionDto**](DeletionDto.md) | | + +### Return type + + (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetOwner + +> OwnerDto GetOwner(ctx, owner).Execute() + +get a single owner by alias + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + owner := "owner_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RestApiV1OwnersAPI.GetOwner(context.Background(), owner).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RestApiV1OwnersAPI.GetOwner``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetOwner`: OwnerDto + fmt.Fprintf(os.Stdout, "Response from `RestApiV1OwnersAPI.GetOwner`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**owner** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOwnerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**OwnerDto**](OwnerDto.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetOwners + +> OwnerListDto GetOwners(ctx).Execute() + +get owners + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RestApiV1OwnersAPI.GetOwners(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RestApiV1OwnersAPI.GetOwners``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetOwners`: OwnerListDto + fmt.Fprintf(os.Stdout, "Response from `RestApiV1OwnersAPI.GetOwners`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOwnersRequest struct via the builder pattern + + +### Return type + +[**OwnerListDto**](OwnerListDto.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PatchOwner + +> OwnerDto PatchOwner(ctx, owner).OwnerPatchDto(ownerPatchDto).Execute() + +patch an existing owner with a given alias + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + owner := "owner_example" // string | + ownerPatchDto := *openapiclient.NewOwnerPatchDto("TimeStamp_example", "CommitHash_example", "JiraIssue_example") // OwnerPatchDto | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RestApiV1OwnersAPI.PatchOwner(context.Background(), owner).OwnerPatchDto(ownerPatchDto).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RestApiV1OwnersAPI.PatchOwner``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PatchOwner`: OwnerDto + fmt.Fprintf(os.Stdout, "Response from `RestApiV1OwnersAPI.PatchOwner`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**owner** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPatchOwnerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ownerPatchDto** | [**OwnerPatchDto**](OwnerPatchDto.md) | | + +### Return type + +[**OwnerDto**](OwnerDto.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateOwner + +> OwnerDto UpdateOwner(ctx, owner).OwnerDto(ownerDto).Execute() + +update an existing owner with a given alias + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + owner := "owner_example" // string | + ownerDto := *openapiclient.NewOwnerDto("Contact_example", "TimeStamp_example", "CommitHash_example", "JiraIssue_example") // OwnerDto | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RestApiV1OwnersAPI.UpdateOwner(context.Background(), owner).OwnerDto(ownerDto).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RestApiV1OwnersAPI.UpdateOwner``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateOwner`: OwnerDto + fmt.Fprintf(os.Stdout, "Response from `RestApiV1OwnersAPI.UpdateOwner`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**owner** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateOwnerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **ownerDto** | [**OwnerDto**](OwnerDto.md) | | + +### Return type + +[**OwnerDto**](OwnerDto.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/RestApiV1RepositoriesAPI.md b/docs/RestApiV1RepositoriesAPI.md new file mode 100644 index 0000000..8789eb9 --- /dev/null +++ b/docs/RestApiV1RepositoriesAPI.md @@ -0,0 +1,442 @@ +# \RestApiV1RepositoriesAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetRepositoriesOfOwner**](RestApiV1RepositoriesAPI.md#GetRepositoriesOfOwner) | **Get** /rest/api/v1/repositories | get repositories +[**GetRepository**](RestApiV1RepositoriesAPI.md#GetRepository) | **Get** /rest/api/v1/repositories/{repository} | get a single repository by key +[**PatchRepository**](RestApiV1RepositoriesAPI.md#PatchRepository) | **Patch** /rest/api/v1/repositories/{repository} | patch an existing repository with the given key +[**RegisterRepository**](RestApiV1RepositoriesAPI.md#RegisterRepository) | **Post** /rest/api/v1/repositories/{repository} | register a new repository with the given key +[**RemoveRepository**](RestApiV1RepositoriesAPI.md#RemoveRepository) | **Delete** /rest/api/v1/repositories/{repository} | remove the repository with the given key +[**UpdateRepository**](RestApiV1RepositoriesAPI.md#UpdateRepository) | **Put** /rest/api/v1/repositories/{repository} | update an existing repository with the given key + + + +## GetRepositoriesOfOwner + +> RepositoryListDto GetRepositoriesOfOwner(ctx).Url(url).Owner(owner).Service(service).Name(name).Type_(type_).Execute() + +get repositories + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + url := "git@github.com:some-org/some-repo.git" // string | Optional - allows filtering the output by repository url. Must match `^[a-z](-?:?@?.?/?[a-z0-9]+)*$`. (optional) + owner := "some-owner" // string | Optional - the alias of an owner. If present, only repositories with this owner are returned. Must match `^[a-z](-?[a-z0-9]+)*$`. (optional) + service := "unicorn-finder-service" // string | Optional - the name of a service. If present, only repositories referenced by the given service are returned. Must match `^[a-z](-?[a-z0-9]+)*$`. (optional) + name := "some-service" // string | Optional - allows filtering the output by repository name (the first part of the key before the .). Must match `^[a-z](-?[a-z0-9]+)*$`. (optional) + type_ := "helm-chart" // string | Optional - allows filtering the output by repository type (the second part of the key after the .). Must currently be one of api, helm-chart, helm-deployment, implementation, terraform-module, javascript-module. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RestApiV1RepositoriesAPI.GetRepositoriesOfOwner(context.Background()).Url(url).Owner(owner).Service(service).Name(name).Type_(type_).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RestApiV1RepositoriesAPI.GetRepositoriesOfOwner``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRepositoriesOfOwner`: RepositoryListDto + fmt.Fprintf(os.Stdout, "Response from `RestApiV1RepositoriesAPI.GetRepositoriesOfOwner`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRepositoriesOfOwnerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **url** | **string** | Optional - allows filtering the output by repository url. Must match `^[a-z](-?:?@?.?/?[a-z0-9]+)*$`. | + **owner** | **string** | Optional - the alias of an owner. If present, only repositories with this owner are returned. Must match `^[a-z](-?[a-z0-9]+)*$`. | + **service** | **string** | Optional - the name of a service. If present, only repositories referenced by the given service are returned. Must match `^[a-z](-?[a-z0-9]+)*$`. | + **name** | **string** | Optional - allows filtering the output by repository name (the first part of the key before the .). Must match `^[a-z](-?[a-z0-9]+)*$`. | + **type_** | **string** | Optional - allows filtering the output by repository type (the second part of the key after the .). Must currently be one of api, helm-chart, helm-deployment, implementation, terraform-module, javascript-module. | + +### Return type + +[**RepositoryListDto**](RepositoryListDto.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetRepository + +> RepositoryDto GetRepository(ctx, repository).Execute() + +get a single repository by key + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + repository := "unicorn-finder-service.implementation" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RestApiV1RepositoriesAPI.GetRepository(context.Background(), repository).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RestApiV1RepositoriesAPI.GetRepository``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetRepository`: RepositoryDto + fmt.Fprintf(os.Stdout, "Response from `RestApiV1RepositoriesAPI.GetRepository`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**repository** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRepositoryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**RepositoryDto**](RepositoryDto.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PatchRepository + +> RepositoryDto PatchRepository(ctx, repository).RepositoryPatchDto(repositoryPatchDto).Execute() + +patch an existing repository with the given key + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + repository := "unicorn-finder-service.implementation" // string | + repositoryPatchDto := *openapiclient.NewRepositoryPatchDto("TimeStamp_example", "CommitHash_example", "JiraIssue_example") // RepositoryPatchDto | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RestApiV1RepositoriesAPI.PatchRepository(context.Background(), repository).RepositoryPatchDto(repositoryPatchDto).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RestApiV1RepositoriesAPI.PatchRepository``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PatchRepository`: RepositoryDto + fmt.Fprintf(os.Stdout, "Response from `RestApiV1RepositoriesAPI.PatchRepository`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**repository** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPatchRepositoryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **repositoryPatchDto** | [**RepositoryPatchDto**](RepositoryPatchDto.md) | | + +### Return type + +[**RepositoryDto**](RepositoryDto.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RegisterRepository + +> RepositoryDto RegisterRepository(ctx, repository).RepositoryCreateDto(repositoryCreateDto).Execute() + +register a new repository with the given key + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + repository := "unicorn-finder-service.implementation" // string | + repositoryCreateDto := *openapiclient.NewRepositoryCreateDto("Owner_example", "Url_example", "Mainline_example", "JiraIssue_example") // RepositoryCreateDto | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RestApiV1RepositoriesAPI.RegisterRepository(context.Background(), repository).RepositoryCreateDto(repositoryCreateDto).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RestApiV1RepositoriesAPI.RegisterRepository``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RegisterRepository`: RepositoryDto + fmt.Fprintf(os.Stdout, "Response from `RestApiV1RepositoriesAPI.RegisterRepository`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**repository** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRegisterRepositoryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **repositoryCreateDto** | [**RepositoryCreateDto**](RepositoryCreateDto.md) | | + +### Return type + +[**RepositoryDto**](RepositoryDto.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveRepository + +> RemoveRepository(ctx, repository).DeletionDto(deletionDto).Execute() + +remove the repository with the given key + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + repository := "unicorn-finder-service.implementation" // string | + deletionDto := *openapiclient.NewDeletionDto("JiraIssue_example") // DeletionDto | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RestApiV1RepositoriesAPI.RemoveRepository(context.Background(), repository).DeletionDto(deletionDto).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RestApiV1RepositoriesAPI.RemoveRepository``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**repository** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveRepositoryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **deletionDto** | [**DeletionDto**](DeletionDto.md) | | + +### Return type + + (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRepository + +> RepositoryDto UpdateRepository(ctx, repository).RepositoryDto(repositoryDto).Execute() + +update an existing repository with the given key + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + repository := "unicorn-finder-service.implementation" // string | + repositoryDto := *openapiclient.NewRepositoryDto("Owner_example", "Url_example", "Mainline_example", "TimeStamp_example", "CommitHash_example", "JiraIssue_example") // RepositoryDto | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RestApiV1RepositoriesAPI.UpdateRepository(context.Background(), repository).RepositoryDto(repositoryDto).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RestApiV1RepositoriesAPI.UpdateRepository``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateRepository`: RepositoryDto + fmt.Fprintf(os.Stdout, "Response from `RestApiV1RepositoriesAPI.UpdateRepository`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**repository** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateRepositoryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **repositoryDto** | [**RepositoryDto**](RepositoryDto.md) | | + +### Return type + +[**RepositoryDto**](RepositoryDto.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/RestApiV1ServicesAPI.md b/docs/RestApiV1ServicesAPI.md new file mode 100644 index 0000000..2a3225e --- /dev/null +++ b/docs/RestApiV1ServicesAPI.md @@ -0,0 +1,503 @@ +# \RestApiV1ServicesAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteService**](RestApiV1ServicesAPI.md#DeleteService) | **Delete** /rest/api/v1/services/{service} | delete the service with a given name +[**GetService**](RestApiV1ServicesAPI.md#GetService) | **Get** /rest/api/v1/services/{service} | get a single service by name +[**GetServicePromoters**](RestApiV1ServicesAPI.md#GetServicePromoters) | **Get** /rest/api/v1/services/{service}/promoters | get all users who may promote a service +[**GetServices**](RestApiV1ServicesAPI.md#GetServices) | **Get** /rest/api/v1/services | get services +[**PatchService**](RestApiV1ServicesAPI.md#PatchService) | **Patch** /rest/api/v1/services/{service} | patch an existing service with the given name +[**RegisterService**](RestApiV1ServicesAPI.md#RegisterService) | **Post** /rest/api/v1/services/{service} | register a new service with the given name +[**UpdateService**](RestApiV1ServicesAPI.md#UpdateService) | **Put** /rest/api/v1/services/{service} | update an existing service with the given name + + + +## DeleteService + +> DeleteService(ctx, service).DeletionDto(deletionDto).Execute() + +delete the service with a given name + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + service := "service_example" // string | The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`. + deletionDto := *openapiclient.NewDeletionDto("JiraIssue_example") // DeletionDto | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RestApiV1ServicesAPI.DeleteService(context.Background(), service).DeletionDto(deletionDto).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RestApiV1ServicesAPI.DeleteService``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**service** | **string** | The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteServiceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **deletionDto** | [**DeletionDto**](DeletionDto.md) | | + +### Return type + + (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetService + +> ServiceDto GetService(ctx, service).Execute() + +get a single service by name + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + service := "service_example" // string | The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RestApiV1ServicesAPI.GetService(context.Background(), service).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RestApiV1ServicesAPI.GetService``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetService`: ServiceDto + fmt.Fprintf(os.Stdout, "Response from `RestApiV1ServicesAPI.GetService`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**service** | **string** | The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetServiceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ServiceDto**](ServiceDto.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetServicePromoters + +> ServicePromotersDto GetServicePromoters(ctx, service).Execute() + +get all users who may promote a service + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + service := "service_example" // string | The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RestApiV1ServicesAPI.GetServicePromoters(context.Background(), service).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RestApiV1ServicesAPI.GetServicePromoters``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetServicePromoters`: ServicePromotersDto + fmt.Fprintf(os.Stdout, "Response from `RestApiV1ServicesAPI.GetServicePromoters`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**service** | **string** | The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetServicePromotersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ServicePromotersDto**](ServicePromotersDto.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetServices + +> ServiceListDto GetServices(ctx).Owner(owner).Execute() + +get services + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + owner := "some-owner" // string | Allows filtering the output by owner alias. Valid aliases match `^[a-z](-?[a-z0-9]+)*$`. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RestApiV1ServicesAPI.GetServices(context.Background()).Owner(owner).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RestApiV1ServicesAPI.GetServices``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetServices`: ServiceListDto + fmt.Fprintf(os.Stdout, "Response from `RestApiV1ServicesAPI.GetServices`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetServicesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string** | Allows filtering the output by owner alias. Valid aliases match `^[a-z](-?[a-z0-9]+)*$`. | + +### Return type + +[**ServiceListDto**](ServiceListDto.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PatchService + +> ServiceDto PatchService(ctx, service).ServicePatchDto(servicePatchDto).Execute() + +patch an existing service with the given name + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + service := "service_example" // string | The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`. + servicePatchDto := *openapiclient.NewServicePatchDto("TimeStamp_example", "CommitHash_example", "JiraIssue_example") // ServicePatchDto | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RestApiV1ServicesAPI.PatchService(context.Background(), service).ServicePatchDto(servicePatchDto).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RestApiV1ServicesAPI.PatchService``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PatchService`: ServiceDto + fmt.Fprintf(os.Stdout, "Response from `RestApiV1ServicesAPI.PatchService`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**service** | **string** | The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPatchServiceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **servicePatchDto** | [**ServicePatchDto**](ServicePatchDto.md) | | + +### Return type + +[**ServiceDto**](ServiceDto.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RegisterService + +> ServiceDto RegisterService(ctx, service).ServiceCreateDto(serviceCreateDto).Execute() + +register a new service with the given name + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + service := "service_example" // string | The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`. + serviceCreateDto := *openapiclient.NewServiceCreateDto("Owner_example", []openapiclient.Quicklink{*openapiclient.NewQuicklink()}, []string{"Repositories_example"}, "AlertTarget_example", "JiraIssue_example") // ServiceCreateDto | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RestApiV1ServicesAPI.RegisterService(context.Background(), service).ServiceCreateDto(serviceCreateDto).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RestApiV1ServicesAPI.RegisterService``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RegisterService`: ServiceDto + fmt.Fprintf(os.Stdout, "Response from `RestApiV1ServicesAPI.RegisterService`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**service** | **string** | The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRegisterServiceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **serviceCreateDto** | [**ServiceCreateDto**](ServiceCreateDto.md) | | + +### Return type + +[**ServiceDto**](ServiceDto.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateService + +> ServiceDto UpdateService(ctx, service).ServiceDto(serviceDto).Execute() + +update an existing service with the given name + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + service := "service_example" // string | The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`. + serviceDto := *openapiclient.NewServiceDto("Owner_example", []openapiclient.Quicklink{*openapiclient.NewQuicklink()}, []string{"Repositories_example"}, "AlertTarget_example", "TimeStamp_example", "CommitHash_example", "JiraIssue_example") // ServiceDto | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.RestApiV1ServicesAPI.UpdateService(context.Background(), service).ServiceDto(serviceDto).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RestApiV1ServicesAPI.UpdateService``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateService`: ServiceDto + fmt.Fprintf(os.Stdout, "Response from `RestApiV1ServicesAPI.UpdateService`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**service** | **string** | The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateServiceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **serviceDto** | [**ServiceDto**](ServiceDto.md) | | + +### Return type + +[**ServiceDto**](ServiceDto.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/docs/ServiceCreateDto.md b/docs/ServiceCreateDto.md new file mode 100644 index 0000000..dea7e02 --- /dev/null +++ b/docs/ServiceCreateDto.md @@ -0,0 +1,317 @@ +# ServiceCreateDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Owner** | **string** | The alias of the service owner. Note, an update with changed owner will move the service and any associated repositories to the new owner, but of course this will not move e.g. Jenkins jobs. That's your job. | +**Description** | Pointer to **string** | A short description of the functionality of the service. | [optional] +**Quicklinks** | [**[]Quicklink**](Quicklink.md) | A list of quicklinks related to the service | +**Repositories** | **[]string** | The keys of repositories associated with the service. When sending an update, they must refer to repositories that belong to this service, or the update will fail | +**AlertTarget** | **string** | The default channel used to send any alerts of the service to. Can be an email address or a Teams webhook URL | +**OperationType** | Pointer to **string** | The operation type of the service. 'WORKLOAD' follows the default deployment strategy of one instance per environment, 'PLATFORM' one instance per cluster or node and 'APPLICATION' is a standalone application that is not deployed via the common strategies. | [optional] [default to "WORKLOAD"] +**InternetExposed** | Pointer to **bool** | The value defines if the service is available from the internet and the time period in which security holes must be processed. | [optional] +**Tags** | Pointer to **[]string** | | [optional] +**Labels** | Pointer to **map[string]string** | | [optional] +**Spec** | Pointer to [**ServiceSpecDto**](ServiceSpecDto.md) | | [optional] +**PostPromotes** | Pointer to [**PostPromote**](PostPromote.md) | Post promote dependencies. | [optional] +**JiraIssue** | **string** | The jira issue to use for committing a change, or the last jira issue used. | + +## Methods + +### NewServiceCreateDto + +`func NewServiceCreateDto(owner string, quicklinks []Quicklink, repositories []string, alertTarget string, jiraIssue string, ) *ServiceCreateDto` + +NewServiceCreateDto instantiates a new ServiceCreateDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceCreateDtoWithDefaults + +`func NewServiceCreateDtoWithDefaults() *ServiceCreateDto` + +NewServiceCreateDtoWithDefaults instantiates a new ServiceCreateDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOwner + +`func (o *ServiceCreateDto) GetOwner() string` + +GetOwner returns the Owner field if non-nil, zero value otherwise. + +### GetOwnerOk + +`func (o *ServiceCreateDto) GetOwnerOk() (*string, bool)` + +GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwner + +`func (o *ServiceCreateDto) SetOwner(v string)` + +SetOwner sets Owner field to given value. + + +### GetDescription + +`func (o *ServiceCreateDto) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ServiceCreateDto) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ServiceCreateDto) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ServiceCreateDto) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetQuicklinks + +`func (o *ServiceCreateDto) GetQuicklinks() []Quicklink` + +GetQuicklinks returns the Quicklinks field if non-nil, zero value otherwise. + +### GetQuicklinksOk + +`func (o *ServiceCreateDto) GetQuicklinksOk() (*[]Quicklink, bool)` + +GetQuicklinksOk returns a tuple with the Quicklinks field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuicklinks + +`func (o *ServiceCreateDto) SetQuicklinks(v []Quicklink)` + +SetQuicklinks sets Quicklinks field to given value. + + +### GetRepositories + +`func (o *ServiceCreateDto) GetRepositories() []string` + +GetRepositories returns the Repositories field if non-nil, zero value otherwise. + +### GetRepositoriesOk + +`func (o *ServiceCreateDto) GetRepositoriesOk() (*[]string, bool)` + +GetRepositoriesOk returns a tuple with the Repositories field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRepositories + +`func (o *ServiceCreateDto) SetRepositories(v []string)` + +SetRepositories sets Repositories field to given value. + + +### GetAlertTarget + +`func (o *ServiceCreateDto) GetAlertTarget() string` + +GetAlertTarget returns the AlertTarget field if non-nil, zero value otherwise. + +### GetAlertTargetOk + +`func (o *ServiceCreateDto) GetAlertTargetOk() (*string, bool)` + +GetAlertTargetOk returns a tuple with the AlertTarget field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAlertTarget + +`func (o *ServiceCreateDto) SetAlertTarget(v string)` + +SetAlertTarget sets AlertTarget field to given value. + + +### GetOperationType + +`func (o *ServiceCreateDto) GetOperationType() string` + +GetOperationType returns the OperationType field if non-nil, zero value otherwise. + +### GetOperationTypeOk + +`func (o *ServiceCreateDto) GetOperationTypeOk() (*string, bool)` + +GetOperationTypeOk returns a tuple with the OperationType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOperationType + +`func (o *ServiceCreateDto) SetOperationType(v string)` + +SetOperationType sets OperationType field to given value. + +### HasOperationType + +`func (o *ServiceCreateDto) HasOperationType() bool` + +HasOperationType returns a boolean if a field has been set. + +### GetInternetExposed + +`func (o *ServiceCreateDto) GetInternetExposed() bool` + +GetInternetExposed returns the InternetExposed field if non-nil, zero value otherwise. + +### GetInternetExposedOk + +`func (o *ServiceCreateDto) GetInternetExposedOk() (*bool, bool)` + +GetInternetExposedOk returns a tuple with the InternetExposed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInternetExposed + +`func (o *ServiceCreateDto) SetInternetExposed(v bool)` + +SetInternetExposed sets InternetExposed field to given value. + +### HasInternetExposed + +`func (o *ServiceCreateDto) HasInternetExposed() bool` + +HasInternetExposed returns a boolean if a field has been set. + +### GetTags + +`func (o *ServiceCreateDto) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ServiceCreateDto) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ServiceCreateDto) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *ServiceCreateDto) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetLabels + +`func (o *ServiceCreateDto) GetLabels() map[string]string` + +GetLabels returns the Labels field if non-nil, zero value otherwise. + +### GetLabelsOk + +`func (o *ServiceCreateDto) GetLabelsOk() (*map[string]string, bool)` + +GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabels + +`func (o *ServiceCreateDto) SetLabels(v map[string]string)` + +SetLabels sets Labels field to given value. + +### HasLabels + +`func (o *ServiceCreateDto) HasLabels() bool` + +HasLabels returns a boolean if a field has been set. + +### GetSpec + +`func (o *ServiceCreateDto) GetSpec() ServiceSpecDto` + +GetSpec returns the Spec field if non-nil, zero value otherwise. + +### GetSpecOk + +`func (o *ServiceCreateDto) GetSpecOk() (*ServiceSpecDto, bool)` + +GetSpecOk returns a tuple with the Spec field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSpec + +`func (o *ServiceCreateDto) SetSpec(v ServiceSpecDto)` + +SetSpec sets Spec field to given value. + +### HasSpec + +`func (o *ServiceCreateDto) HasSpec() bool` + +HasSpec returns a boolean if a field has been set. + +### GetPostPromotes + +`func (o *ServiceCreateDto) GetPostPromotes() PostPromote` + +GetPostPromotes returns the PostPromotes field if non-nil, zero value otherwise. + +### GetPostPromotesOk + +`func (o *ServiceCreateDto) GetPostPromotesOk() (*PostPromote, bool)` + +GetPostPromotesOk returns a tuple with the PostPromotes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPostPromotes + +`func (o *ServiceCreateDto) SetPostPromotes(v PostPromote)` + +SetPostPromotes sets PostPromotes field to given value. + +### HasPostPromotes + +`func (o *ServiceCreateDto) HasPostPromotes() bool` + +HasPostPromotes returns a boolean if a field has been set. + +### GetJiraIssue + +`func (o *ServiceCreateDto) GetJiraIssue() string` + +GetJiraIssue returns the JiraIssue field if non-nil, zero value otherwise. + +### GetJiraIssueOk + +`func (o *ServiceCreateDto) GetJiraIssueOk() (*string, bool)` + +GetJiraIssueOk returns a tuple with the JiraIssue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJiraIssue + +`func (o *ServiceCreateDto) SetJiraIssue(v string)` + +SetJiraIssue sets JiraIssue field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ServiceDto.md b/docs/ServiceDto.md new file mode 100644 index 0000000..15ea331 --- /dev/null +++ b/docs/ServiceDto.md @@ -0,0 +1,385 @@ +# ServiceDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Owner** | **string** | The alias of the service owner. Note, an update with changed owner will move the service and any associated repositories to the new owner, but of course this will not move e.g. Jenkins jobs. That's your job. | +**Description** | Pointer to **string** | A short description of the functionality of the service. | [optional] +**Quicklinks** | [**[]Quicklink**](Quicklink.md) | A list of quicklinks related to the service | +**Repositories** | **[]string** | The keys of repositories associated with the service. When sending an update, they must refer to repositories that belong to this service, or the update will fail | +**AlertTarget** | **string** | The default channel used to send any alerts of the service to. Can be an email address or a Teams webhook URL | +**OperationType** | Pointer to **string** | The operation type of the service. 'WORKLOAD' follows the default deployment strategy of one instance per environment, 'PLATFORM' one instance per cluster or node and 'APPLICATION' is a standalone application that is not deployed via the common strategies. | [optional] [default to "WORKLOAD"] +**InternetExposed** | Pointer to **bool** | The value defines if the service is available from the internet and the time period in which security holes must be processed. | [optional] +**Tags** | Pointer to **[]string** | | [optional] +**Labels** | Pointer to **map[string]string** | | [optional] +**Spec** | Pointer to [**ServiceSpecDto**](ServiceSpecDto.md) | | [optional] +**PostPromotes** | Pointer to [**PostPromote**](PostPromote.md) | Post promote dependencies. | [optional] +**TimeStamp** | **string** | ISO-8601 UTC date time at which this information was originally committed. When sending an update, include the original timestamp you got so we can detect concurrent updates. | +**CommitHash** | **string** | The git commit hash this information was originally committed under. When sending an update, include the original commitHash you got so we can detect concurrent updates. | +**JiraIssue** | **string** | The jira issue to use for committing a change, or the last jira issue used. | +**Lifecycle** | Pointer to **string** | The current phase of the service's development. A service usually starts off as 'experimental', then becomes 'operational' (i. e. can be reliably used and/or consumed). Once 'deprecated', the service doesn’t guarantee reliable use/consumption any longer and if 'decommissionable', the service will soon cease to exist. | [optional] + +## Methods + +### NewServiceDto + +`func NewServiceDto(owner string, quicklinks []Quicklink, repositories []string, alertTarget string, timeStamp string, commitHash string, jiraIssue string, ) *ServiceDto` + +NewServiceDto instantiates a new ServiceDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceDtoWithDefaults + +`func NewServiceDtoWithDefaults() *ServiceDto` + +NewServiceDtoWithDefaults instantiates a new ServiceDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOwner + +`func (o *ServiceDto) GetOwner() string` + +GetOwner returns the Owner field if non-nil, zero value otherwise. + +### GetOwnerOk + +`func (o *ServiceDto) GetOwnerOk() (*string, bool)` + +GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwner + +`func (o *ServiceDto) SetOwner(v string)` + +SetOwner sets Owner field to given value. + + +### GetDescription + +`func (o *ServiceDto) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ServiceDto) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ServiceDto) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ServiceDto) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetQuicklinks + +`func (o *ServiceDto) GetQuicklinks() []Quicklink` + +GetQuicklinks returns the Quicklinks field if non-nil, zero value otherwise. + +### GetQuicklinksOk + +`func (o *ServiceDto) GetQuicklinksOk() (*[]Quicklink, bool)` + +GetQuicklinksOk returns a tuple with the Quicklinks field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuicklinks + +`func (o *ServiceDto) SetQuicklinks(v []Quicklink)` + +SetQuicklinks sets Quicklinks field to given value. + + +### GetRepositories + +`func (o *ServiceDto) GetRepositories() []string` + +GetRepositories returns the Repositories field if non-nil, zero value otherwise. + +### GetRepositoriesOk + +`func (o *ServiceDto) GetRepositoriesOk() (*[]string, bool)` + +GetRepositoriesOk returns a tuple with the Repositories field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRepositories + +`func (o *ServiceDto) SetRepositories(v []string)` + +SetRepositories sets Repositories field to given value. + + +### GetAlertTarget + +`func (o *ServiceDto) GetAlertTarget() string` + +GetAlertTarget returns the AlertTarget field if non-nil, zero value otherwise. + +### GetAlertTargetOk + +`func (o *ServiceDto) GetAlertTargetOk() (*string, bool)` + +GetAlertTargetOk returns a tuple with the AlertTarget field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAlertTarget + +`func (o *ServiceDto) SetAlertTarget(v string)` + +SetAlertTarget sets AlertTarget field to given value. + + +### GetOperationType + +`func (o *ServiceDto) GetOperationType() string` + +GetOperationType returns the OperationType field if non-nil, zero value otherwise. + +### GetOperationTypeOk + +`func (o *ServiceDto) GetOperationTypeOk() (*string, bool)` + +GetOperationTypeOk returns a tuple with the OperationType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOperationType + +`func (o *ServiceDto) SetOperationType(v string)` + +SetOperationType sets OperationType field to given value. + +### HasOperationType + +`func (o *ServiceDto) HasOperationType() bool` + +HasOperationType returns a boolean if a field has been set. + +### GetInternetExposed + +`func (o *ServiceDto) GetInternetExposed() bool` + +GetInternetExposed returns the InternetExposed field if non-nil, zero value otherwise. + +### GetInternetExposedOk + +`func (o *ServiceDto) GetInternetExposedOk() (*bool, bool)` + +GetInternetExposedOk returns a tuple with the InternetExposed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInternetExposed + +`func (o *ServiceDto) SetInternetExposed(v bool)` + +SetInternetExposed sets InternetExposed field to given value. + +### HasInternetExposed + +`func (o *ServiceDto) HasInternetExposed() bool` + +HasInternetExposed returns a boolean if a field has been set. + +### GetTags + +`func (o *ServiceDto) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ServiceDto) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ServiceDto) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *ServiceDto) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetLabels + +`func (o *ServiceDto) GetLabels() map[string]string` + +GetLabels returns the Labels field if non-nil, zero value otherwise. + +### GetLabelsOk + +`func (o *ServiceDto) GetLabelsOk() (*map[string]string, bool)` + +GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabels + +`func (o *ServiceDto) SetLabels(v map[string]string)` + +SetLabels sets Labels field to given value. + +### HasLabels + +`func (o *ServiceDto) HasLabels() bool` + +HasLabels returns a boolean if a field has been set. + +### GetSpec + +`func (o *ServiceDto) GetSpec() ServiceSpecDto` + +GetSpec returns the Spec field if non-nil, zero value otherwise. + +### GetSpecOk + +`func (o *ServiceDto) GetSpecOk() (*ServiceSpecDto, bool)` + +GetSpecOk returns a tuple with the Spec field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSpec + +`func (o *ServiceDto) SetSpec(v ServiceSpecDto)` + +SetSpec sets Spec field to given value. + +### HasSpec + +`func (o *ServiceDto) HasSpec() bool` + +HasSpec returns a boolean if a field has been set. + +### GetPostPromotes + +`func (o *ServiceDto) GetPostPromotes() PostPromote` + +GetPostPromotes returns the PostPromotes field if non-nil, zero value otherwise. + +### GetPostPromotesOk + +`func (o *ServiceDto) GetPostPromotesOk() (*PostPromote, bool)` + +GetPostPromotesOk returns a tuple with the PostPromotes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPostPromotes + +`func (o *ServiceDto) SetPostPromotes(v PostPromote)` + +SetPostPromotes sets PostPromotes field to given value. + +### HasPostPromotes + +`func (o *ServiceDto) HasPostPromotes() bool` + +HasPostPromotes returns a boolean if a field has been set. + +### GetTimeStamp + +`func (o *ServiceDto) GetTimeStamp() string` + +GetTimeStamp returns the TimeStamp field if non-nil, zero value otherwise. + +### GetTimeStampOk + +`func (o *ServiceDto) GetTimeStampOk() (*string, bool)` + +GetTimeStampOk returns a tuple with the TimeStamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeStamp + +`func (o *ServiceDto) SetTimeStamp(v string)` + +SetTimeStamp sets TimeStamp field to given value. + + +### GetCommitHash + +`func (o *ServiceDto) GetCommitHash() string` + +GetCommitHash returns the CommitHash field if non-nil, zero value otherwise. + +### GetCommitHashOk + +`func (o *ServiceDto) GetCommitHashOk() (*string, bool)` + +GetCommitHashOk returns a tuple with the CommitHash field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommitHash + +`func (o *ServiceDto) SetCommitHash(v string)` + +SetCommitHash sets CommitHash field to given value. + + +### GetJiraIssue + +`func (o *ServiceDto) GetJiraIssue() string` + +GetJiraIssue returns the JiraIssue field if non-nil, zero value otherwise. + +### GetJiraIssueOk + +`func (o *ServiceDto) GetJiraIssueOk() (*string, bool)` + +GetJiraIssueOk returns a tuple with the JiraIssue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJiraIssue + +`func (o *ServiceDto) SetJiraIssue(v string)` + +SetJiraIssue sets JiraIssue field to given value. + + +### GetLifecycle + +`func (o *ServiceDto) GetLifecycle() string` + +GetLifecycle returns the Lifecycle field if non-nil, zero value otherwise. + +### GetLifecycleOk + +`func (o *ServiceDto) GetLifecycleOk() (*string, bool)` + +GetLifecycleOk returns a tuple with the Lifecycle field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLifecycle + +`func (o *ServiceDto) SetLifecycle(v string)` + +SetLifecycle sets Lifecycle field to given value. + +### HasLifecycle + +`func (o *ServiceDto) HasLifecycle() bool` + +HasLifecycle returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ServiceListDto.md b/docs/ServiceListDto.md new file mode 100644 index 0000000..f4dedda --- /dev/null +++ b/docs/ServiceListDto.md @@ -0,0 +1,72 @@ +# ServiceListDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Services** | [**map[string]ServiceDto**](ServiceDto.md) | | +**TimeStamp** | **string** | ISO-8601 UTC date time at which the list of services was obtained from service-metadata | + +## Methods + +### NewServiceListDto + +`func NewServiceListDto(services map[string]ServiceDto, timeStamp string, ) *ServiceListDto` + +NewServiceListDto instantiates a new ServiceListDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceListDtoWithDefaults + +`func NewServiceListDtoWithDefaults() *ServiceListDto` + +NewServiceListDtoWithDefaults instantiates a new ServiceListDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetServices + +`func (o *ServiceListDto) GetServices() map[string]ServiceDto` + +GetServices returns the Services field if non-nil, zero value otherwise. + +### GetServicesOk + +`func (o *ServiceListDto) GetServicesOk() (*map[string]ServiceDto, bool)` + +GetServicesOk returns a tuple with the Services field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServices + +`func (o *ServiceListDto) SetServices(v map[string]ServiceDto)` + +SetServices sets Services field to given value. + + +### GetTimeStamp + +`func (o *ServiceListDto) GetTimeStamp() string` + +GetTimeStamp returns the TimeStamp field if non-nil, zero value otherwise. + +### GetTimeStampOk + +`func (o *ServiceListDto) GetTimeStampOk() (*string, bool)` + +GetTimeStampOk returns a tuple with the TimeStamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeStamp + +`func (o *ServiceListDto) SetTimeStamp(v string)` + +SetTimeStamp sets TimeStamp field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ServicePatchDto.md b/docs/ServicePatchDto.md new file mode 100644 index 0000000..51d3918 --- /dev/null +++ b/docs/ServicePatchDto.md @@ -0,0 +1,405 @@ +# ServicePatchDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Owner** | Pointer to **string** | The alias of the service owner. Note, a patch with changed owner will move the service and any associated repositories to the new owner, but of course this will not move e.g. Jenkins jobs. That's your job. | [optional] +**Description** | Pointer to **string** | A short description of the functionality of the service. | [optional] +**Quicklinks** | Pointer to [**[]Quicklink**](Quicklink.md) | A list of quicklinks related to the service | [optional] +**Repositories** | Pointer to **[]string** | The keys of repositories associated with the service. When sending an update, they must refer to repositories that belong to this service, or the update will fail | [optional] +**AlertTarget** | Pointer to **string** | The default channel used to send any alerts of the service to. Can be an email address or a Teams webhook URL | [optional] +**OperationType** | Pointer to **string** | The operation type of the service. 'WORKLOAD' follows the default deployment strategy of one instance per environment, 'PLATFORM' one instance per cluster or node and 'APPLICATION' is a standalone application that is not deployed via the common strategies. | [optional] [default to "WORKLOAD"] +**InternetExposed** | Pointer to **bool** | The value defines if the service is available from the internet and the time period in which security holes must be processed. | [optional] +**Tags** | Pointer to **[]string** | | [optional] +**Labels** | Pointer to **map[string]string** | | [optional] +**Spec** | Pointer to [**ServiceSpecDto**](ServiceSpecDto.md) | | [optional] +**PostPromotes** | Pointer to [**PostPromote**](PostPromote.md) | Post promote dependencies. | [optional] +**TimeStamp** | **string** | ISO-8601 UTC date time at which this information was originally committed. When sending an update, include the original timestamp you got so we can detect concurrent updates. | +**CommitHash** | **string** | The git commit hash this information was originally committed under. When sending an update, include the original commitHash you got so we can detect concurrent updates. | +**JiraIssue** | **string** | The jira issue to use for committing a change, or the last jira issue used. | +**Lifecycle** | Pointer to **string** | The current phase of the service's development. A service usually starts off as 'experimental', then becomes 'operational' (i. e. can be reliably used and/or consumed). Once 'deprecated', the service doesn’t guarantee reliable use/consumption any longer. | [optional] + +## Methods + +### NewServicePatchDto + +`func NewServicePatchDto(timeStamp string, commitHash string, jiraIssue string, ) *ServicePatchDto` + +NewServicePatchDto instantiates a new ServicePatchDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServicePatchDtoWithDefaults + +`func NewServicePatchDtoWithDefaults() *ServicePatchDto` + +NewServicePatchDtoWithDefaults instantiates a new ServicePatchDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOwner + +`func (o *ServicePatchDto) GetOwner() string` + +GetOwner returns the Owner field if non-nil, zero value otherwise. + +### GetOwnerOk + +`func (o *ServicePatchDto) GetOwnerOk() (*string, bool)` + +GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwner + +`func (o *ServicePatchDto) SetOwner(v string)` + +SetOwner sets Owner field to given value. + +### HasOwner + +`func (o *ServicePatchDto) HasOwner() bool` + +HasOwner returns a boolean if a field has been set. + +### GetDescription + +`func (o *ServicePatchDto) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ServicePatchDto) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ServicePatchDto) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ServicePatchDto) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetQuicklinks + +`func (o *ServicePatchDto) GetQuicklinks() []Quicklink` + +GetQuicklinks returns the Quicklinks field if non-nil, zero value otherwise. + +### GetQuicklinksOk + +`func (o *ServicePatchDto) GetQuicklinksOk() (*[]Quicklink, bool)` + +GetQuicklinksOk returns a tuple with the Quicklinks field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuicklinks + +`func (o *ServicePatchDto) SetQuicklinks(v []Quicklink)` + +SetQuicklinks sets Quicklinks field to given value. + +### HasQuicklinks + +`func (o *ServicePatchDto) HasQuicklinks() bool` + +HasQuicklinks returns a boolean if a field has been set. + +### GetRepositories + +`func (o *ServicePatchDto) GetRepositories() []string` + +GetRepositories returns the Repositories field if non-nil, zero value otherwise. + +### GetRepositoriesOk + +`func (o *ServicePatchDto) GetRepositoriesOk() (*[]string, bool)` + +GetRepositoriesOk returns a tuple with the Repositories field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRepositories + +`func (o *ServicePatchDto) SetRepositories(v []string)` + +SetRepositories sets Repositories field to given value. + +### HasRepositories + +`func (o *ServicePatchDto) HasRepositories() bool` + +HasRepositories returns a boolean if a field has been set. + +### GetAlertTarget + +`func (o *ServicePatchDto) GetAlertTarget() string` + +GetAlertTarget returns the AlertTarget field if non-nil, zero value otherwise. + +### GetAlertTargetOk + +`func (o *ServicePatchDto) GetAlertTargetOk() (*string, bool)` + +GetAlertTargetOk returns a tuple with the AlertTarget field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAlertTarget + +`func (o *ServicePatchDto) SetAlertTarget(v string)` + +SetAlertTarget sets AlertTarget field to given value. + +### HasAlertTarget + +`func (o *ServicePatchDto) HasAlertTarget() bool` + +HasAlertTarget returns a boolean if a field has been set. + +### GetOperationType + +`func (o *ServicePatchDto) GetOperationType() string` + +GetOperationType returns the OperationType field if non-nil, zero value otherwise. + +### GetOperationTypeOk + +`func (o *ServicePatchDto) GetOperationTypeOk() (*string, bool)` + +GetOperationTypeOk returns a tuple with the OperationType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOperationType + +`func (o *ServicePatchDto) SetOperationType(v string)` + +SetOperationType sets OperationType field to given value. + +### HasOperationType + +`func (o *ServicePatchDto) HasOperationType() bool` + +HasOperationType returns a boolean if a field has been set. + +### GetInternetExposed + +`func (o *ServicePatchDto) GetInternetExposed() bool` + +GetInternetExposed returns the InternetExposed field if non-nil, zero value otherwise. + +### GetInternetExposedOk + +`func (o *ServicePatchDto) GetInternetExposedOk() (*bool, bool)` + +GetInternetExposedOk returns a tuple with the InternetExposed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInternetExposed + +`func (o *ServicePatchDto) SetInternetExposed(v bool)` + +SetInternetExposed sets InternetExposed field to given value. + +### HasInternetExposed + +`func (o *ServicePatchDto) HasInternetExposed() bool` + +HasInternetExposed returns a boolean if a field has been set. + +### GetTags + +`func (o *ServicePatchDto) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ServicePatchDto) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ServicePatchDto) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *ServicePatchDto) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetLabels + +`func (o *ServicePatchDto) GetLabels() map[string]string` + +GetLabels returns the Labels field if non-nil, zero value otherwise. + +### GetLabelsOk + +`func (o *ServicePatchDto) GetLabelsOk() (*map[string]string, bool)` + +GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabels + +`func (o *ServicePatchDto) SetLabels(v map[string]string)` + +SetLabels sets Labels field to given value. + +### HasLabels + +`func (o *ServicePatchDto) HasLabels() bool` + +HasLabels returns a boolean if a field has been set. + +### GetSpec + +`func (o *ServicePatchDto) GetSpec() ServiceSpecDto` + +GetSpec returns the Spec field if non-nil, zero value otherwise. + +### GetSpecOk + +`func (o *ServicePatchDto) GetSpecOk() (*ServiceSpecDto, bool)` + +GetSpecOk returns a tuple with the Spec field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSpec + +`func (o *ServicePatchDto) SetSpec(v ServiceSpecDto)` + +SetSpec sets Spec field to given value. + +### HasSpec + +`func (o *ServicePatchDto) HasSpec() bool` + +HasSpec returns a boolean if a field has been set. + +### GetPostPromotes + +`func (o *ServicePatchDto) GetPostPromotes() PostPromote` + +GetPostPromotes returns the PostPromotes field if non-nil, zero value otherwise. + +### GetPostPromotesOk + +`func (o *ServicePatchDto) GetPostPromotesOk() (*PostPromote, bool)` + +GetPostPromotesOk returns a tuple with the PostPromotes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPostPromotes + +`func (o *ServicePatchDto) SetPostPromotes(v PostPromote)` + +SetPostPromotes sets PostPromotes field to given value. + +### HasPostPromotes + +`func (o *ServicePatchDto) HasPostPromotes() bool` + +HasPostPromotes returns a boolean if a field has been set. + +### GetTimeStamp + +`func (o *ServicePatchDto) GetTimeStamp() string` + +GetTimeStamp returns the TimeStamp field if non-nil, zero value otherwise. + +### GetTimeStampOk + +`func (o *ServicePatchDto) GetTimeStampOk() (*string, bool)` + +GetTimeStampOk returns a tuple with the TimeStamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeStamp + +`func (o *ServicePatchDto) SetTimeStamp(v string)` + +SetTimeStamp sets TimeStamp field to given value. + + +### GetCommitHash + +`func (o *ServicePatchDto) GetCommitHash() string` + +GetCommitHash returns the CommitHash field if non-nil, zero value otherwise. + +### GetCommitHashOk + +`func (o *ServicePatchDto) GetCommitHashOk() (*string, bool)` + +GetCommitHashOk returns a tuple with the CommitHash field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommitHash + +`func (o *ServicePatchDto) SetCommitHash(v string)` + +SetCommitHash sets CommitHash field to given value. + + +### GetJiraIssue + +`func (o *ServicePatchDto) GetJiraIssue() string` + +GetJiraIssue returns the JiraIssue field if non-nil, zero value otherwise. + +### GetJiraIssueOk + +`func (o *ServicePatchDto) GetJiraIssueOk() (*string, bool)` + +GetJiraIssueOk returns a tuple with the JiraIssue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJiraIssue + +`func (o *ServicePatchDto) SetJiraIssue(v string)` + +SetJiraIssue sets JiraIssue field to given value. + + +### GetLifecycle + +`func (o *ServicePatchDto) GetLifecycle() string` + +GetLifecycle returns the Lifecycle field if non-nil, zero value otherwise. + +### GetLifecycleOk + +`func (o *ServicePatchDto) GetLifecycleOk() (*string, bool)` + +GetLifecycleOk returns a tuple with the Lifecycle field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLifecycle + +`func (o *ServicePatchDto) SetLifecycle(v string)` + +SetLifecycle sets Lifecycle field to given value. + +### HasLifecycle + +`func (o *ServicePatchDto) HasLifecycle() bool` + +HasLifecycle returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ServicePromotersDto.md b/docs/ServicePromotersDto.md new file mode 100644 index 0000000..8fb1d7f --- /dev/null +++ b/docs/ServicePromotersDto.md @@ -0,0 +1,51 @@ +# ServicePromotersDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Promoters** | **[]string** | | + +## Methods + +### NewServicePromotersDto + +`func NewServicePromotersDto(promoters []string, ) *ServicePromotersDto` + +NewServicePromotersDto instantiates a new ServicePromotersDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServicePromotersDtoWithDefaults + +`func NewServicePromotersDtoWithDefaults() *ServicePromotersDto` + +NewServicePromotersDtoWithDefaults instantiates a new ServicePromotersDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPromoters + +`func (o *ServicePromotersDto) GetPromoters() []string` + +GetPromoters returns the Promoters field if non-nil, zero value otherwise. + +### GetPromotersOk + +`func (o *ServicePromotersDto) GetPromotersOk() (*[]string, bool)` + +GetPromotersOk returns a tuple with the Promoters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPromoters + +`func (o *ServicePromotersDto) SetPromoters(v []string)` + +SetPromoters sets Promoters field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ServiceSpecDto.md b/docs/ServiceSpecDto.md new file mode 100644 index 0000000..2448a7e --- /dev/null +++ b/docs/ServiceSpecDto.md @@ -0,0 +1,134 @@ +# ServiceSpecDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**System** | Pointer to **string** | A reference to the system that the component belongs to | [optional] +**DependsOn** | Pointer to **[]string** | A relation denoting a dependency on another entity | [optional] +**ProvidesApis** | Pointer to **[]string** | A relation with an API, provided by this entity | [optional] +**ConsumesApis** | Pointer to **[]string** | A relation with an API, consumed by this entity | [optional] + +## Methods + +### NewServiceSpecDto + +`func NewServiceSpecDto() *ServiceSpecDto` + +NewServiceSpecDto instantiates a new ServiceSpecDto object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceSpecDtoWithDefaults + +`func NewServiceSpecDtoWithDefaults() *ServiceSpecDto` + +NewServiceSpecDtoWithDefaults instantiates a new ServiceSpecDto object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSystem + +`func (o *ServiceSpecDto) GetSystem() string` + +GetSystem returns the System field if non-nil, zero value otherwise. + +### GetSystemOk + +`func (o *ServiceSpecDto) GetSystemOk() (*string, bool)` + +GetSystemOk returns a tuple with the System field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSystem + +`func (o *ServiceSpecDto) SetSystem(v string)` + +SetSystem sets System field to given value. + +### HasSystem + +`func (o *ServiceSpecDto) HasSystem() bool` + +HasSystem returns a boolean if a field has been set. + +### GetDependsOn + +`func (o *ServiceSpecDto) GetDependsOn() []string` + +GetDependsOn returns the DependsOn field if non-nil, zero value otherwise. + +### GetDependsOnOk + +`func (o *ServiceSpecDto) GetDependsOnOk() (*[]string, bool)` + +GetDependsOnOk returns a tuple with the DependsOn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDependsOn + +`func (o *ServiceSpecDto) SetDependsOn(v []string)` + +SetDependsOn sets DependsOn field to given value. + +### HasDependsOn + +`func (o *ServiceSpecDto) HasDependsOn() bool` + +HasDependsOn returns a boolean if a field has been set. + +### GetProvidesApis + +`func (o *ServiceSpecDto) GetProvidesApis() []string` + +GetProvidesApis returns the ProvidesApis field if non-nil, zero value otherwise. + +### GetProvidesApisOk + +`func (o *ServiceSpecDto) GetProvidesApisOk() (*[]string, bool)` + +GetProvidesApisOk returns a tuple with the ProvidesApis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvidesApis + +`func (o *ServiceSpecDto) SetProvidesApis(v []string)` + +SetProvidesApis sets ProvidesApis field to given value. + +### HasProvidesApis + +`func (o *ServiceSpecDto) HasProvidesApis() bool` + +HasProvidesApis returns a boolean if a field has been set. + +### GetConsumesApis + +`func (o *ServiceSpecDto) GetConsumesApis() []string` + +GetConsumesApis returns the ConsumesApis field if non-nil, zero value otherwise. + +### GetConsumesApisOk + +`func (o *ServiceSpecDto) GetConsumesApisOk() (*[]string, bool)` + +GetConsumesApisOk returns a tuple with the ConsumesApis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConsumesApis + +`func (o *ServiceSpecDto) SetConsumesApis(v []string)` + +SetConsumesApis sets ConsumesApis field to given value. + +### HasConsumesApis + +`func (o *ServiceSpecDto) HasConsumesApis() bool` + +HasConsumesApis returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/WebhooksAPI.md b/docs/WebhooksAPI.md new file mode 100644 index 0000000..ed6e3e7 --- /dev/null +++ b/docs/WebhooksAPI.md @@ -0,0 +1,71 @@ +# \WebhooksAPI + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**PostWebhook**](WebhooksAPI.md#PostWebhook) | **Post** /webhooks/vcs/github | + + + +## PostWebhook + +> PostWebhook(ctx).Body(body).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Interhyp/metadata-service-api" +) + +func main() { + body := map[string]interface{}{ ... } // map[string]interface{} | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.WebhooksAPI.PostWebhook(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WebhooksAPI.PostWebhook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiPostWebhookRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **map[string]interface{}** | | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..be0aa78 --- /dev/null +++ b/go.mod @@ -0,0 +1,6 @@ +module github.com/Interhyp/metadata-service-api + +go 1.18 + +require ( +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..c966c8d --- /dev/null +++ b/go.sum @@ -0,0 +1,11 @@ +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..46bd71f --- /dev/null +++ b/mise.toml @@ -0,0 +1,2 @@ +[tools] +node = "22.15.0" diff --git a/model_binary.go b/model_binary.go new file mode 100644 index 0000000..fe9a030 --- /dev/null +++ b/model_binary.go @@ -0,0 +1,306 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the Binary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Binary{} + +// Binary Parameters to identify a binary in e.g. nexus +type Binary struct { + // The group id of binary + GroupId string `json:"groupId"` + // The artifact id of binary + ArtifactId string `json:"artifactId"` + // The version prefix of binary + VersionPrefix string `json:"versionPrefix"` + // The classifier of binary + Classifier *string `json:"classifier,omitempty"` + // The file type of binary e.g. tar.gz + FileType *string `json:"fileType,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _Binary Binary + +// NewBinary instantiates a new Binary object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBinary(groupId string, artifactId string, versionPrefix string) *Binary { + this := Binary{} + this.GroupId = groupId + this.ArtifactId = artifactId + this.VersionPrefix = versionPrefix + return &this +} + +// NewBinaryWithDefaults instantiates a new Binary object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBinaryWithDefaults() *Binary { + this := Binary{} + return &this +} + +// GetGroupId returns the GroupId field value +func (o *Binary) GetGroupId() string { + if o == nil { + var ret string + return ret + } + + return o.GroupId +} + +// GetGroupIdOk returns a tuple with the GroupId field value +// and a boolean to check if the value has been set. +func (o *Binary) GetGroupIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.GroupId, true +} + +// SetGroupId sets field value +func (o *Binary) SetGroupId(v string) { + o.GroupId = v +} + +// GetArtifactId returns the ArtifactId field value +func (o *Binary) GetArtifactId() string { + if o == nil { + var ret string + return ret + } + + return o.ArtifactId +} + +// GetArtifactIdOk returns a tuple with the ArtifactId field value +// and a boolean to check if the value has been set. +func (o *Binary) GetArtifactIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ArtifactId, true +} + +// SetArtifactId sets field value +func (o *Binary) SetArtifactId(v string) { + o.ArtifactId = v +} + +// GetVersionPrefix returns the VersionPrefix field value +func (o *Binary) GetVersionPrefix() string { + if o == nil { + var ret string + return ret + } + + return o.VersionPrefix +} + +// GetVersionPrefixOk returns a tuple with the VersionPrefix field value +// and a boolean to check if the value has been set. +func (o *Binary) GetVersionPrefixOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.VersionPrefix, true +} + +// SetVersionPrefix sets field value +func (o *Binary) SetVersionPrefix(v string) { + o.VersionPrefix = v +} + +// GetClassifier returns the Classifier field value if set, zero value otherwise. +func (o *Binary) GetClassifier() string { + if o == nil || IsNil(o.Classifier) { + var ret string + return ret + } + return *o.Classifier +} + +// GetClassifierOk returns a tuple with the Classifier field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Binary) GetClassifierOk() (*string, bool) { + if o == nil || IsNil(o.Classifier) { + return nil, false + } + return o.Classifier, true +} + +// HasClassifier returns a boolean if a field has been set. +func (o *Binary) HasClassifier() bool { + if o != nil && !IsNil(o.Classifier) { + return true + } + + return false +} + +// SetClassifier gets a reference to the given string and assigns it to the Classifier field. +func (o *Binary) SetClassifier(v string) { + o.Classifier = &v +} + +// GetFileType returns the FileType field value if set, zero value otherwise. +func (o *Binary) GetFileType() string { + if o == nil || IsNil(o.FileType) { + var ret string + return ret + } + return *o.FileType +} + +// GetFileTypeOk returns a tuple with the FileType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Binary) GetFileTypeOk() (*string, bool) { + if o == nil || IsNil(o.FileType) { + return nil, false + } + return o.FileType, true +} + +// HasFileType returns a boolean if a field has been set. +func (o *Binary) HasFileType() bool { + if o != nil && !IsNil(o.FileType) { + return true + } + + return false +} + +// SetFileType gets a reference to the given string and assigns it to the FileType field. +func (o *Binary) SetFileType(v string) { + o.FileType = &v +} + +func (o Binary) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Binary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["groupId"] = o.GroupId + toSerialize["artifactId"] = o.ArtifactId + toSerialize["versionPrefix"] = o.VersionPrefix + if !IsNil(o.Classifier) { + toSerialize["classifier"] = o.Classifier + } + if !IsNil(o.FileType) { + toSerialize["fileType"] = o.FileType + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Binary) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "groupId", + "artifactId", + "versionPrefix", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBinary := _Binary{} + + err = json.Unmarshal(data, &varBinary) + + if err != nil { + return err + } + + *o = Binary(varBinary) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "groupId") + delete(additionalProperties, "artifactId") + delete(additionalProperties, "versionPrefix") + delete(additionalProperties, "classifier") + delete(additionalProperties, "fileType") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableBinary struct { + value *Binary + isSet bool +} + +func (v NullableBinary) Get() *Binary { + return v.value +} + +func (v *NullableBinary) Set(val *Binary) { + v.value = val + v.isSet = true +} + +func (v NullableBinary) IsSet() bool { + return v.isSet +} + +func (v *NullableBinary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBinary(val *Binary) *NullableBinary { + return &NullableBinary{value: val, isSet: true} +} + +func (v NullableBinary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBinary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_condition_reference_dto.go b/model_condition_reference_dto.go new file mode 100644 index 0000000..c920787 --- /dev/null +++ b/model_condition_reference_dto.go @@ -0,0 +1,246 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the ConditionReferenceDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConditionReferenceDto{} + +// ConditionReferenceDto Configuration of conditional build references. +type ConditionReferenceDto struct { + // Reference of a branch. + RefMatcher string `json:"refMatcher"` + // list of users or groups for which this protection does not apply. + Exemptions []string `json:"exemptions,omitempty"` + // The expected source for the required conditional build. + Source *string `json:"source,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ConditionReferenceDto ConditionReferenceDto + +// NewConditionReferenceDto instantiates a new ConditionReferenceDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConditionReferenceDto(refMatcher string) *ConditionReferenceDto { + this := ConditionReferenceDto{} + this.RefMatcher = refMatcher + return &this +} + +// NewConditionReferenceDtoWithDefaults instantiates a new ConditionReferenceDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConditionReferenceDtoWithDefaults() *ConditionReferenceDto { + this := ConditionReferenceDto{} + return &this +} + +// GetRefMatcher returns the RefMatcher field value +func (o *ConditionReferenceDto) GetRefMatcher() string { + if o == nil { + var ret string + return ret + } + + return o.RefMatcher +} + +// GetRefMatcherOk returns a tuple with the RefMatcher field value +// and a boolean to check if the value has been set. +func (o *ConditionReferenceDto) GetRefMatcherOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RefMatcher, true +} + +// SetRefMatcher sets field value +func (o *ConditionReferenceDto) SetRefMatcher(v string) { + o.RefMatcher = v +} + +// GetExemptions returns the Exemptions field value if set, zero value otherwise. +func (o *ConditionReferenceDto) GetExemptions() []string { + if o == nil || IsNil(o.Exemptions) { + var ret []string + return ret + } + return o.Exemptions +} + +// GetExemptionsOk returns a tuple with the Exemptions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConditionReferenceDto) GetExemptionsOk() ([]string, bool) { + if o == nil || IsNil(o.Exemptions) { + return nil, false + } + return o.Exemptions, true +} + +// HasExemptions returns a boolean if a field has been set. +func (o *ConditionReferenceDto) HasExemptions() bool { + if o != nil && !IsNil(o.Exemptions) { + return true + } + + return false +} + +// SetExemptions gets a reference to the given []string and assigns it to the Exemptions field. +func (o *ConditionReferenceDto) SetExemptions(v []string) { + o.Exemptions = v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *ConditionReferenceDto) GetSource() string { + if o == nil || IsNil(o.Source) { + var ret string + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConditionReferenceDto) GetSourceOk() (*string, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *ConditionReferenceDto) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given string and assigns it to the Source field. +func (o *ConditionReferenceDto) SetSource(v string) { + o.Source = &v +} + +func (o ConditionReferenceDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConditionReferenceDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["refMatcher"] = o.RefMatcher + if !IsNil(o.Exemptions) { + toSerialize["exemptions"] = o.Exemptions + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ConditionReferenceDto) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "refMatcher", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConditionReferenceDto := _ConditionReferenceDto{} + + err = json.Unmarshal(data, &varConditionReferenceDto) + + if err != nil { + return err + } + + *o = ConditionReferenceDto(varConditionReferenceDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "refMatcher") + delete(additionalProperties, "exemptions") + delete(additionalProperties, "source") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableConditionReferenceDto struct { + value *ConditionReferenceDto + isSet bool +} + +func (v NullableConditionReferenceDto) Get() *ConditionReferenceDto { + return v.value +} + +func (v *NullableConditionReferenceDto) Set(val *ConditionReferenceDto) { + v.value = val + v.isSet = true +} + +func (v NullableConditionReferenceDto) IsSet() bool { + return v.isSet +} + +func (v *NullableConditionReferenceDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConditionReferenceDto(val *ConditionReferenceDto) *NullableConditionReferenceDto { + return &NullableConditionReferenceDto{value: val, isSet: true} +} + +func (v NullableConditionReferenceDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConditionReferenceDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_deletion_dto.go b/model_deletion_dto.go new file mode 100644 index 0000000..7a47f17 --- /dev/null +++ b/model_deletion_dto.go @@ -0,0 +1,170 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the DeletionDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeletionDto{} + +// DeletionDto struct for DeletionDto +type DeletionDto struct { + // The jira issue to use for committing the deletion. + JiraIssue string `json:"jiraIssue"` + AdditionalProperties map[string]interface{} +} + +type _DeletionDto DeletionDto + +// NewDeletionDto instantiates a new DeletionDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDeletionDto(jiraIssue string) *DeletionDto { + this := DeletionDto{} + this.JiraIssue = jiraIssue + return &this +} + +// NewDeletionDtoWithDefaults instantiates a new DeletionDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDeletionDtoWithDefaults() *DeletionDto { + this := DeletionDto{} + return &this +} + +// GetJiraIssue returns the JiraIssue field value +func (o *DeletionDto) GetJiraIssue() string { + if o == nil { + var ret string + return ret + } + + return o.JiraIssue +} + +// GetJiraIssueOk returns a tuple with the JiraIssue field value +// and a boolean to check if the value has been set. +func (o *DeletionDto) GetJiraIssueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraIssue, true +} + +// SetJiraIssue sets field value +func (o *DeletionDto) SetJiraIssue(v string) { + o.JiraIssue = v +} + +func (o DeletionDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeletionDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraIssue"] = o.JiraIssue + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DeletionDto) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraIssue", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDeletionDto := _DeletionDto{} + + err = json.Unmarshal(data, &varDeletionDto) + + if err != nil { + return err + } + + *o = DeletionDto(varDeletionDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraIssue") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDeletionDto struct { + value *DeletionDto + isSet bool +} + +func (v NullableDeletionDto) Get() *DeletionDto { + return v.value +} + +func (v *NullableDeletionDto) Set(val *DeletionDto) { + v.value = val + v.isSet = true +} + +func (v NullableDeletionDto) IsSet() bool { + return v.isSet +} + +func (v *NullableDeletionDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeletionDto(val *DeletionDto) *NullableDeletionDto { + return &NullableDeletionDto{value: val, isSet: true} +} + +func (v NullableDeletionDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeletionDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_error_dto.go b/model_error_dto.go new file mode 100644 index 0000000..193073a --- /dev/null +++ b/model_error_dto.go @@ -0,0 +1,231 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "time" +) + +// checks if the ErrorDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorDto{} + +// ErrorDto struct for ErrorDto +type ErrorDto struct { + Details *string `json:"details,omitempty"` + Message *string `json:"message,omitempty"` + Timestamp *time.Time `json:"timestamp,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ErrorDto ErrorDto + +// NewErrorDto instantiates a new ErrorDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewErrorDto() *ErrorDto { + this := ErrorDto{} + return &this +} + +// NewErrorDtoWithDefaults instantiates a new ErrorDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewErrorDtoWithDefaults() *ErrorDto { + this := ErrorDto{} + return &this +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *ErrorDto) GetDetails() string { + if o == nil || IsNil(o.Details) { + var ret string + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorDto) GetDetailsOk() (*string, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *ErrorDto) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given string and assigns it to the Details field. +func (o *ErrorDto) SetDetails(v string) { + o.Details = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *ErrorDto) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorDto) GetMessageOk() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *ErrorDto) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *ErrorDto) SetMessage(v string) { + o.Message = &v +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *ErrorDto) GetTimestamp() time.Time { + if o == nil || IsNil(o.Timestamp) { + var ret time.Time + return ret + } + return *o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorDto) GetTimestampOk() (*time.Time, bool) { + if o == nil || IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *ErrorDto) HasTimestamp() bool { + if o != nil && !IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given time.Time and assigns it to the Timestamp field. +func (o *ErrorDto) SetTimestamp(v time.Time) { + o.Timestamp = &v +} + +func (o ErrorDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ErrorDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ErrorDto) UnmarshalJSON(data []byte) (err error) { + varErrorDto := _ErrorDto{} + + err = json.Unmarshal(data, &varErrorDto) + + if err != nil { + return err + } + + *o = ErrorDto(varErrorDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "details") + delete(additionalProperties, "message") + delete(additionalProperties, "timestamp") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableErrorDto struct { + value *ErrorDto + isSet bool +} + +func (v NullableErrorDto) Get() *ErrorDto { + return v.value +} + +func (v *NullableErrorDto) Set(val *ErrorDto) { + v.value = val + v.isSet = true +} + +func (v NullableErrorDto) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorDto(val *ErrorDto) *NullableErrorDto { + return &NullableErrorDto{value: val, isSet: true} +} + +func (v NullableErrorDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_exclude_merge_check_user_dto.go b/model_exclude_merge_check_user_dto.go new file mode 100644 index 0000000..cac2434 --- /dev/null +++ b/model_exclude_merge_check_user_dto.go @@ -0,0 +1,170 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the ExcludeMergeCheckUserDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExcludeMergeCheckUserDto{} + +// ExcludeMergeCheckUserDto struct for ExcludeMergeCheckUserDto +type ExcludeMergeCheckUserDto struct { + // Name of merge check exclude user + Name string `json:"name"` + AdditionalProperties map[string]interface{} +} + +type _ExcludeMergeCheckUserDto ExcludeMergeCheckUserDto + +// NewExcludeMergeCheckUserDto instantiates a new ExcludeMergeCheckUserDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExcludeMergeCheckUserDto(name string) *ExcludeMergeCheckUserDto { + this := ExcludeMergeCheckUserDto{} + this.Name = name + return &this +} + +// NewExcludeMergeCheckUserDtoWithDefaults instantiates a new ExcludeMergeCheckUserDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExcludeMergeCheckUserDtoWithDefaults() *ExcludeMergeCheckUserDto { + this := ExcludeMergeCheckUserDto{} + return &this +} + +// GetName returns the Name field value +func (o *ExcludeMergeCheckUserDto) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ExcludeMergeCheckUserDto) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ExcludeMergeCheckUserDto) SetName(v string) { + o.Name = v +} + +func (o ExcludeMergeCheckUserDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExcludeMergeCheckUserDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ExcludeMergeCheckUserDto) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExcludeMergeCheckUserDto := _ExcludeMergeCheckUserDto{} + + err = json.Unmarshal(data, &varExcludeMergeCheckUserDto) + + if err != nil { + return err + } + + *o = ExcludeMergeCheckUserDto(varExcludeMergeCheckUserDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableExcludeMergeCheckUserDto struct { + value *ExcludeMergeCheckUserDto + isSet bool +} + +func (v NullableExcludeMergeCheckUserDto) Get() *ExcludeMergeCheckUserDto { + return v.value +} + +func (v *NullableExcludeMergeCheckUserDto) Set(val *ExcludeMergeCheckUserDto) { + v.value = val + v.isSet = true +} + +func (v NullableExcludeMergeCheckUserDto) IsSet() bool { + return v.isSet +} + +func (v *NullableExcludeMergeCheckUserDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExcludeMergeCheckUserDto(val *ExcludeMergeCheckUserDto) *NullableExcludeMergeCheckUserDto { + return &NullableExcludeMergeCheckUserDto{value: val, isSet: true} +} + +func (v NullableExcludeMergeCheckUserDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExcludeMergeCheckUserDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_health_component.go b/model_health_component.go new file mode 100644 index 0000000..a4dc7f7 --- /dev/null +++ b/model_health_component.go @@ -0,0 +1,193 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the HealthComponent type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HealthComponent{} + +// HealthComponent struct for HealthComponent +type HealthComponent struct { + Description *string `json:"description,omitempty"` + Status *string `json:"status,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _HealthComponent HealthComponent + +// NewHealthComponent instantiates a new HealthComponent object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHealthComponent() *HealthComponent { + this := HealthComponent{} + return &this +} + +// NewHealthComponentWithDefaults instantiates a new HealthComponent object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHealthComponentWithDefaults() *HealthComponent { + this := HealthComponent{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *HealthComponent) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthComponent) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *HealthComponent) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *HealthComponent) SetDescription(v string) { + o.Description = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *HealthComponent) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HealthComponent) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *HealthComponent) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *HealthComponent) SetStatus(v string) { + o.Status = &v +} + +func (o HealthComponent) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HealthComponent) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *HealthComponent) UnmarshalJSON(data []byte) (err error) { + varHealthComponent := _HealthComponent{} + + err = json.Unmarshal(data, &varHealthComponent) + + if err != nil { + return err + } + + *o = HealthComponent(varHealthComponent) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "description") + delete(additionalProperties, "status") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableHealthComponent struct { + value *HealthComponent + isSet bool +} + +func (v NullableHealthComponent) Get() *HealthComponent { + return v.value +} + +func (v *NullableHealthComponent) Set(val *HealthComponent) { + v.value = val + v.isSet = true +} + +func (v NullableHealthComponent) IsSet() bool { + return v.isSet +} + +func (v *NullableHealthComponent) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHealthComponent(val *HealthComponent) *NullableHealthComponent { + return &NullableHealthComponent{value: val, isSet: true} +} + +func (v NullableHealthComponent) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHealthComponent) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_link.go b/model_link.go new file mode 100644 index 0000000..9e009a7 --- /dev/null +++ b/model_link.go @@ -0,0 +1,193 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the Link type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Link{} + +// Link A link +type Link struct { + Url *string `json:"url,omitempty"` + Title *string `json:"title,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _Link Link + +// NewLink instantiates a new Link object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLink() *Link { + this := Link{} + return &this +} + +// NewLinkWithDefaults instantiates a new Link object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLinkWithDefaults() *Link { + this := Link{} + return &this +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *Link) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Link) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *Link) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *Link) SetUrl(v string) { + o.Url = &v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *Link) GetTitle() string { + if o == nil || IsNil(o.Title) { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Link) GetTitleOk() (*string, bool) { + if o == nil || IsNil(o.Title) { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *Link) HasTitle() bool { + if o != nil && !IsNil(o.Title) { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *Link) SetTitle(v string) { + o.Title = &v +} + +func (o Link) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Link) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Link) UnmarshalJSON(data []byte) (err error) { + varLink := _Link{} + + err = json.Unmarshal(data, &varLink) + + if err != nil { + return err + } + + *o = Link(varLink) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "url") + delete(additionalProperties, "title") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableLink struct { + value *Link + isSet bool +} + +func (v NullableLink) Get() *Link { + return v.value +} + +func (v *NullableLink) Set(val *Link) { + v.value = val + v.isSet = true +} + +func (v NullableLink) IsSet() bool { + return v.isSet +} + +func (v *NullableLink) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLink(val *Link) *NullableLink { + return &NullableLink{value: val, isSet: true} +} + +func (v NullableLink) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLink) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_merge_strategy.go b/model_merge_strategy.go new file mode 100644 index 0000000..e7e248b --- /dev/null +++ b/model_merge_strategy.go @@ -0,0 +1,159 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the MergeStrategy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MergeStrategy{} + +// MergeStrategy struct for MergeStrategy +type MergeStrategy struct { + Id string `json:"id"` +} + +type _MergeStrategy MergeStrategy + +// NewMergeStrategy instantiates a new MergeStrategy object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMergeStrategy(id string) *MergeStrategy { + this := MergeStrategy{} + this.Id = id + return &this +} + +// NewMergeStrategyWithDefaults instantiates a new MergeStrategy object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMergeStrategyWithDefaults() *MergeStrategy { + this := MergeStrategy{} + return &this +} + +// GetId returns the Id field value +func (o *MergeStrategy) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *MergeStrategy) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *MergeStrategy) SetId(v string) { + o.Id = v +} + +func (o MergeStrategy) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MergeStrategy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + return toSerialize, nil +} + +func (o *MergeStrategy) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMergeStrategy := _MergeStrategy{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMergeStrategy) + + if err != nil { + return err + } + + *o = MergeStrategy(varMergeStrategy) + + return err +} + +type NullableMergeStrategy struct { + value *MergeStrategy + isSet bool +} + +func (v NullableMergeStrategy) Get() *MergeStrategy { + return v.value +} + +func (v *NullableMergeStrategy) Set(val *MergeStrategy) { + v.value = val + v.isSet = true +} + +func (v NullableMergeStrategy) IsSet() bool { + return v.isSet +} + +func (v *NullableMergeStrategy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMergeStrategy(val *MergeStrategy) *NullableMergeStrategy { + return &NullableMergeStrategy{value: val, isSet: true} +} + +func (v NullableMergeStrategy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMergeStrategy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_notification.go b/model_notification.go new file mode 100644 index 0000000..6487425 --- /dev/null +++ b/model_notification.go @@ -0,0 +1,265 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the Notification type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Notification{} + +// Notification Schema of the Dto sent to all configured downstreams upon a change of service. +type Notification struct { + // name of the service that was updated + Name string `json:"name"` + Event string `json:"event"` + Type string `json:"type"` + Payload *NotificationPayload `json:"payload,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _Notification Notification + +// NewNotification instantiates a new Notification object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNotification(name string, event string, type_ string) *Notification { + this := Notification{} + this.Name = name + this.Event = event + this.Type = type_ + return &this +} + +// NewNotificationWithDefaults instantiates a new Notification object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNotificationWithDefaults() *Notification { + this := Notification{} + return &this +} + +// GetName returns the Name field value +func (o *Notification) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Notification) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Notification) SetName(v string) { + o.Name = v +} + +// GetEvent returns the Event field value +func (o *Notification) GetEvent() string { + if o == nil { + var ret string + return ret + } + + return o.Event +} + +// GetEventOk returns a tuple with the Event field value +// and a boolean to check if the value has been set. +func (o *Notification) GetEventOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Event, true +} + +// SetEvent sets field value +func (o *Notification) SetEvent(v string) { + o.Event = v +} + +// GetType returns the Type field value +func (o *Notification) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Notification) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Notification) SetType(v string) { + o.Type = v +} + +// GetPayload returns the Payload field value if set, zero value otherwise. +func (o *Notification) GetPayload() NotificationPayload { + if o == nil || IsNil(o.Payload) { + var ret NotificationPayload + return ret + } + return *o.Payload +} + +// GetPayloadOk returns a tuple with the Payload field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Notification) GetPayloadOk() (*NotificationPayload, bool) { + if o == nil || IsNil(o.Payload) { + return nil, false + } + return o.Payload, true +} + +// HasPayload returns a boolean if a field has been set. +func (o *Notification) HasPayload() bool { + if o != nil && !IsNil(o.Payload) { + return true + } + + return false +} + +// SetPayload gets a reference to the given NotificationPayload and assigns it to the Payload field. +func (o *Notification) SetPayload(v NotificationPayload) { + o.Payload = &v +} + +func (o Notification) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Notification) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["event"] = o.Event + toSerialize["type"] = o.Type + if !IsNil(o.Payload) { + toSerialize["payload"] = o.Payload + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Notification) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "event", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNotification := _Notification{} + + err = json.Unmarshal(data, &varNotification) + + if err != nil { + return err + } + + *o = Notification(varNotification) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "event") + delete(additionalProperties, "type") + delete(additionalProperties, "payload") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNotification struct { + value *Notification + isSet bool +} + +func (v NullableNotification) Get() *Notification { + return v.value +} + +func (v *NullableNotification) Set(val *Notification) { + v.value = val + v.isSet = true +} + +func (v NullableNotification) IsSet() bool { + return v.isSet +} + +func (v *NullableNotification) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNotification(val *Notification) *NullableNotification { + return &NullableNotification{value: val, isSet: true} +} + +func (v NullableNotification) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNotification) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_notification_payload.go b/model_notification_payload.go new file mode 100644 index 0000000..6026bbf --- /dev/null +++ b/model_notification_payload.go @@ -0,0 +1,230 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the NotificationPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NotificationPayload{} + +// NotificationPayload struct for NotificationPayload +type NotificationPayload struct { + Owner *OwnerDto `json:"Owner,omitempty"` + Service *ServiceDto `json:"Service,omitempty"` + Repository *RepositoryDto `json:"Repository,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _NotificationPayload NotificationPayload + +// NewNotificationPayload instantiates a new NotificationPayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNotificationPayload() *NotificationPayload { + this := NotificationPayload{} + return &this +} + +// NewNotificationPayloadWithDefaults instantiates a new NotificationPayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNotificationPayloadWithDefaults() *NotificationPayload { + this := NotificationPayload{} + return &this +} + +// GetOwner returns the Owner field value if set, zero value otherwise. +func (o *NotificationPayload) GetOwner() OwnerDto { + if o == nil || IsNil(o.Owner) { + var ret OwnerDto + return ret + } + return *o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NotificationPayload) GetOwnerOk() (*OwnerDto, bool) { + if o == nil || IsNil(o.Owner) { + return nil, false + } + return o.Owner, true +} + +// HasOwner returns a boolean if a field has been set. +func (o *NotificationPayload) HasOwner() bool { + if o != nil && !IsNil(o.Owner) { + return true + } + + return false +} + +// SetOwner gets a reference to the given OwnerDto and assigns it to the Owner field. +func (o *NotificationPayload) SetOwner(v OwnerDto) { + o.Owner = &v +} + +// GetService returns the Service field value if set, zero value otherwise. +func (o *NotificationPayload) GetService() ServiceDto { + if o == nil || IsNil(o.Service) { + var ret ServiceDto + return ret + } + return *o.Service +} + +// GetServiceOk returns a tuple with the Service field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NotificationPayload) GetServiceOk() (*ServiceDto, bool) { + if o == nil || IsNil(o.Service) { + return nil, false + } + return o.Service, true +} + +// HasService returns a boolean if a field has been set. +func (o *NotificationPayload) HasService() bool { + if o != nil && !IsNil(o.Service) { + return true + } + + return false +} + +// SetService gets a reference to the given ServiceDto and assigns it to the Service field. +func (o *NotificationPayload) SetService(v ServiceDto) { + o.Service = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *NotificationPayload) GetRepository() RepositoryDto { + if o == nil || IsNil(o.Repository) { + var ret RepositoryDto + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NotificationPayload) GetRepositoryOk() (*RepositoryDto, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *NotificationPayload) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given RepositoryDto and assigns it to the Repository field. +func (o *NotificationPayload) SetRepository(v RepositoryDto) { + o.Repository = &v +} + +func (o NotificationPayload) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NotificationPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Owner) { + toSerialize["Owner"] = o.Owner + } + if !IsNil(o.Service) { + toSerialize["Service"] = o.Service + } + if !IsNil(o.Repository) { + toSerialize["Repository"] = o.Repository + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *NotificationPayload) UnmarshalJSON(data []byte) (err error) { + varNotificationPayload := _NotificationPayload{} + + err = json.Unmarshal(data, &varNotificationPayload) + + if err != nil { + return err + } + + *o = NotificationPayload(varNotificationPayload) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "Owner") + delete(additionalProperties, "Service") + delete(additionalProperties, "Repository") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableNotificationPayload struct { + value *NotificationPayload + isSet bool +} + +func (v NullableNotificationPayload) Get() *NotificationPayload { + return v.value +} + +func (v *NullableNotificationPayload) Set(val *NotificationPayload) { + v.value = val + v.isSet = true +} + +func (v NullableNotificationPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableNotificationPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNotificationPayload(val *NotificationPayload) *NullableNotificationPayload { + return &NullableNotificationPayload{value: val, isSet: true} +} + +func (v NullableNotificationPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNotificationPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_owner_create_dto.go b/model_owner_create_dto.go new file mode 100644 index 0000000..733359c --- /dev/null +++ b/model_owner_create_dto.go @@ -0,0 +1,503 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the OwnerCreateDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OwnerCreateDto{} + +// OwnerCreateDto struct for OwnerCreateDto +type OwnerCreateDto struct { + // The contact information of the owner + Contact string `json:"contact"` + // The teams channel url information of the owner + TeamsChannelURL *string `json:"teamsChannelURL,omitempty"` + // The product owner of this owner space + ProductOwner *string `json:"productOwner,omitempty"` + // A list of users that are allowed to promote services in this owner space + Promoters []string `json:"promoters,omitempty"` + // A list of users which constitute this owner + Members []string `json:"members,omitempty"` + // Map of string (group name e.g. some-owner) of strings (list of usernames), one username for each group is required. + Groups map[string][]string `json:"groups,omitempty"` + // The default jira project that is used by this owner space + DefaultJiraProject *string `json:"defaultJiraProject,omitempty"` + // The jira issue to use for committing a change, or the last jira issue used. + JiraIssue string `json:"jiraIssue"` + // A display name of the owner, to be presented in user interfaces instead of the owner's name, when available + DisplayName *string `json:"displayName,omitempty"` + Links []Link `json:"links,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _OwnerCreateDto OwnerCreateDto + +// NewOwnerCreateDto instantiates a new OwnerCreateDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOwnerCreateDto(contact string, jiraIssue string) *OwnerCreateDto { + this := OwnerCreateDto{} + this.Contact = contact + this.JiraIssue = jiraIssue + return &this +} + +// NewOwnerCreateDtoWithDefaults instantiates a new OwnerCreateDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOwnerCreateDtoWithDefaults() *OwnerCreateDto { + this := OwnerCreateDto{} + return &this +} + +// GetContact returns the Contact field value +func (o *OwnerCreateDto) GetContact() string { + if o == nil { + var ret string + return ret + } + + return o.Contact +} + +// GetContactOk returns a tuple with the Contact field value +// and a boolean to check if the value has been set. +func (o *OwnerCreateDto) GetContactOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Contact, true +} + +// SetContact sets field value +func (o *OwnerCreateDto) SetContact(v string) { + o.Contact = v +} + +// GetTeamsChannelURL returns the TeamsChannelURL field value if set, zero value otherwise. +func (o *OwnerCreateDto) GetTeamsChannelURL() string { + if o == nil || IsNil(o.TeamsChannelURL) { + var ret string + return ret + } + return *o.TeamsChannelURL +} + +// GetTeamsChannelURLOk returns a tuple with the TeamsChannelURL field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerCreateDto) GetTeamsChannelURLOk() (*string, bool) { + if o == nil || IsNil(o.TeamsChannelURL) { + return nil, false + } + return o.TeamsChannelURL, true +} + +// HasTeamsChannelURL returns a boolean if a field has been set. +func (o *OwnerCreateDto) HasTeamsChannelURL() bool { + if o != nil && !IsNil(o.TeamsChannelURL) { + return true + } + + return false +} + +// SetTeamsChannelURL gets a reference to the given string and assigns it to the TeamsChannelURL field. +func (o *OwnerCreateDto) SetTeamsChannelURL(v string) { + o.TeamsChannelURL = &v +} + +// GetProductOwner returns the ProductOwner field value if set, zero value otherwise. +func (o *OwnerCreateDto) GetProductOwner() string { + if o == nil || IsNil(o.ProductOwner) { + var ret string + return ret + } + return *o.ProductOwner +} + +// GetProductOwnerOk returns a tuple with the ProductOwner field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerCreateDto) GetProductOwnerOk() (*string, bool) { + if o == nil || IsNil(o.ProductOwner) { + return nil, false + } + return o.ProductOwner, true +} + +// HasProductOwner returns a boolean if a field has been set. +func (o *OwnerCreateDto) HasProductOwner() bool { + if o != nil && !IsNil(o.ProductOwner) { + return true + } + + return false +} + +// SetProductOwner gets a reference to the given string and assigns it to the ProductOwner field. +func (o *OwnerCreateDto) SetProductOwner(v string) { + o.ProductOwner = &v +} + +// GetPromoters returns the Promoters field value if set, zero value otherwise. +func (o *OwnerCreateDto) GetPromoters() []string { + if o == nil || IsNil(o.Promoters) { + var ret []string + return ret + } + return o.Promoters +} + +// GetPromotersOk returns a tuple with the Promoters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerCreateDto) GetPromotersOk() ([]string, bool) { + if o == nil || IsNil(o.Promoters) { + return nil, false + } + return o.Promoters, true +} + +// HasPromoters returns a boolean if a field has been set. +func (o *OwnerCreateDto) HasPromoters() bool { + if o != nil && !IsNil(o.Promoters) { + return true + } + + return false +} + +// SetPromoters gets a reference to the given []string and assigns it to the Promoters field. +func (o *OwnerCreateDto) SetPromoters(v []string) { + o.Promoters = v +} + +// GetMembers returns the Members field value if set, zero value otherwise. +func (o *OwnerCreateDto) GetMembers() []string { + if o == nil || IsNil(o.Members) { + var ret []string + return ret + } + return o.Members +} + +// GetMembersOk returns a tuple with the Members field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerCreateDto) GetMembersOk() ([]string, bool) { + if o == nil || IsNil(o.Members) { + return nil, false + } + return o.Members, true +} + +// HasMembers returns a boolean if a field has been set. +func (o *OwnerCreateDto) HasMembers() bool { + if o != nil && !IsNil(o.Members) { + return true + } + + return false +} + +// SetMembers gets a reference to the given []string and assigns it to the Members field. +func (o *OwnerCreateDto) SetMembers(v []string) { + o.Members = v +} + +// GetGroups returns the Groups field value if set, zero value otherwise. +func (o *OwnerCreateDto) GetGroups() map[string][]string { + if o == nil || IsNil(o.Groups) { + var ret map[string][]string + return ret + } + return o.Groups +} + +// GetGroupsOk returns a tuple with the Groups field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerCreateDto) GetGroupsOk() (map[string][]string, bool) { + if o == nil || IsNil(o.Groups) { + return map[string][]string{}, false + } + return o.Groups, true +} + +// HasGroups returns a boolean if a field has been set. +func (o *OwnerCreateDto) HasGroups() bool { + if o != nil && !IsNil(o.Groups) { + return true + } + + return false +} + +// SetGroups gets a reference to the given map[string][]string and assigns it to the Groups field. +func (o *OwnerCreateDto) SetGroups(v map[string][]string) { + o.Groups = v +} + +// GetDefaultJiraProject returns the DefaultJiraProject field value if set, zero value otherwise. +func (o *OwnerCreateDto) GetDefaultJiraProject() string { + if o == nil || IsNil(o.DefaultJiraProject) { + var ret string + return ret + } + return *o.DefaultJiraProject +} + +// GetDefaultJiraProjectOk returns a tuple with the DefaultJiraProject field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerCreateDto) GetDefaultJiraProjectOk() (*string, bool) { + if o == nil || IsNil(o.DefaultJiraProject) { + return nil, false + } + return o.DefaultJiraProject, true +} + +// HasDefaultJiraProject returns a boolean if a field has been set. +func (o *OwnerCreateDto) HasDefaultJiraProject() bool { + if o != nil && !IsNil(o.DefaultJiraProject) { + return true + } + + return false +} + +// SetDefaultJiraProject gets a reference to the given string and assigns it to the DefaultJiraProject field. +func (o *OwnerCreateDto) SetDefaultJiraProject(v string) { + o.DefaultJiraProject = &v +} + +// GetJiraIssue returns the JiraIssue field value +func (o *OwnerCreateDto) GetJiraIssue() string { + if o == nil { + var ret string + return ret + } + + return o.JiraIssue +} + +// GetJiraIssueOk returns a tuple with the JiraIssue field value +// and a boolean to check if the value has been set. +func (o *OwnerCreateDto) GetJiraIssueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraIssue, true +} + +// SetJiraIssue sets field value +func (o *OwnerCreateDto) SetJiraIssue(v string) { + o.JiraIssue = v +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *OwnerCreateDto) GetDisplayName() string { + if o == nil || IsNil(o.DisplayName) { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerCreateDto) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *OwnerCreateDto) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *OwnerCreateDto) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *OwnerCreateDto) GetLinks() []Link { + if o == nil || IsNil(o.Links) { + var ret []Link + return ret + } + return o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerCreateDto) GetLinksOk() ([]Link, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *OwnerCreateDto) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given []Link and assigns it to the Links field. +func (o *OwnerCreateDto) SetLinks(v []Link) { + o.Links = v +} + +func (o OwnerCreateDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OwnerCreateDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["contact"] = o.Contact + if !IsNil(o.TeamsChannelURL) { + toSerialize["teamsChannelURL"] = o.TeamsChannelURL + } + if !IsNil(o.ProductOwner) { + toSerialize["productOwner"] = o.ProductOwner + } + if !IsNil(o.Promoters) { + toSerialize["promoters"] = o.Promoters + } + if !IsNil(o.Members) { + toSerialize["members"] = o.Members + } + if !IsNil(o.Groups) { + toSerialize["groups"] = o.Groups + } + if !IsNil(o.DefaultJiraProject) { + toSerialize["defaultJiraProject"] = o.DefaultJiraProject + } + toSerialize["jiraIssue"] = o.JiraIssue + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OwnerCreateDto) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "contact", + "jiraIssue", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOwnerCreateDto := _OwnerCreateDto{} + + err = json.Unmarshal(data, &varOwnerCreateDto) + + if err != nil { + return err + } + + *o = OwnerCreateDto(varOwnerCreateDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "contact") + delete(additionalProperties, "teamsChannelURL") + delete(additionalProperties, "productOwner") + delete(additionalProperties, "promoters") + delete(additionalProperties, "members") + delete(additionalProperties, "groups") + delete(additionalProperties, "defaultJiraProject") + delete(additionalProperties, "jiraIssue") + delete(additionalProperties, "displayName") + delete(additionalProperties, "links") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOwnerCreateDto struct { + value *OwnerCreateDto + isSet bool +} + +func (v NullableOwnerCreateDto) Get() *OwnerCreateDto { + return v.value +} + +func (v *NullableOwnerCreateDto) Set(val *OwnerCreateDto) { + v.value = val + v.isSet = true +} + +func (v NullableOwnerCreateDto) IsSet() bool { + return v.isSet +} + +func (v *NullableOwnerCreateDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOwnerCreateDto(val *OwnerCreateDto) *NullableOwnerCreateDto { + return &NullableOwnerCreateDto{value: val, isSet: true} +} + +func (v NullableOwnerCreateDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOwnerCreateDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_owner_dto.go b/model_owner_dto.go new file mode 100644 index 0000000..f2b3983 --- /dev/null +++ b/model_owner_dto.go @@ -0,0 +1,563 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the OwnerDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OwnerDto{} + +// OwnerDto struct for OwnerDto +type OwnerDto struct { + // The contact information of the owner + Contact string `json:"contact"` + // The teams channel url information of the owner + TeamsChannelURL *string `json:"teamsChannelURL,omitempty"` + // The product owner of this owner space + ProductOwner *string `json:"productOwner,omitempty"` + // A list of users which constitute this owner + Members []string `json:"members,omitempty"` + // Collection of arbitrary user groups which can be referenced in service configurations. Map of string (group name e.g. some-owner) of strings (list of usernames), one username for each group is required. + Groups map[string][]string `json:"groups,omitempty"` + // A list of users that are allowed to promote services in this owner space + Promoters []string `json:"promoters,omitempty"` + // The default jira project that is used by this owner space + DefaultJiraProject *string `json:"defaultJiraProject,omitempty"` + // ISO-8601 UTC date time at which this information was originally committed. When sending an update, include the original timestamp you got so we can detect concurrent updates. + TimeStamp string `json:"timeStamp"` + // The git commit hash this information was originally committed under. When sending an update, include the original commitHash you got so we can detect concurrent updates. + CommitHash string `json:"commitHash"` + // The jira issue to use for committing a change, or the last jira issue used. + JiraIssue string `json:"jiraIssue"` + // A display name of the owner, to be presented in user interfaces instead of the owner's name, when available + DisplayName *string `json:"displayName,omitempty"` + Links []Link `json:"links,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _OwnerDto OwnerDto + +// NewOwnerDto instantiates a new OwnerDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOwnerDto(contact string, timeStamp string, commitHash string, jiraIssue string) *OwnerDto { + this := OwnerDto{} + this.Contact = contact + this.TimeStamp = timeStamp + this.CommitHash = commitHash + this.JiraIssue = jiraIssue + return &this +} + +// NewOwnerDtoWithDefaults instantiates a new OwnerDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOwnerDtoWithDefaults() *OwnerDto { + this := OwnerDto{} + return &this +} + +// GetContact returns the Contact field value +func (o *OwnerDto) GetContact() string { + if o == nil { + var ret string + return ret + } + + return o.Contact +} + +// GetContactOk returns a tuple with the Contact field value +// and a boolean to check if the value has been set. +func (o *OwnerDto) GetContactOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Contact, true +} + +// SetContact sets field value +func (o *OwnerDto) SetContact(v string) { + o.Contact = v +} + +// GetTeamsChannelURL returns the TeamsChannelURL field value if set, zero value otherwise. +func (o *OwnerDto) GetTeamsChannelURL() string { + if o == nil || IsNil(o.TeamsChannelURL) { + var ret string + return ret + } + return *o.TeamsChannelURL +} + +// GetTeamsChannelURLOk returns a tuple with the TeamsChannelURL field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerDto) GetTeamsChannelURLOk() (*string, bool) { + if o == nil || IsNil(o.TeamsChannelURL) { + return nil, false + } + return o.TeamsChannelURL, true +} + +// HasTeamsChannelURL returns a boolean if a field has been set. +func (o *OwnerDto) HasTeamsChannelURL() bool { + if o != nil && !IsNil(o.TeamsChannelURL) { + return true + } + + return false +} + +// SetTeamsChannelURL gets a reference to the given string and assigns it to the TeamsChannelURL field. +func (o *OwnerDto) SetTeamsChannelURL(v string) { + o.TeamsChannelURL = &v +} + +// GetProductOwner returns the ProductOwner field value if set, zero value otherwise. +func (o *OwnerDto) GetProductOwner() string { + if o == nil || IsNil(o.ProductOwner) { + var ret string + return ret + } + return *o.ProductOwner +} + +// GetProductOwnerOk returns a tuple with the ProductOwner field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerDto) GetProductOwnerOk() (*string, bool) { + if o == nil || IsNil(o.ProductOwner) { + return nil, false + } + return o.ProductOwner, true +} + +// HasProductOwner returns a boolean if a field has been set. +func (o *OwnerDto) HasProductOwner() bool { + if o != nil && !IsNil(o.ProductOwner) { + return true + } + + return false +} + +// SetProductOwner gets a reference to the given string and assigns it to the ProductOwner field. +func (o *OwnerDto) SetProductOwner(v string) { + o.ProductOwner = &v +} + +// GetMembers returns the Members field value if set, zero value otherwise. +func (o *OwnerDto) GetMembers() []string { + if o == nil || IsNil(o.Members) { + var ret []string + return ret + } + return o.Members +} + +// GetMembersOk returns a tuple with the Members field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerDto) GetMembersOk() ([]string, bool) { + if o == nil || IsNil(o.Members) { + return nil, false + } + return o.Members, true +} + +// HasMembers returns a boolean if a field has been set. +func (o *OwnerDto) HasMembers() bool { + if o != nil && !IsNil(o.Members) { + return true + } + + return false +} + +// SetMembers gets a reference to the given []string and assigns it to the Members field. +func (o *OwnerDto) SetMembers(v []string) { + o.Members = v +} + +// GetGroups returns the Groups field value if set, zero value otherwise. +func (o *OwnerDto) GetGroups() map[string][]string { + if o == nil || IsNil(o.Groups) { + var ret map[string][]string + return ret + } + return o.Groups +} + +// GetGroupsOk returns a tuple with the Groups field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerDto) GetGroupsOk() (map[string][]string, bool) { + if o == nil || IsNil(o.Groups) { + return map[string][]string{}, false + } + return o.Groups, true +} + +// HasGroups returns a boolean if a field has been set. +func (o *OwnerDto) HasGroups() bool { + if o != nil && !IsNil(o.Groups) { + return true + } + + return false +} + +// SetGroups gets a reference to the given map[string][]string and assigns it to the Groups field. +func (o *OwnerDto) SetGroups(v map[string][]string) { + o.Groups = v +} + +// GetPromoters returns the Promoters field value if set, zero value otherwise. +func (o *OwnerDto) GetPromoters() []string { + if o == nil || IsNil(o.Promoters) { + var ret []string + return ret + } + return o.Promoters +} + +// GetPromotersOk returns a tuple with the Promoters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerDto) GetPromotersOk() ([]string, bool) { + if o == nil || IsNil(o.Promoters) { + return nil, false + } + return o.Promoters, true +} + +// HasPromoters returns a boolean if a field has been set. +func (o *OwnerDto) HasPromoters() bool { + if o != nil && !IsNil(o.Promoters) { + return true + } + + return false +} + +// SetPromoters gets a reference to the given []string and assigns it to the Promoters field. +func (o *OwnerDto) SetPromoters(v []string) { + o.Promoters = v +} + +// GetDefaultJiraProject returns the DefaultJiraProject field value if set, zero value otherwise. +func (o *OwnerDto) GetDefaultJiraProject() string { + if o == nil || IsNil(o.DefaultJiraProject) { + var ret string + return ret + } + return *o.DefaultJiraProject +} + +// GetDefaultJiraProjectOk returns a tuple with the DefaultJiraProject field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerDto) GetDefaultJiraProjectOk() (*string, bool) { + if o == nil || IsNil(o.DefaultJiraProject) { + return nil, false + } + return o.DefaultJiraProject, true +} + +// HasDefaultJiraProject returns a boolean if a field has been set. +func (o *OwnerDto) HasDefaultJiraProject() bool { + if o != nil && !IsNil(o.DefaultJiraProject) { + return true + } + + return false +} + +// SetDefaultJiraProject gets a reference to the given string and assigns it to the DefaultJiraProject field. +func (o *OwnerDto) SetDefaultJiraProject(v string) { + o.DefaultJiraProject = &v +} + +// GetTimeStamp returns the TimeStamp field value +func (o *OwnerDto) GetTimeStamp() string { + if o == nil { + var ret string + return ret + } + + return o.TimeStamp +} + +// GetTimeStampOk returns a tuple with the TimeStamp field value +// and a boolean to check if the value has been set. +func (o *OwnerDto) GetTimeStampOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TimeStamp, true +} + +// SetTimeStamp sets field value +func (o *OwnerDto) SetTimeStamp(v string) { + o.TimeStamp = v +} + +// GetCommitHash returns the CommitHash field value +func (o *OwnerDto) GetCommitHash() string { + if o == nil { + var ret string + return ret + } + + return o.CommitHash +} + +// GetCommitHashOk returns a tuple with the CommitHash field value +// and a boolean to check if the value has been set. +func (o *OwnerDto) GetCommitHashOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CommitHash, true +} + +// SetCommitHash sets field value +func (o *OwnerDto) SetCommitHash(v string) { + o.CommitHash = v +} + +// GetJiraIssue returns the JiraIssue field value +func (o *OwnerDto) GetJiraIssue() string { + if o == nil { + var ret string + return ret + } + + return o.JiraIssue +} + +// GetJiraIssueOk returns a tuple with the JiraIssue field value +// and a boolean to check if the value has been set. +func (o *OwnerDto) GetJiraIssueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraIssue, true +} + +// SetJiraIssue sets field value +func (o *OwnerDto) SetJiraIssue(v string) { + o.JiraIssue = v +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *OwnerDto) GetDisplayName() string { + if o == nil || IsNil(o.DisplayName) { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerDto) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *OwnerDto) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *OwnerDto) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *OwnerDto) GetLinks() []Link { + if o == nil || IsNil(o.Links) { + var ret []Link + return ret + } + return o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerDto) GetLinksOk() ([]Link, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *OwnerDto) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given []Link and assigns it to the Links field. +func (o *OwnerDto) SetLinks(v []Link) { + o.Links = v +} + +func (o OwnerDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OwnerDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["contact"] = o.Contact + if !IsNil(o.TeamsChannelURL) { + toSerialize["teamsChannelURL"] = o.TeamsChannelURL + } + if !IsNil(o.ProductOwner) { + toSerialize["productOwner"] = o.ProductOwner + } + if !IsNil(o.Members) { + toSerialize["members"] = o.Members + } + if !IsNil(o.Groups) { + toSerialize["groups"] = o.Groups + } + if !IsNil(o.Promoters) { + toSerialize["promoters"] = o.Promoters + } + if !IsNil(o.DefaultJiraProject) { + toSerialize["defaultJiraProject"] = o.DefaultJiraProject + } + toSerialize["timeStamp"] = o.TimeStamp + toSerialize["commitHash"] = o.CommitHash + toSerialize["jiraIssue"] = o.JiraIssue + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OwnerDto) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "contact", + "timeStamp", + "commitHash", + "jiraIssue", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOwnerDto := _OwnerDto{} + + err = json.Unmarshal(data, &varOwnerDto) + + if err != nil { + return err + } + + *o = OwnerDto(varOwnerDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "contact") + delete(additionalProperties, "teamsChannelURL") + delete(additionalProperties, "productOwner") + delete(additionalProperties, "members") + delete(additionalProperties, "groups") + delete(additionalProperties, "promoters") + delete(additionalProperties, "defaultJiraProject") + delete(additionalProperties, "timeStamp") + delete(additionalProperties, "commitHash") + delete(additionalProperties, "jiraIssue") + delete(additionalProperties, "displayName") + delete(additionalProperties, "links") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOwnerDto struct { + value *OwnerDto + isSet bool +} + +func (v NullableOwnerDto) Get() *OwnerDto { + return v.value +} + +func (v *NullableOwnerDto) Set(val *OwnerDto) { + v.value = val + v.isSet = true +} + +func (v NullableOwnerDto) IsSet() bool { + return v.isSet +} + +func (v *NullableOwnerDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOwnerDto(val *OwnerDto) *NullableOwnerDto { + return &NullableOwnerDto{value: val, isSet: true} +} + +func (v NullableOwnerDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOwnerDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_owner_list_dto.go b/model_owner_list_dto.go new file mode 100644 index 0000000..45bad02 --- /dev/null +++ b/model_owner_list_dto.go @@ -0,0 +1,199 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the OwnerListDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OwnerListDto{} + +// OwnerListDto struct for OwnerListDto +type OwnerListDto struct { + Owners map[string]OwnerDto `json:"owners"` + // ISO-8601 UTC date time at which the list of owners was obtained from service-metadata + TimeStamp string `json:"timeStamp"` + AdditionalProperties map[string]interface{} +} + +type _OwnerListDto OwnerListDto + +// NewOwnerListDto instantiates a new OwnerListDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOwnerListDto(owners map[string]OwnerDto, timeStamp string) *OwnerListDto { + this := OwnerListDto{} + this.Owners = owners + this.TimeStamp = timeStamp + return &this +} + +// NewOwnerListDtoWithDefaults instantiates a new OwnerListDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOwnerListDtoWithDefaults() *OwnerListDto { + this := OwnerListDto{} + return &this +} + +// GetOwners returns the Owners field value +func (o *OwnerListDto) GetOwners() map[string]OwnerDto { + if o == nil { + var ret map[string]OwnerDto + return ret + } + + return o.Owners +} + +// GetOwnersOk returns a tuple with the Owners field value +// and a boolean to check if the value has been set. +func (o *OwnerListDto) GetOwnersOk() (map[string]OwnerDto, bool) { + if o == nil { + return map[string]OwnerDto{}, false + } + return o.Owners, true +} + +// SetOwners sets field value +func (o *OwnerListDto) SetOwners(v map[string]OwnerDto) { + o.Owners = v +} + +// GetTimeStamp returns the TimeStamp field value +func (o *OwnerListDto) GetTimeStamp() string { + if o == nil { + var ret string + return ret + } + + return o.TimeStamp +} + +// GetTimeStampOk returns a tuple with the TimeStamp field value +// and a boolean to check if the value has been set. +func (o *OwnerListDto) GetTimeStampOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TimeStamp, true +} + +// SetTimeStamp sets field value +func (o *OwnerListDto) SetTimeStamp(v string) { + o.TimeStamp = v +} + +func (o OwnerListDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OwnerListDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["owners"] = o.Owners + toSerialize["timeStamp"] = o.TimeStamp + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OwnerListDto) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "owners", + "timeStamp", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOwnerListDto := _OwnerListDto{} + + err = json.Unmarshal(data, &varOwnerListDto) + + if err != nil { + return err + } + + *o = OwnerListDto(varOwnerListDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "owners") + delete(additionalProperties, "timeStamp") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOwnerListDto struct { + value *OwnerListDto + isSet bool +} + +func (v NullableOwnerListDto) Get() *OwnerListDto { + return v.value +} + +func (v *NullableOwnerListDto) Set(val *OwnerListDto) { + v.value = val + v.isSet = true +} + +func (v NullableOwnerListDto) IsSet() bool { + return v.isSet +} + +func (v *NullableOwnerListDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOwnerListDto(val *OwnerListDto) *NullableOwnerListDto { + return &NullableOwnerListDto{value: val, isSet: true} +} + +func (v NullableOwnerListDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOwnerListDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_owner_patch_dto.go b/model_owner_patch_dto.go new file mode 100644 index 0000000..ace644f --- /dev/null +++ b/model_owner_patch_dto.go @@ -0,0 +1,571 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the OwnerPatchDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OwnerPatchDto{} + +// OwnerPatchDto struct for OwnerPatchDto +type OwnerPatchDto struct { + // The contact information of the owner + Contact *string `json:"contact,omitempty"` + // The teams channel url information of the owner + TeamsChannelURL *string `json:"teamsChannelURL,omitempty"` + // The product owner of this owner space + ProductOwner *string `json:"productOwner,omitempty"` + // A list of users which constitute this owner + Members []string `json:"members,omitempty"` + // Map of string (group name e.g. some-owner) of strings (list of usernames), one username for each group is required. + Groups map[string][]string `json:"groups,omitempty"` + // A list of users that are allowed to promote services in this owner space + Promoters []string `json:"promoters,omitempty"` + // The default jira project that is used by this owner space + DefaultJiraProject *string `json:"defaultJiraProject,omitempty"` + // ISO-8601 UTC date time at which this information was originally committed. When sending an update, include the original timestamp you got so we can detect concurrent updates. + TimeStamp string `json:"timeStamp"` + // The git commit hash this information was originally committed under. When sending an update, include the original commitHash you got so we can detect concurrent updates. + CommitHash string `json:"commitHash"` + // The jira issue to use for committing a change, or the last jira issue used. + JiraIssue string `json:"jiraIssue"` + // A display name of the owner, to be presented in user interfaces instead of the owner's name, when available + DisplayName *string `json:"displayName,omitempty"` + Links []Link `json:"links,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _OwnerPatchDto OwnerPatchDto + +// NewOwnerPatchDto instantiates a new OwnerPatchDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOwnerPatchDto(timeStamp string, commitHash string, jiraIssue string) *OwnerPatchDto { + this := OwnerPatchDto{} + this.TimeStamp = timeStamp + this.CommitHash = commitHash + this.JiraIssue = jiraIssue + return &this +} + +// NewOwnerPatchDtoWithDefaults instantiates a new OwnerPatchDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOwnerPatchDtoWithDefaults() *OwnerPatchDto { + this := OwnerPatchDto{} + return &this +} + +// GetContact returns the Contact field value if set, zero value otherwise. +func (o *OwnerPatchDto) GetContact() string { + if o == nil || IsNil(o.Contact) { + var ret string + return ret + } + return *o.Contact +} + +// GetContactOk returns a tuple with the Contact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerPatchDto) GetContactOk() (*string, bool) { + if o == nil || IsNil(o.Contact) { + return nil, false + } + return o.Contact, true +} + +// HasContact returns a boolean if a field has been set. +func (o *OwnerPatchDto) HasContact() bool { + if o != nil && !IsNil(o.Contact) { + return true + } + + return false +} + +// SetContact gets a reference to the given string and assigns it to the Contact field. +func (o *OwnerPatchDto) SetContact(v string) { + o.Contact = &v +} + +// GetTeamsChannelURL returns the TeamsChannelURL field value if set, zero value otherwise. +func (o *OwnerPatchDto) GetTeamsChannelURL() string { + if o == nil || IsNil(o.TeamsChannelURL) { + var ret string + return ret + } + return *o.TeamsChannelURL +} + +// GetTeamsChannelURLOk returns a tuple with the TeamsChannelURL field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerPatchDto) GetTeamsChannelURLOk() (*string, bool) { + if o == nil || IsNil(o.TeamsChannelURL) { + return nil, false + } + return o.TeamsChannelURL, true +} + +// HasTeamsChannelURL returns a boolean if a field has been set. +func (o *OwnerPatchDto) HasTeamsChannelURL() bool { + if o != nil && !IsNil(o.TeamsChannelURL) { + return true + } + + return false +} + +// SetTeamsChannelURL gets a reference to the given string and assigns it to the TeamsChannelURL field. +func (o *OwnerPatchDto) SetTeamsChannelURL(v string) { + o.TeamsChannelURL = &v +} + +// GetProductOwner returns the ProductOwner field value if set, zero value otherwise. +func (o *OwnerPatchDto) GetProductOwner() string { + if o == nil || IsNil(o.ProductOwner) { + var ret string + return ret + } + return *o.ProductOwner +} + +// GetProductOwnerOk returns a tuple with the ProductOwner field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerPatchDto) GetProductOwnerOk() (*string, bool) { + if o == nil || IsNil(o.ProductOwner) { + return nil, false + } + return o.ProductOwner, true +} + +// HasProductOwner returns a boolean if a field has been set. +func (o *OwnerPatchDto) HasProductOwner() bool { + if o != nil && !IsNil(o.ProductOwner) { + return true + } + + return false +} + +// SetProductOwner gets a reference to the given string and assigns it to the ProductOwner field. +func (o *OwnerPatchDto) SetProductOwner(v string) { + o.ProductOwner = &v +} + +// GetMembers returns the Members field value if set, zero value otherwise. +func (o *OwnerPatchDto) GetMembers() []string { + if o == nil || IsNil(o.Members) { + var ret []string + return ret + } + return o.Members +} + +// GetMembersOk returns a tuple with the Members field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerPatchDto) GetMembersOk() ([]string, bool) { + if o == nil || IsNil(o.Members) { + return nil, false + } + return o.Members, true +} + +// HasMembers returns a boolean if a field has been set. +func (o *OwnerPatchDto) HasMembers() bool { + if o != nil && !IsNil(o.Members) { + return true + } + + return false +} + +// SetMembers gets a reference to the given []string and assigns it to the Members field. +func (o *OwnerPatchDto) SetMembers(v []string) { + o.Members = v +} + +// GetGroups returns the Groups field value if set, zero value otherwise. +func (o *OwnerPatchDto) GetGroups() map[string][]string { + if o == nil || IsNil(o.Groups) { + var ret map[string][]string + return ret + } + return o.Groups +} + +// GetGroupsOk returns a tuple with the Groups field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerPatchDto) GetGroupsOk() (map[string][]string, bool) { + if o == nil || IsNil(o.Groups) { + return map[string][]string{}, false + } + return o.Groups, true +} + +// HasGroups returns a boolean if a field has been set. +func (o *OwnerPatchDto) HasGroups() bool { + if o != nil && !IsNil(o.Groups) { + return true + } + + return false +} + +// SetGroups gets a reference to the given map[string][]string and assigns it to the Groups field. +func (o *OwnerPatchDto) SetGroups(v map[string][]string) { + o.Groups = v +} + +// GetPromoters returns the Promoters field value if set, zero value otherwise. +func (o *OwnerPatchDto) GetPromoters() []string { + if o == nil || IsNil(o.Promoters) { + var ret []string + return ret + } + return o.Promoters +} + +// GetPromotersOk returns a tuple with the Promoters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerPatchDto) GetPromotersOk() ([]string, bool) { + if o == nil || IsNil(o.Promoters) { + return nil, false + } + return o.Promoters, true +} + +// HasPromoters returns a boolean if a field has been set. +func (o *OwnerPatchDto) HasPromoters() bool { + if o != nil && !IsNil(o.Promoters) { + return true + } + + return false +} + +// SetPromoters gets a reference to the given []string and assigns it to the Promoters field. +func (o *OwnerPatchDto) SetPromoters(v []string) { + o.Promoters = v +} + +// GetDefaultJiraProject returns the DefaultJiraProject field value if set, zero value otherwise. +func (o *OwnerPatchDto) GetDefaultJiraProject() string { + if o == nil || IsNil(o.DefaultJiraProject) { + var ret string + return ret + } + return *o.DefaultJiraProject +} + +// GetDefaultJiraProjectOk returns a tuple with the DefaultJiraProject field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerPatchDto) GetDefaultJiraProjectOk() (*string, bool) { + if o == nil || IsNil(o.DefaultJiraProject) { + return nil, false + } + return o.DefaultJiraProject, true +} + +// HasDefaultJiraProject returns a boolean if a field has been set. +func (o *OwnerPatchDto) HasDefaultJiraProject() bool { + if o != nil && !IsNil(o.DefaultJiraProject) { + return true + } + + return false +} + +// SetDefaultJiraProject gets a reference to the given string and assigns it to the DefaultJiraProject field. +func (o *OwnerPatchDto) SetDefaultJiraProject(v string) { + o.DefaultJiraProject = &v +} + +// GetTimeStamp returns the TimeStamp field value +func (o *OwnerPatchDto) GetTimeStamp() string { + if o == nil { + var ret string + return ret + } + + return o.TimeStamp +} + +// GetTimeStampOk returns a tuple with the TimeStamp field value +// and a boolean to check if the value has been set. +func (o *OwnerPatchDto) GetTimeStampOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TimeStamp, true +} + +// SetTimeStamp sets field value +func (o *OwnerPatchDto) SetTimeStamp(v string) { + o.TimeStamp = v +} + +// GetCommitHash returns the CommitHash field value +func (o *OwnerPatchDto) GetCommitHash() string { + if o == nil { + var ret string + return ret + } + + return o.CommitHash +} + +// GetCommitHashOk returns a tuple with the CommitHash field value +// and a boolean to check if the value has been set. +func (o *OwnerPatchDto) GetCommitHashOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CommitHash, true +} + +// SetCommitHash sets field value +func (o *OwnerPatchDto) SetCommitHash(v string) { + o.CommitHash = v +} + +// GetJiraIssue returns the JiraIssue field value +func (o *OwnerPatchDto) GetJiraIssue() string { + if o == nil { + var ret string + return ret + } + + return o.JiraIssue +} + +// GetJiraIssueOk returns a tuple with the JiraIssue field value +// and a boolean to check if the value has been set. +func (o *OwnerPatchDto) GetJiraIssueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraIssue, true +} + +// SetJiraIssue sets field value +func (o *OwnerPatchDto) SetJiraIssue(v string) { + o.JiraIssue = v +} + +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *OwnerPatchDto) GetDisplayName() string { + if o == nil || IsNil(o.DisplayName) { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerPatchDto) GetDisplayNameOk() (*string, bool) { + if o == nil || IsNil(o.DisplayName) { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *OwnerPatchDto) HasDisplayName() bool { + if o != nil && !IsNil(o.DisplayName) { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *OwnerPatchDto) SetDisplayName(v string) { + o.DisplayName = &v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *OwnerPatchDto) GetLinks() []Link { + if o == nil || IsNil(o.Links) { + var ret []Link + return ret + } + return o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OwnerPatchDto) GetLinksOk() ([]Link, bool) { + if o == nil || IsNil(o.Links) { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *OwnerPatchDto) HasLinks() bool { + if o != nil && !IsNil(o.Links) { + return true + } + + return false +} + +// SetLinks gets a reference to the given []Link and assigns it to the Links field. +func (o *OwnerPatchDto) SetLinks(v []Link) { + o.Links = v +} + +func (o OwnerPatchDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OwnerPatchDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Contact) { + toSerialize["contact"] = o.Contact + } + if !IsNil(o.TeamsChannelURL) { + toSerialize["teamsChannelURL"] = o.TeamsChannelURL + } + if !IsNil(o.ProductOwner) { + toSerialize["productOwner"] = o.ProductOwner + } + if !IsNil(o.Members) { + toSerialize["members"] = o.Members + } + if !IsNil(o.Groups) { + toSerialize["groups"] = o.Groups + } + if !IsNil(o.Promoters) { + toSerialize["promoters"] = o.Promoters + } + if !IsNil(o.DefaultJiraProject) { + toSerialize["defaultJiraProject"] = o.DefaultJiraProject + } + toSerialize["timeStamp"] = o.TimeStamp + toSerialize["commitHash"] = o.CommitHash + toSerialize["jiraIssue"] = o.JiraIssue + if !IsNil(o.DisplayName) { + toSerialize["displayName"] = o.DisplayName + } + if !IsNil(o.Links) { + toSerialize["links"] = o.Links + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *OwnerPatchDto) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "timeStamp", + "commitHash", + "jiraIssue", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOwnerPatchDto := _OwnerPatchDto{} + + err = json.Unmarshal(data, &varOwnerPatchDto) + + if err != nil { + return err + } + + *o = OwnerPatchDto(varOwnerPatchDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "contact") + delete(additionalProperties, "teamsChannelURL") + delete(additionalProperties, "productOwner") + delete(additionalProperties, "members") + delete(additionalProperties, "groups") + delete(additionalProperties, "promoters") + delete(additionalProperties, "defaultJiraProject") + delete(additionalProperties, "timeStamp") + delete(additionalProperties, "commitHash") + delete(additionalProperties, "jiraIssue") + delete(additionalProperties, "displayName") + delete(additionalProperties, "links") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableOwnerPatchDto struct { + value *OwnerPatchDto + isSet bool +} + +func (v NullableOwnerPatchDto) Get() *OwnerPatchDto { + return v.value +} + +func (v *NullableOwnerPatchDto) Set(val *OwnerPatchDto) { + v.value = val + v.isSet = true +} + +func (v NullableOwnerPatchDto) IsSet() bool { + return v.isSet +} + +func (v *NullableOwnerPatchDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOwnerPatchDto(val *OwnerPatchDto) *NullableOwnerPatchDto { + return &NullableOwnerPatchDto{value: val, isSet: true} +} + +func (v NullableOwnerPatchDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOwnerPatchDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_post_promote.go b/model_post_promote.go new file mode 100644 index 0000000..2d27160 --- /dev/null +++ b/model_post_promote.go @@ -0,0 +1,156 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the PostPromote type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PostPromote{} + +// PostPromote struct for PostPromote +type PostPromote struct { + Binaries []Binary `json:"binaries,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PostPromote PostPromote + +// NewPostPromote instantiates a new PostPromote object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPostPromote() *PostPromote { + this := PostPromote{} + return &this +} + +// NewPostPromoteWithDefaults instantiates a new PostPromote object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPostPromoteWithDefaults() *PostPromote { + this := PostPromote{} + return &this +} + +// GetBinaries returns the Binaries field value if set, zero value otherwise. +func (o *PostPromote) GetBinaries() []Binary { + if o == nil || IsNil(o.Binaries) { + var ret []Binary + return ret + } + return o.Binaries +} + +// GetBinariesOk returns a tuple with the Binaries field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostPromote) GetBinariesOk() ([]Binary, bool) { + if o == nil || IsNil(o.Binaries) { + return nil, false + } + return o.Binaries, true +} + +// HasBinaries returns a boolean if a field has been set. +func (o *PostPromote) HasBinaries() bool { + if o != nil && !IsNil(o.Binaries) { + return true + } + + return false +} + +// SetBinaries gets a reference to the given []Binary and assigns it to the Binaries field. +func (o *PostPromote) SetBinaries(v []Binary) { + o.Binaries = v +} + +func (o PostPromote) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PostPromote) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Binaries) { + toSerialize["binaries"] = o.Binaries + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PostPromote) UnmarshalJSON(data []byte) (err error) { + varPostPromote := _PostPromote{} + + err = json.Unmarshal(data, &varPostPromote) + + if err != nil { + return err + } + + *o = PostPromote(varPostPromote) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "binaries") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePostPromote struct { + value *PostPromote + isSet bool +} + +func (v NullablePostPromote) Get() *PostPromote { + return v.value +} + +func (v *NullablePostPromote) Set(val *PostPromote) { + v.value = val + v.isSet = true +} + +func (v NullablePostPromote) IsSet() bool { + return v.isSet +} + +func (v *NullablePostPromote) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePostPromote(val *PostPromote) *NullablePostPromote { + return &NullablePostPromote{value: val, isSet: true} +} + +func (v NullablePostPromote) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePostPromote) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_protected_ref.go b/model_protected_ref.go new file mode 100644 index 0000000..4356203 --- /dev/null +++ b/model_protected_ref.go @@ -0,0 +1,246 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the ProtectedRef type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProtectedRef{} + +// ProtectedRef struct for ProtectedRef +type ProtectedRef struct { + // fnmatch pattern to define protected refs. Must not start with refs/heads/ or refs/tags/. Special value :MAINLINE: matches the currently configured mainline for branch protections. + Pattern string `json:"pattern" validate:"regexp=^(?!refs\\/(heads|tags)\\/).*$"` + // list of users or groups for which this protection does not apply. + Exemptions []string `json:"exemptions,omitempty"` + // list of group identifiers for which this protection does not apply. This field is read-only and will be filled automatically from the exemptions fields. + ExemptionsRoles []string `json:"exemptionsRoles,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ProtectedRef ProtectedRef + +// NewProtectedRef instantiates a new ProtectedRef object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProtectedRef(pattern string) *ProtectedRef { + this := ProtectedRef{} + this.Pattern = pattern + return &this +} + +// NewProtectedRefWithDefaults instantiates a new ProtectedRef object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProtectedRefWithDefaults() *ProtectedRef { + this := ProtectedRef{} + return &this +} + +// GetPattern returns the Pattern field value +func (o *ProtectedRef) GetPattern() string { + if o == nil { + var ret string + return ret + } + + return o.Pattern +} + +// GetPatternOk returns a tuple with the Pattern field value +// and a boolean to check if the value has been set. +func (o *ProtectedRef) GetPatternOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Pattern, true +} + +// SetPattern sets field value +func (o *ProtectedRef) SetPattern(v string) { + o.Pattern = v +} + +// GetExemptions returns the Exemptions field value if set, zero value otherwise. +func (o *ProtectedRef) GetExemptions() []string { + if o == nil || IsNil(o.Exemptions) { + var ret []string + return ret + } + return o.Exemptions +} + +// GetExemptionsOk returns a tuple with the Exemptions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProtectedRef) GetExemptionsOk() ([]string, bool) { + if o == nil || IsNil(o.Exemptions) { + return nil, false + } + return o.Exemptions, true +} + +// HasExemptions returns a boolean if a field has been set. +func (o *ProtectedRef) HasExemptions() bool { + if o != nil && !IsNil(o.Exemptions) { + return true + } + + return false +} + +// SetExemptions gets a reference to the given []string and assigns it to the Exemptions field. +func (o *ProtectedRef) SetExemptions(v []string) { + o.Exemptions = v +} + +// GetExemptionsRoles returns the ExemptionsRoles field value if set, zero value otherwise. +func (o *ProtectedRef) GetExemptionsRoles() []string { + if o == nil || IsNil(o.ExemptionsRoles) { + var ret []string + return ret + } + return o.ExemptionsRoles +} + +// GetExemptionsRolesOk returns a tuple with the ExemptionsRoles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProtectedRef) GetExemptionsRolesOk() ([]string, bool) { + if o == nil || IsNil(o.ExemptionsRoles) { + return nil, false + } + return o.ExemptionsRoles, true +} + +// HasExemptionsRoles returns a boolean if a field has been set. +func (o *ProtectedRef) HasExemptionsRoles() bool { + if o != nil && !IsNil(o.ExemptionsRoles) { + return true + } + + return false +} + +// SetExemptionsRoles gets a reference to the given []string and assigns it to the ExemptionsRoles field. +func (o *ProtectedRef) SetExemptionsRoles(v []string) { + o.ExemptionsRoles = v +} + +func (o ProtectedRef) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProtectedRef) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["pattern"] = o.Pattern + if !IsNil(o.Exemptions) { + toSerialize["exemptions"] = o.Exemptions + } + if !IsNil(o.ExemptionsRoles) { + toSerialize["exemptionsRoles"] = o.ExemptionsRoles + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ProtectedRef) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "pattern", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varProtectedRef := _ProtectedRef{} + + err = json.Unmarshal(data, &varProtectedRef) + + if err != nil { + return err + } + + *o = ProtectedRef(varProtectedRef) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "pattern") + delete(additionalProperties, "exemptions") + delete(additionalProperties, "exemptionsRoles") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableProtectedRef struct { + value *ProtectedRef + isSet bool +} + +func (v NullableProtectedRef) Get() *ProtectedRef { + return v.value +} + +func (v *NullableProtectedRef) Set(val *ProtectedRef) { + v.value = val + v.isSet = true +} + +func (v NullableProtectedRef) IsSet() bool { + return v.isSet +} + +func (v *NullableProtectedRef) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProtectedRef(val *ProtectedRef) *NullableProtectedRef { + return &NullableProtectedRef{value: val, isSet: true} +} + +func (v NullableProtectedRef) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProtectedRef) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_pull_requests.go b/model_pull_requests.go new file mode 100644 index 0000000..dd2d0e6 --- /dev/null +++ b/model_pull_requests.go @@ -0,0 +1,203 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the PullRequests type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PullRequests{} + +// PullRequests Configures pull request settings +type PullRequests struct { + // Allows merge commits on pull requests + AllowMergeCommits *bool `json:"allowMergeCommits,omitempty"` + // Allows rebase merging on pull requests + AllowRebaseMerging *bool `json:"allowRebaseMerging,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _PullRequests PullRequests + +// NewPullRequests instantiates a new PullRequests object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPullRequests() *PullRequests { + this := PullRequests{} + var allowMergeCommits bool = true + this.AllowMergeCommits = &allowMergeCommits + var allowRebaseMerging bool = true + this.AllowRebaseMerging = &allowRebaseMerging + return &this +} + +// NewPullRequestsWithDefaults instantiates a new PullRequests object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPullRequestsWithDefaults() *PullRequests { + this := PullRequests{} + var allowMergeCommits bool = true + this.AllowMergeCommits = &allowMergeCommits + var allowRebaseMerging bool = true + this.AllowRebaseMerging = &allowRebaseMerging + return &this +} + +// GetAllowMergeCommits returns the AllowMergeCommits field value if set, zero value otherwise. +func (o *PullRequests) GetAllowMergeCommits() bool { + if o == nil || IsNil(o.AllowMergeCommits) { + var ret bool + return ret + } + return *o.AllowMergeCommits +} + +// GetAllowMergeCommitsOk returns a tuple with the AllowMergeCommits field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PullRequests) GetAllowMergeCommitsOk() (*bool, bool) { + if o == nil || IsNil(o.AllowMergeCommits) { + return nil, false + } + return o.AllowMergeCommits, true +} + +// HasAllowMergeCommits returns a boolean if a field has been set. +func (o *PullRequests) HasAllowMergeCommits() bool { + if o != nil && !IsNil(o.AllowMergeCommits) { + return true + } + + return false +} + +// SetAllowMergeCommits gets a reference to the given bool and assigns it to the AllowMergeCommits field. +func (o *PullRequests) SetAllowMergeCommits(v bool) { + o.AllowMergeCommits = &v +} + +// GetAllowRebaseMerging returns the AllowRebaseMerging field value if set, zero value otherwise. +func (o *PullRequests) GetAllowRebaseMerging() bool { + if o == nil || IsNil(o.AllowRebaseMerging) { + var ret bool + return ret + } + return *o.AllowRebaseMerging +} + +// GetAllowRebaseMergingOk returns a tuple with the AllowRebaseMerging field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PullRequests) GetAllowRebaseMergingOk() (*bool, bool) { + if o == nil || IsNil(o.AllowRebaseMerging) { + return nil, false + } + return o.AllowRebaseMerging, true +} + +// HasAllowRebaseMerging returns a boolean if a field has been set. +func (o *PullRequests) HasAllowRebaseMerging() bool { + if o != nil && !IsNil(o.AllowRebaseMerging) { + return true + } + + return false +} + +// SetAllowRebaseMerging gets a reference to the given bool and assigns it to the AllowRebaseMerging field. +func (o *PullRequests) SetAllowRebaseMerging(v bool) { + o.AllowRebaseMerging = &v +} + +func (o PullRequests) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PullRequests) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AllowMergeCommits) { + toSerialize["allowMergeCommits"] = o.AllowMergeCommits + } + if !IsNil(o.AllowRebaseMerging) { + toSerialize["allowRebaseMerging"] = o.AllowRebaseMerging + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *PullRequests) UnmarshalJSON(data []byte) (err error) { + varPullRequests := _PullRequests{} + + err = json.Unmarshal(data, &varPullRequests) + + if err != nil { + return err + } + + *o = PullRequests(varPullRequests) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "allowMergeCommits") + delete(additionalProperties, "allowRebaseMerging") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullablePullRequests struct { + value *PullRequests + isSet bool +} + +func (v NullablePullRequests) Get() *PullRequests { + return v.value +} + +func (v *NullablePullRequests) Set(val *PullRequests) { + v.value = val + v.isSet = true +} + +func (v NullablePullRequests) IsSet() bool { + return v.isSet +} + +func (v *NullablePullRequests) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePullRequests(val *PullRequests) *NullablePullRequests { + return &NullablePullRequests{value: val, isSet: true} +} + +func (v NullablePullRequests) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePullRequests) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_quicklink.go b/model_quicklink.go new file mode 100644 index 0000000..6fd6d02 --- /dev/null +++ b/model_quicklink.go @@ -0,0 +1,230 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the Quicklink type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Quicklink{} + +// Quicklink struct for Quicklink +type Quicklink struct { + Url *string `json:"url,omitempty"` + Title *string `json:"title,omitempty"` + Description *string `json:"description,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _Quicklink Quicklink + +// NewQuicklink instantiates a new Quicklink object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQuicklink() *Quicklink { + this := Quicklink{} + return &this +} + +// NewQuicklinkWithDefaults instantiates a new Quicklink object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQuicklinkWithDefaults() *Quicklink { + this := Quicklink{} + return &this +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *Quicklink) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Quicklink) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *Quicklink) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *Quicklink) SetUrl(v string) { + o.Url = &v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *Quicklink) GetTitle() string { + if o == nil || IsNil(o.Title) { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Quicklink) GetTitleOk() (*string, bool) { + if o == nil || IsNil(o.Title) { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *Quicklink) HasTitle() bool { + if o != nil && !IsNil(o.Title) { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *Quicklink) SetTitle(v string) { + o.Title = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Quicklink) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Quicklink) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Quicklink) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Quicklink) SetDescription(v string) { + o.Description = &v +} + +func (o Quicklink) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Quicklink) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *Quicklink) UnmarshalJSON(data []byte) (err error) { + varQuicklink := _Quicklink{} + + err = json.Unmarshal(data, &varQuicklink) + + if err != nil { + return err + } + + *o = Quicklink(varQuicklink) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "url") + delete(additionalProperties, "title") + delete(additionalProperties, "description") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableQuicklink struct { + value *Quicklink + isSet bool +} + +func (v NullableQuicklink) Get() *Quicklink { + return v.value +} + +func (v *NullableQuicklink) Set(val *Quicklink) { + v.value = val + v.isSet = true +} + +func (v NullableQuicklink) IsSet() bool { + return v.isSet +} + +func (v *NullableQuicklink) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQuicklink(val *Quicklink) *NullableQuicklink { + return &NullableQuicklink{value: val, isSet: true} +} + +func (v NullableQuicklink) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQuicklink) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ref_protections.go b/model_ref_protections.go new file mode 100644 index 0000000..83e0777 --- /dev/null +++ b/model_ref_protections.go @@ -0,0 +1,193 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the RefProtections type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RefProtections{} + +// RefProtections Configures available protections for git refs +type RefProtections struct { + Branches *RefProtectionsBranches `json:"branches,omitempty"` + Tags *RefProtectionsTags `json:"tags,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RefProtections RefProtections + +// NewRefProtections instantiates a new RefProtections object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRefProtections() *RefProtections { + this := RefProtections{} + return &this +} + +// NewRefProtectionsWithDefaults instantiates a new RefProtections object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRefProtectionsWithDefaults() *RefProtections { + this := RefProtections{} + return &this +} + +// GetBranches returns the Branches field value if set, zero value otherwise. +func (o *RefProtections) GetBranches() RefProtectionsBranches { + if o == nil || IsNil(o.Branches) { + var ret RefProtectionsBranches + return ret + } + return *o.Branches +} + +// GetBranchesOk returns a tuple with the Branches field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RefProtections) GetBranchesOk() (*RefProtectionsBranches, bool) { + if o == nil || IsNil(o.Branches) { + return nil, false + } + return o.Branches, true +} + +// HasBranches returns a boolean if a field has been set. +func (o *RefProtections) HasBranches() bool { + if o != nil && !IsNil(o.Branches) { + return true + } + + return false +} + +// SetBranches gets a reference to the given RefProtectionsBranches and assigns it to the Branches field. +func (o *RefProtections) SetBranches(v RefProtectionsBranches) { + o.Branches = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *RefProtections) GetTags() RefProtectionsTags { + if o == nil || IsNil(o.Tags) { + var ret RefProtectionsTags + return ret + } + return *o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RefProtections) GetTagsOk() (*RefProtectionsTags, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *RefProtections) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given RefProtectionsTags and assigns it to the Tags field. +func (o *RefProtections) SetTags(v RefProtectionsTags) { + o.Tags = &v +} + +func (o RefProtections) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RefProtections) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Branches) { + toSerialize["branches"] = o.Branches + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RefProtections) UnmarshalJSON(data []byte) (err error) { + varRefProtections := _RefProtections{} + + err = json.Unmarshal(data, &varRefProtections) + + if err != nil { + return err + } + + *o = RefProtections(varRefProtections) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "branches") + delete(additionalProperties, "tags") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRefProtections struct { + value *RefProtections + isSet bool +} + +func (v NullableRefProtections) Get() *RefProtections { + return v.value +} + +func (v *NullableRefProtections) Set(val *RefProtections) { + v.value = val + v.isSet = true +} + +func (v NullableRefProtections) IsSet() bool { + return v.isSet +} + +func (v *NullableRefProtections) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRefProtections(val *RefProtections) *NullableRefProtections { + return &NullableRefProtections{value: val, isSet: true} +} + +func (v NullableRefProtections) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRefProtections) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ref_protections_branches.go b/model_ref_protections_branches.go new file mode 100644 index 0000000..38fc99a --- /dev/null +++ b/model_ref_protections_branches.go @@ -0,0 +1,347 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the RefProtectionsBranches type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RefProtectionsBranches{} + +// RefProtectionsBranches struct for RefProtectionsBranches +type RefProtectionsBranches struct { + // Forces creating a PR to update the protected refs. + RequirePR []ProtectedRef `json:"requirePR,omitempty"` + // Prevents all changes of the protected refs. + PreventAllChanges []ProtectedRef `json:"preventAllChanges,omitempty"` + // Prevents creation of the protected refs. + PreventCreation []ProtectedRef `json:"preventCreation,omitempty"` + // Prevents deletion of the protected refs. + PreventDeletion []ProtectedRef `json:"preventDeletion,omitempty"` + // Prevents pushes to the protected refs. + PreventPush []ProtectedRef `json:"preventPush,omitempty"` + // Prevents force pushes to the protected refs for users with push permission. + PreventForcePush []ProtectedRef `json:"preventForcePush,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RefProtectionsBranches RefProtectionsBranches + +// NewRefProtectionsBranches instantiates a new RefProtectionsBranches object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRefProtectionsBranches() *RefProtectionsBranches { + this := RefProtectionsBranches{} + return &this +} + +// NewRefProtectionsBranchesWithDefaults instantiates a new RefProtectionsBranches object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRefProtectionsBranchesWithDefaults() *RefProtectionsBranches { + this := RefProtectionsBranches{} + return &this +} + +// GetRequirePR returns the RequirePR field value if set, zero value otherwise. +func (o *RefProtectionsBranches) GetRequirePR() []ProtectedRef { + if o == nil || IsNil(o.RequirePR) { + var ret []ProtectedRef + return ret + } + return o.RequirePR +} + +// GetRequirePROk returns a tuple with the RequirePR field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RefProtectionsBranches) GetRequirePROk() ([]ProtectedRef, bool) { + if o == nil || IsNil(o.RequirePR) { + return nil, false + } + return o.RequirePR, true +} + +// HasRequirePR returns a boolean if a field has been set. +func (o *RefProtectionsBranches) HasRequirePR() bool { + if o != nil && !IsNil(o.RequirePR) { + return true + } + + return false +} + +// SetRequirePR gets a reference to the given []ProtectedRef and assigns it to the RequirePR field. +func (o *RefProtectionsBranches) SetRequirePR(v []ProtectedRef) { + o.RequirePR = v +} + +// GetPreventAllChanges returns the PreventAllChanges field value if set, zero value otherwise. +func (o *RefProtectionsBranches) GetPreventAllChanges() []ProtectedRef { + if o == nil || IsNil(o.PreventAllChanges) { + var ret []ProtectedRef + return ret + } + return o.PreventAllChanges +} + +// GetPreventAllChangesOk returns a tuple with the PreventAllChanges field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RefProtectionsBranches) GetPreventAllChangesOk() ([]ProtectedRef, bool) { + if o == nil || IsNil(o.PreventAllChanges) { + return nil, false + } + return o.PreventAllChanges, true +} + +// HasPreventAllChanges returns a boolean if a field has been set. +func (o *RefProtectionsBranches) HasPreventAllChanges() bool { + if o != nil && !IsNil(o.PreventAllChanges) { + return true + } + + return false +} + +// SetPreventAllChanges gets a reference to the given []ProtectedRef and assigns it to the PreventAllChanges field. +func (o *RefProtectionsBranches) SetPreventAllChanges(v []ProtectedRef) { + o.PreventAllChanges = v +} + +// GetPreventCreation returns the PreventCreation field value if set, zero value otherwise. +func (o *RefProtectionsBranches) GetPreventCreation() []ProtectedRef { + if o == nil || IsNil(o.PreventCreation) { + var ret []ProtectedRef + return ret + } + return o.PreventCreation +} + +// GetPreventCreationOk returns a tuple with the PreventCreation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RefProtectionsBranches) GetPreventCreationOk() ([]ProtectedRef, bool) { + if o == nil || IsNil(o.PreventCreation) { + return nil, false + } + return o.PreventCreation, true +} + +// HasPreventCreation returns a boolean if a field has been set. +func (o *RefProtectionsBranches) HasPreventCreation() bool { + if o != nil && !IsNil(o.PreventCreation) { + return true + } + + return false +} + +// SetPreventCreation gets a reference to the given []ProtectedRef and assigns it to the PreventCreation field. +func (o *RefProtectionsBranches) SetPreventCreation(v []ProtectedRef) { + o.PreventCreation = v +} + +// GetPreventDeletion returns the PreventDeletion field value if set, zero value otherwise. +func (o *RefProtectionsBranches) GetPreventDeletion() []ProtectedRef { + if o == nil || IsNil(o.PreventDeletion) { + var ret []ProtectedRef + return ret + } + return o.PreventDeletion +} + +// GetPreventDeletionOk returns a tuple with the PreventDeletion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RefProtectionsBranches) GetPreventDeletionOk() ([]ProtectedRef, bool) { + if o == nil || IsNil(o.PreventDeletion) { + return nil, false + } + return o.PreventDeletion, true +} + +// HasPreventDeletion returns a boolean if a field has been set. +func (o *RefProtectionsBranches) HasPreventDeletion() bool { + if o != nil && !IsNil(o.PreventDeletion) { + return true + } + + return false +} + +// SetPreventDeletion gets a reference to the given []ProtectedRef and assigns it to the PreventDeletion field. +func (o *RefProtectionsBranches) SetPreventDeletion(v []ProtectedRef) { + o.PreventDeletion = v +} + +// GetPreventPush returns the PreventPush field value if set, zero value otherwise. +func (o *RefProtectionsBranches) GetPreventPush() []ProtectedRef { + if o == nil || IsNil(o.PreventPush) { + var ret []ProtectedRef + return ret + } + return o.PreventPush +} + +// GetPreventPushOk returns a tuple with the PreventPush field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RefProtectionsBranches) GetPreventPushOk() ([]ProtectedRef, bool) { + if o == nil || IsNil(o.PreventPush) { + return nil, false + } + return o.PreventPush, true +} + +// HasPreventPush returns a boolean if a field has been set. +func (o *RefProtectionsBranches) HasPreventPush() bool { + if o != nil && !IsNil(o.PreventPush) { + return true + } + + return false +} + +// SetPreventPush gets a reference to the given []ProtectedRef and assigns it to the PreventPush field. +func (o *RefProtectionsBranches) SetPreventPush(v []ProtectedRef) { + o.PreventPush = v +} + +// GetPreventForcePush returns the PreventForcePush field value if set, zero value otherwise. +func (o *RefProtectionsBranches) GetPreventForcePush() []ProtectedRef { + if o == nil || IsNil(o.PreventForcePush) { + var ret []ProtectedRef + return ret + } + return o.PreventForcePush +} + +// GetPreventForcePushOk returns a tuple with the PreventForcePush field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RefProtectionsBranches) GetPreventForcePushOk() ([]ProtectedRef, bool) { + if o == nil || IsNil(o.PreventForcePush) { + return nil, false + } + return o.PreventForcePush, true +} + +// HasPreventForcePush returns a boolean if a field has been set. +func (o *RefProtectionsBranches) HasPreventForcePush() bool { + if o != nil && !IsNil(o.PreventForcePush) { + return true + } + + return false +} + +// SetPreventForcePush gets a reference to the given []ProtectedRef and assigns it to the PreventForcePush field. +func (o *RefProtectionsBranches) SetPreventForcePush(v []ProtectedRef) { + o.PreventForcePush = v +} + +func (o RefProtectionsBranches) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RefProtectionsBranches) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RequirePR) { + toSerialize["requirePR"] = o.RequirePR + } + if !IsNil(o.PreventAllChanges) { + toSerialize["preventAllChanges"] = o.PreventAllChanges + } + if !IsNil(o.PreventCreation) { + toSerialize["preventCreation"] = o.PreventCreation + } + if !IsNil(o.PreventDeletion) { + toSerialize["preventDeletion"] = o.PreventDeletion + } + if !IsNil(o.PreventPush) { + toSerialize["preventPush"] = o.PreventPush + } + if !IsNil(o.PreventForcePush) { + toSerialize["preventForcePush"] = o.PreventForcePush + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RefProtectionsBranches) UnmarshalJSON(data []byte) (err error) { + varRefProtectionsBranches := _RefProtectionsBranches{} + + err = json.Unmarshal(data, &varRefProtectionsBranches) + + if err != nil { + return err + } + + *o = RefProtectionsBranches(varRefProtectionsBranches) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "requirePR") + delete(additionalProperties, "preventAllChanges") + delete(additionalProperties, "preventCreation") + delete(additionalProperties, "preventDeletion") + delete(additionalProperties, "preventPush") + delete(additionalProperties, "preventForcePush") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRefProtectionsBranches struct { + value *RefProtectionsBranches + isSet bool +} + +func (v NullableRefProtectionsBranches) Get() *RefProtectionsBranches { + return v.value +} + +func (v *NullableRefProtectionsBranches) Set(val *RefProtectionsBranches) { + v.value = val + v.isSet = true +} + +func (v NullableRefProtectionsBranches) IsSet() bool { + return v.isSet +} + +func (v *NullableRefProtectionsBranches) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRefProtectionsBranches(val *RefProtectionsBranches) *NullableRefProtectionsBranches { + return &NullableRefProtectionsBranches{value: val, isSet: true} +} + +func (v NullableRefProtectionsBranches) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRefProtectionsBranches) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_ref_protections_tags.go b/model_ref_protections_tags.go new file mode 100644 index 0000000..b3f6e17 --- /dev/null +++ b/model_ref_protections_tags.go @@ -0,0 +1,271 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the RefProtectionsTags type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RefProtectionsTags{} + +// RefProtectionsTags struct for RefProtectionsTags +type RefProtectionsTags struct { + // Prevents all changes of the protected refs. + PreventAllChanges []ProtectedRef `json:"preventAllChanges,omitempty"` + // Prevents creation of the protected refs. + PreventCreation []ProtectedRef `json:"preventCreation,omitempty"` + // Prevents deletion of the protected refs. + PreventDeletion []ProtectedRef `json:"preventDeletion,omitempty"` + // Prevents force pushes to the protected refs for users with push permission. + PreventForcePush []ProtectedRef `json:"preventForcePush,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RefProtectionsTags RefProtectionsTags + +// NewRefProtectionsTags instantiates a new RefProtectionsTags object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRefProtectionsTags() *RefProtectionsTags { + this := RefProtectionsTags{} + return &this +} + +// NewRefProtectionsTagsWithDefaults instantiates a new RefProtectionsTags object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRefProtectionsTagsWithDefaults() *RefProtectionsTags { + this := RefProtectionsTags{} + return &this +} + +// GetPreventAllChanges returns the PreventAllChanges field value if set, zero value otherwise. +func (o *RefProtectionsTags) GetPreventAllChanges() []ProtectedRef { + if o == nil || IsNil(o.PreventAllChanges) { + var ret []ProtectedRef + return ret + } + return o.PreventAllChanges +} + +// GetPreventAllChangesOk returns a tuple with the PreventAllChanges field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RefProtectionsTags) GetPreventAllChangesOk() ([]ProtectedRef, bool) { + if o == nil || IsNil(o.PreventAllChanges) { + return nil, false + } + return o.PreventAllChanges, true +} + +// HasPreventAllChanges returns a boolean if a field has been set. +func (o *RefProtectionsTags) HasPreventAllChanges() bool { + if o != nil && !IsNil(o.PreventAllChanges) { + return true + } + + return false +} + +// SetPreventAllChanges gets a reference to the given []ProtectedRef and assigns it to the PreventAllChanges field. +func (o *RefProtectionsTags) SetPreventAllChanges(v []ProtectedRef) { + o.PreventAllChanges = v +} + +// GetPreventCreation returns the PreventCreation field value if set, zero value otherwise. +func (o *RefProtectionsTags) GetPreventCreation() []ProtectedRef { + if o == nil || IsNil(o.PreventCreation) { + var ret []ProtectedRef + return ret + } + return o.PreventCreation +} + +// GetPreventCreationOk returns a tuple with the PreventCreation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RefProtectionsTags) GetPreventCreationOk() ([]ProtectedRef, bool) { + if o == nil || IsNil(o.PreventCreation) { + return nil, false + } + return o.PreventCreation, true +} + +// HasPreventCreation returns a boolean if a field has been set. +func (o *RefProtectionsTags) HasPreventCreation() bool { + if o != nil && !IsNil(o.PreventCreation) { + return true + } + + return false +} + +// SetPreventCreation gets a reference to the given []ProtectedRef and assigns it to the PreventCreation field. +func (o *RefProtectionsTags) SetPreventCreation(v []ProtectedRef) { + o.PreventCreation = v +} + +// GetPreventDeletion returns the PreventDeletion field value if set, zero value otherwise. +func (o *RefProtectionsTags) GetPreventDeletion() []ProtectedRef { + if o == nil || IsNil(o.PreventDeletion) { + var ret []ProtectedRef + return ret + } + return o.PreventDeletion +} + +// GetPreventDeletionOk returns a tuple with the PreventDeletion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RefProtectionsTags) GetPreventDeletionOk() ([]ProtectedRef, bool) { + if o == nil || IsNil(o.PreventDeletion) { + return nil, false + } + return o.PreventDeletion, true +} + +// HasPreventDeletion returns a boolean if a field has been set. +func (o *RefProtectionsTags) HasPreventDeletion() bool { + if o != nil && !IsNil(o.PreventDeletion) { + return true + } + + return false +} + +// SetPreventDeletion gets a reference to the given []ProtectedRef and assigns it to the PreventDeletion field. +func (o *RefProtectionsTags) SetPreventDeletion(v []ProtectedRef) { + o.PreventDeletion = v +} + +// GetPreventForcePush returns the PreventForcePush field value if set, zero value otherwise. +func (o *RefProtectionsTags) GetPreventForcePush() []ProtectedRef { + if o == nil || IsNil(o.PreventForcePush) { + var ret []ProtectedRef + return ret + } + return o.PreventForcePush +} + +// GetPreventForcePushOk returns a tuple with the PreventForcePush field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RefProtectionsTags) GetPreventForcePushOk() ([]ProtectedRef, bool) { + if o == nil || IsNil(o.PreventForcePush) { + return nil, false + } + return o.PreventForcePush, true +} + +// HasPreventForcePush returns a boolean if a field has been set. +func (o *RefProtectionsTags) HasPreventForcePush() bool { + if o != nil && !IsNil(o.PreventForcePush) { + return true + } + + return false +} + +// SetPreventForcePush gets a reference to the given []ProtectedRef and assigns it to the PreventForcePush field. +func (o *RefProtectionsTags) SetPreventForcePush(v []ProtectedRef) { + o.PreventForcePush = v +} + +func (o RefProtectionsTags) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RefProtectionsTags) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PreventAllChanges) { + toSerialize["preventAllChanges"] = o.PreventAllChanges + } + if !IsNil(o.PreventCreation) { + toSerialize["preventCreation"] = o.PreventCreation + } + if !IsNil(o.PreventDeletion) { + toSerialize["preventDeletion"] = o.PreventDeletion + } + if !IsNil(o.PreventForcePush) { + toSerialize["preventForcePush"] = o.PreventForcePush + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RefProtectionsTags) UnmarshalJSON(data []byte) (err error) { + varRefProtectionsTags := _RefProtectionsTags{} + + err = json.Unmarshal(data, &varRefProtectionsTags) + + if err != nil { + return err + } + + *o = RefProtectionsTags(varRefProtectionsTags) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "preventAllChanges") + delete(additionalProperties, "preventCreation") + delete(additionalProperties, "preventDeletion") + delete(additionalProperties, "preventForcePush") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRefProtectionsTags struct { + value *RefProtectionsTags + isSet bool +} + +func (v NullableRefProtectionsTags) Get() *RefProtectionsTags { + return v.value +} + +func (v *NullableRefProtectionsTags) Set(val *RefProtectionsTags) { + v.value = val + v.isSet = true +} + +func (v NullableRefProtectionsTags) IsSet() bool { + return v.isSet +} + +func (v *NullableRefProtectionsTags) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRefProtectionsTags(val *RefProtectionsTags) *NullableRefProtectionsTags { + return &NullableRefProtectionsTags{value: val, isSet: true} +} + +func (v NullableRefProtectionsTags) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRefProtectionsTags) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_repository_configuration_access_key_dto.go b/model_repository_configuration_access_key_dto.go new file mode 100644 index 0000000..e8824d4 --- /dev/null +++ b/model_repository_configuration_access_key_dto.go @@ -0,0 +1,230 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the RepositoryConfigurationAccessKeyDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryConfigurationAccessKeyDto{} + +// RepositoryConfigurationAccessKeyDto struct for RepositoryConfigurationAccessKeyDto +type RepositoryConfigurationAccessKeyDto struct { + Key *string `json:"key,omitempty"` + Data *string `json:"data,omitempty"` + Permission *string `json:"permission,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RepositoryConfigurationAccessKeyDto RepositoryConfigurationAccessKeyDto + +// NewRepositoryConfigurationAccessKeyDto instantiates a new RepositoryConfigurationAccessKeyDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryConfigurationAccessKeyDto() *RepositoryConfigurationAccessKeyDto { + this := RepositoryConfigurationAccessKeyDto{} + return &this +} + +// NewRepositoryConfigurationAccessKeyDtoWithDefaults instantiates a new RepositoryConfigurationAccessKeyDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryConfigurationAccessKeyDtoWithDefaults() *RepositoryConfigurationAccessKeyDto { + this := RepositoryConfigurationAccessKeyDto{} + return &this +} + +// GetKey returns the Key field value if set, zero value otherwise. +func (o *RepositoryConfigurationAccessKeyDto) GetKey() string { + if o == nil || IsNil(o.Key) { + var ret string + return ret + } + return *o.Key +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationAccessKeyDto) GetKeyOk() (*string, bool) { + if o == nil || IsNil(o.Key) { + return nil, false + } + return o.Key, true +} + +// HasKey returns a boolean if a field has been set. +func (o *RepositoryConfigurationAccessKeyDto) HasKey() bool { + if o != nil && !IsNil(o.Key) { + return true + } + + return false +} + +// SetKey gets a reference to the given string and assigns it to the Key field. +func (o *RepositoryConfigurationAccessKeyDto) SetKey(v string) { + o.Key = &v +} + +// GetData returns the Data field value if set, zero value otherwise. +func (o *RepositoryConfigurationAccessKeyDto) GetData() string { + if o == nil || IsNil(o.Data) { + var ret string + return ret + } + return *o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationAccessKeyDto) GetDataOk() (*string, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *RepositoryConfigurationAccessKeyDto) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given string and assigns it to the Data field. +func (o *RepositoryConfigurationAccessKeyDto) SetData(v string) { + o.Data = &v +} + +// GetPermission returns the Permission field value if set, zero value otherwise. +func (o *RepositoryConfigurationAccessKeyDto) GetPermission() string { + if o == nil || IsNil(o.Permission) { + var ret string + return ret + } + return *o.Permission +} + +// GetPermissionOk returns a tuple with the Permission field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationAccessKeyDto) GetPermissionOk() (*string, bool) { + if o == nil || IsNil(o.Permission) { + return nil, false + } + return o.Permission, true +} + +// HasPermission returns a boolean if a field has been set. +func (o *RepositoryConfigurationAccessKeyDto) HasPermission() bool { + if o != nil && !IsNil(o.Permission) { + return true + } + + return false +} + +// SetPermission gets a reference to the given string and assigns it to the Permission field. +func (o *RepositoryConfigurationAccessKeyDto) SetPermission(v string) { + o.Permission = &v +} + +func (o RepositoryConfigurationAccessKeyDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepositoryConfigurationAccessKeyDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Key) { + toSerialize["key"] = o.Key + } + if !IsNil(o.Data) { + toSerialize["data"] = o.Data + } + if !IsNil(o.Permission) { + toSerialize["permission"] = o.Permission + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RepositoryConfigurationAccessKeyDto) UnmarshalJSON(data []byte) (err error) { + varRepositoryConfigurationAccessKeyDto := _RepositoryConfigurationAccessKeyDto{} + + err = json.Unmarshal(data, &varRepositoryConfigurationAccessKeyDto) + + if err != nil { + return err + } + + *o = RepositoryConfigurationAccessKeyDto(varRepositoryConfigurationAccessKeyDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "key") + delete(additionalProperties, "data") + delete(additionalProperties, "permission") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepositoryConfigurationAccessKeyDto struct { + value *RepositoryConfigurationAccessKeyDto + isSet bool +} + +func (v NullableRepositoryConfigurationAccessKeyDto) Get() *RepositoryConfigurationAccessKeyDto { + return v.value +} + +func (v *NullableRepositoryConfigurationAccessKeyDto) Set(val *RepositoryConfigurationAccessKeyDto) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryConfigurationAccessKeyDto) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryConfigurationAccessKeyDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryConfigurationAccessKeyDto(val *RepositoryConfigurationAccessKeyDto) *NullableRepositoryConfigurationAccessKeyDto { + return &NullableRepositoryConfigurationAccessKeyDto{value: val, isSet: true} +} + +func (v NullableRepositoryConfigurationAccessKeyDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryConfigurationAccessKeyDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_repository_configuration_default_task_dto.go b/model_repository_configuration_default_task_dto.go new file mode 100644 index 0000000..00859b9 --- /dev/null +++ b/model_repository_configuration_default_task_dto.go @@ -0,0 +1,169 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the RepositoryConfigurationDefaultTaskDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryConfigurationDefaultTaskDto{} + +// RepositoryConfigurationDefaultTaskDto struct for RepositoryConfigurationDefaultTaskDto +type RepositoryConfigurationDefaultTaskDto struct { + Text string `json:"text"` + AdditionalProperties map[string]interface{} +} + +type _RepositoryConfigurationDefaultTaskDto RepositoryConfigurationDefaultTaskDto + +// NewRepositoryConfigurationDefaultTaskDto instantiates a new RepositoryConfigurationDefaultTaskDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryConfigurationDefaultTaskDto(text string) *RepositoryConfigurationDefaultTaskDto { + this := RepositoryConfigurationDefaultTaskDto{} + this.Text = text + return &this +} + +// NewRepositoryConfigurationDefaultTaskDtoWithDefaults instantiates a new RepositoryConfigurationDefaultTaskDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryConfigurationDefaultTaskDtoWithDefaults() *RepositoryConfigurationDefaultTaskDto { + this := RepositoryConfigurationDefaultTaskDto{} + return &this +} + +// GetText returns the Text field value +func (o *RepositoryConfigurationDefaultTaskDto) GetText() string { + if o == nil { + var ret string + return ret + } + + return o.Text +} + +// GetTextOk returns a tuple with the Text field value +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDefaultTaskDto) GetTextOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Text, true +} + +// SetText sets field value +func (o *RepositoryConfigurationDefaultTaskDto) SetText(v string) { + o.Text = v +} + +func (o RepositoryConfigurationDefaultTaskDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepositoryConfigurationDefaultTaskDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["text"] = o.Text + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RepositoryConfigurationDefaultTaskDto) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "text", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRepositoryConfigurationDefaultTaskDto := _RepositoryConfigurationDefaultTaskDto{} + + err = json.Unmarshal(data, &varRepositoryConfigurationDefaultTaskDto) + + if err != nil { + return err + } + + *o = RepositoryConfigurationDefaultTaskDto(varRepositoryConfigurationDefaultTaskDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "text") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepositoryConfigurationDefaultTaskDto struct { + value *RepositoryConfigurationDefaultTaskDto + isSet bool +} + +func (v NullableRepositoryConfigurationDefaultTaskDto) Get() *RepositoryConfigurationDefaultTaskDto { + return v.value +} + +func (v *NullableRepositoryConfigurationDefaultTaskDto) Set(val *RepositoryConfigurationDefaultTaskDto) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryConfigurationDefaultTaskDto) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryConfigurationDefaultTaskDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryConfigurationDefaultTaskDto(val *RepositoryConfigurationDefaultTaskDto) *NullableRepositoryConfigurationDefaultTaskDto { + return &NullableRepositoryConfigurationDefaultTaskDto{value: val, isSet: true} +} + +func (v NullableRepositoryConfigurationDefaultTaskDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryConfigurationDefaultTaskDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_repository_configuration_dto.go b/model_repository_configuration_dto.go new file mode 100644 index 0000000..677c355 --- /dev/null +++ b/model_repository_configuration_dto.go @@ -0,0 +1,950 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the RepositoryConfigurationDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryConfigurationDto{} + +// RepositoryConfigurationDto Attributes to configure the repository. If a configuration exists there are also some configured defaults for the repository. +type RepositoryConfigurationDto struct { + // Ssh-Keys configured on the repository. + AccessKeys []RepositoryConfigurationAccessKeyDto `json:"accessKeys,omitempty"` + MergeConfig *RepositoryConfigurationDtoMergeConfig `json:"mergeConfig,omitempty"` + DefaultTasks []RepositoryConfigurationDefaultTaskDto `json:"defaultTasks,omitempty"` + // Use an explicit branch name regex. + BranchNameRegex *string `json:"branchNameRegex,omitempty"` + // Use an explicit commit message regex. + CommitMessageRegex *string `json:"commitMessageRegex,omitempty"` + // Adds a corresponding commit message regex. + CommitMessageType *string `json:"commitMessageType,omitempty"` + // Set the required successful builds counter. + RequireSuccessfulBuilds *int32 `json:"requireSuccessfulBuilds,omitempty"` + // Set the required approvals counter. + RequireApprovals *int32 `json:"requireApprovals,omitempty"` + // Exclude merge commits from commit checks. + ExcludeMergeCommits *bool `json:"excludeMergeCommits,omitempty"` + // Exclude users from commit checks. + ExcludeMergeCheckUsers []ExcludeMergeCheckUserDto `json:"excludeMergeCheckUsers,omitempty"` + Webhooks *RepositoryConfigurationWebhooksDto `json:"webhooks,omitempty"` + // Map of string (group name e.g. some-owner) of strings (list of approvers), one approval for each group is required. + Approvers map[string][]string `json:"approvers,omitempty"` + // Raw data of approvers + RawApprovers map[string][]string `json:"rawApprovers,omitempty"` + // List of strings (list of watchers, either usernames or group identifier), which are added as reviewers but require no approval. + Watchers []string `json:"watchers,omitempty"` + // Raw data of watchers + RawWatchers []string `json:"rawWatchers,omitempty"` + // Moves the repository into the archive. + Archived *bool `json:"archived,omitempty"` + // Repository will not be configured, also not archived. + Unmanaged *bool `json:"unmanaged,omitempty"` + RefProtections *RefProtections `json:"refProtections,omitempty"` + PullRequests *PullRequests `json:"pullRequests,omitempty"` + // Configures JQL matcher with query: issuetype in (Story, Bug) AND 'Risk Level' is not EMPTY + RequireIssue *bool `json:"requireIssue,omitempty"` + // Configuration of conditional builds as map of structs (key name e.g. some-key) of target references. + RequireConditions map[string]ConditionReferenceDto `json:"requireConditions,omitempty"` + // Control how the repository is used by GitHub Actions workflows in other repositories + ActionsAccess *string `json:"actionsAccess,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RepositoryConfigurationDto RepositoryConfigurationDto + +// NewRepositoryConfigurationDto instantiates a new RepositoryConfigurationDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryConfigurationDto() *RepositoryConfigurationDto { + this := RepositoryConfigurationDto{} + return &this +} + +// NewRepositoryConfigurationDtoWithDefaults instantiates a new RepositoryConfigurationDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryConfigurationDtoWithDefaults() *RepositoryConfigurationDto { + this := RepositoryConfigurationDto{} + return &this +} + +// GetAccessKeys returns the AccessKeys field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetAccessKeys() []RepositoryConfigurationAccessKeyDto { + if o == nil || IsNil(o.AccessKeys) { + var ret []RepositoryConfigurationAccessKeyDto + return ret + } + return o.AccessKeys +} + +// GetAccessKeysOk returns a tuple with the AccessKeys field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetAccessKeysOk() ([]RepositoryConfigurationAccessKeyDto, bool) { + if o == nil || IsNil(o.AccessKeys) { + return nil, false + } + return o.AccessKeys, true +} + +// HasAccessKeys returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasAccessKeys() bool { + if o != nil && !IsNil(o.AccessKeys) { + return true + } + + return false +} + +// SetAccessKeys gets a reference to the given []RepositoryConfigurationAccessKeyDto and assigns it to the AccessKeys field. +func (o *RepositoryConfigurationDto) SetAccessKeys(v []RepositoryConfigurationAccessKeyDto) { + o.AccessKeys = v +} + +// GetMergeConfig returns the MergeConfig field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetMergeConfig() RepositoryConfigurationDtoMergeConfig { + if o == nil || IsNil(o.MergeConfig) { + var ret RepositoryConfigurationDtoMergeConfig + return ret + } + return *o.MergeConfig +} + +// GetMergeConfigOk returns a tuple with the MergeConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetMergeConfigOk() (*RepositoryConfigurationDtoMergeConfig, bool) { + if o == nil || IsNil(o.MergeConfig) { + return nil, false + } + return o.MergeConfig, true +} + +// HasMergeConfig returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasMergeConfig() bool { + if o != nil && !IsNil(o.MergeConfig) { + return true + } + + return false +} + +// SetMergeConfig gets a reference to the given RepositoryConfigurationDtoMergeConfig and assigns it to the MergeConfig field. +func (o *RepositoryConfigurationDto) SetMergeConfig(v RepositoryConfigurationDtoMergeConfig) { + o.MergeConfig = &v +} + +// GetDefaultTasks returns the DefaultTasks field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetDefaultTasks() []RepositoryConfigurationDefaultTaskDto { + if o == nil || IsNil(o.DefaultTasks) { + var ret []RepositoryConfigurationDefaultTaskDto + return ret + } + return o.DefaultTasks +} + +// GetDefaultTasksOk returns a tuple with the DefaultTasks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetDefaultTasksOk() ([]RepositoryConfigurationDefaultTaskDto, bool) { + if o == nil || IsNil(o.DefaultTasks) { + return nil, false + } + return o.DefaultTasks, true +} + +// HasDefaultTasks returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasDefaultTasks() bool { + if o != nil && !IsNil(o.DefaultTasks) { + return true + } + + return false +} + +// SetDefaultTasks gets a reference to the given []RepositoryConfigurationDefaultTaskDto and assigns it to the DefaultTasks field. +func (o *RepositoryConfigurationDto) SetDefaultTasks(v []RepositoryConfigurationDefaultTaskDto) { + o.DefaultTasks = v +} + +// GetBranchNameRegex returns the BranchNameRegex field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetBranchNameRegex() string { + if o == nil || IsNil(o.BranchNameRegex) { + var ret string + return ret + } + return *o.BranchNameRegex +} + +// GetBranchNameRegexOk returns a tuple with the BranchNameRegex field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetBranchNameRegexOk() (*string, bool) { + if o == nil || IsNil(o.BranchNameRegex) { + return nil, false + } + return o.BranchNameRegex, true +} + +// HasBranchNameRegex returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasBranchNameRegex() bool { + if o != nil && !IsNil(o.BranchNameRegex) { + return true + } + + return false +} + +// SetBranchNameRegex gets a reference to the given string and assigns it to the BranchNameRegex field. +func (o *RepositoryConfigurationDto) SetBranchNameRegex(v string) { + o.BranchNameRegex = &v +} + +// GetCommitMessageRegex returns the CommitMessageRegex field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetCommitMessageRegex() string { + if o == nil || IsNil(o.CommitMessageRegex) { + var ret string + return ret + } + return *o.CommitMessageRegex +} + +// GetCommitMessageRegexOk returns a tuple with the CommitMessageRegex field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetCommitMessageRegexOk() (*string, bool) { + if o == nil || IsNil(o.CommitMessageRegex) { + return nil, false + } + return o.CommitMessageRegex, true +} + +// HasCommitMessageRegex returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasCommitMessageRegex() bool { + if o != nil && !IsNil(o.CommitMessageRegex) { + return true + } + + return false +} + +// SetCommitMessageRegex gets a reference to the given string and assigns it to the CommitMessageRegex field. +func (o *RepositoryConfigurationDto) SetCommitMessageRegex(v string) { + o.CommitMessageRegex = &v +} + +// GetCommitMessageType returns the CommitMessageType field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetCommitMessageType() string { + if o == nil || IsNil(o.CommitMessageType) { + var ret string + return ret + } + return *o.CommitMessageType +} + +// GetCommitMessageTypeOk returns a tuple with the CommitMessageType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetCommitMessageTypeOk() (*string, bool) { + if o == nil || IsNil(o.CommitMessageType) { + return nil, false + } + return o.CommitMessageType, true +} + +// HasCommitMessageType returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasCommitMessageType() bool { + if o != nil && !IsNil(o.CommitMessageType) { + return true + } + + return false +} + +// SetCommitMessageType gets a reference to the given string and assigns it to the CommitMessageType field. +func (o *RepositoryConfigurationDto) SetCommitMessageType(v string) { + o.CommitMessageType = &v +} + +// GetRequireSuccessfulBuilds returns the RequireSuccessfulBuilds field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetRequireSuccessfulBuilds() int32 { + if o == nil || IsNil(o.RequireSuccessfulBuilds) { + var ret int32 + return ret + } + return *o.RequireSuccessfulBuilds +} + +// GetRequireSuccessfulBuildsOk returns a tuple with the RequireSuccessfulBuilds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetRequireSuccessfulBuildsOk() (*int32, bool) { + if o == nil || IsNil(o.RequireSuccessfulBuilds) { + return nil, false + } + return o.RequireSuccessfulBuilds, true +} + +// HasRequireSuccessfulBuilds returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasRequireSuccessfulBuilds() bool { + if o != nil && !IsNil(o.RequireSuccessfulBuilds) { + return true + } + + return false +} + +// SetRequireSuccessfulBuilds gets a reference to the given int32 and assigns it to the RequireSuccessfulBuilds field. +func (o *RepositoryConfigurationDto) SetRequireSuccessfulBuilds(v int32) { + o.RequireSuccessfulBuilds = &v +} + +// GetRequireApprovals returns the RequireApprovals field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetRequireApprovals() int32 { + if o == nil || IsNil(o.RequireApprovals) { + var ret int32 + return ret + } + return *o.RequireApprovals +} + +// GetRequireApprovalsOk returns a tuple with the RequireApprovals field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetRequireApprovalsOk() (*int32, bool) { + if o == nil || IsNil(o.RequireApprovals) { + return nil, false + } + return o.RequireApprovals, true +} + +// HasRequireApprovals returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasRequireApprovals() bool { + if o != nil && !IsNil(o.RequireApprovals) { + return true + } + + return false +} + +// SetRequireApprovals gets a reference to the given int32 and assigns it to the RequireApprovals field. +func (o *RepositoryConfigurationDto) SetRequireApprovals(v int32) { + o.RequireApprovals = &v +} + +// GetExcludeMergeCommits returns the ExcludeMergeCommits field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetExcludeMergeCommits() bool { + if o == nil || IsNil(o.ExcludeMergeCommits) { + var ret bool + return ret + } + return *o.ExcludeMergeCommits +} + +// GetExcludeMergeCommitsOk returns a tuple with the ExcludeMergeCommits field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetExcludeMergeCommitsOk() (*bool, bool) { + if o == nil || IsNil(o.ExcludeMergeCommits) { + return nil, false + } + return o.ExcludeMergeCommits, true +} + +// HasExcludeMergeCommits returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasExcludeMergeCommits() bool { + if o != nil && !IsNil(o.ExcludeMergeCommits) { + return true + } + + return false +} + +// SetExcludeMergeCommits gets a reference to the given bool and assigns it to the ExcludeMergeCommits field. +func (o *RepositoryConfigurationDto) SetExcludeMergeCommits(v bool) { + o.ExcludeMergeCommits = &v +} + +// GetExcludeMergeCheckUsers returns the ExcludeMergeCheckUsers field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetExcludeMergeCheckUsers() []ExcludeMergeCheckUserDto { + if o == nil || IsNil(o.ExcludeMergeCheckUsers) { + var ret []ExcludeMergeCheckUserDto + return ret + } + return o.ExcludeMergeCheckUsers +} + +// GetExcludeMergeCheckUsersOk returns a tuple with the ExcludeMergeCheckUsers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetExcludeMergeCheckUsersOk() ([]ExcludeMergeCheckUserDto, bool) { + if o == nil || IsNil(o.ExcludeMergeCheckUsers) { + return nil, false + } + return o.ExcludeMergeCheckUsers, true +} + +// HasExcludeMergeCheckUsers returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasExcludeMergeCheckUsers() bool { + if o != nil && !IsNil(o.ExcludeMergeCheckUsers) { + return true + } + + return false +} + +// SetExcludeMergeCheckUsers gets a reference to the given []ExcludeMergeCheckUserDto and assigns it to the ExcludeMergeCheckUsers field. +func (o *RepositoryConfigurationDto) SetExcludeMergeCheckUsers(v []ExcludeMergeCheckUserDto) { + o.ExcludeMergeCheckUsers = v +} + +// GetWebhooks returns the Webhooks field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetWebhooks() RepositoryConfigurationWebhooksDto { + if o == nil || IsNil(o.Webhooks) { + var ret RepositoryConfigurationWebhooksDto + return ret + } + return *o.Webhooks +} + +// GetWebhooksOk returns a tuple with the Webhooks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetWebhooksOk() (*RepositoryConfigurationWebhooksDto, bool) { + if o == nil || IsNil(o.Webhooks) { + return nil, false + } + return o.Webhooks, true +} + +// HasWebhooks returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasWebhooks() bool { + if o != nil && !IsNil(o.Webhooks) { + return true + } + + return false +} + +// SetWebhooks gets a reference to the given RepositoryConfigurationWebhooksDto and assigns it to the Webhooks field. +func (o *RepositoryConfigurationDto) SetWebhooks(v RepositoryConfigurationWebhooksDto) { + o.Webhooks = &v +} + +// GetApprovers returns the Approvers field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetApprovers() map[string][]string { + if o == nil || IsNil(o.Approvers) { + var ret map[string][]string + return ret + } + return o.Approvers +} + +// GetApproversOk returns a tuple with the Approvers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetApproversOk() (map[string][]string, bool) { + if o == nil || IsNil(o.Approvers) { + return map[string][]string{}, false + } + return o.Approvers, true +} + +// HasApprovers returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasApprovers() bool { + if o != nil && !IsNil(o.Approvers) { + return true + } + + return false +} + +// SetApprovers gets a reference to the given map[string][]string and assigns it to the Approvers field. +func (o *RepositoryConfigurationDto) SetApprovers(v map[string][]string) { + o.Approvers = v +} + +// GetRawApprovers returns the RawApprovers field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetRawApprovers() map[string][]string { + if o == nil || IsNil(o.RawApprovers) { + var ret map[string][]string + return ret + } + return o.RawApprovers +} + +// GetRawApproversOk returns a tuple with the RawApprovers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetRawApproversOk() (map[string][]string, bool) { + if o == nil || IsNil(o.RawApprovers) { + return map[string][]string{}, false + } + return o.RawApprovers, true +} + +// HasRawApprovers returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasRawApprovers() bool { + if o != nil && !IsNil(o.RawApprovers) { + return true + } + + return false +} + +// SetRawApprovers gets a reference to the given map[string][]string and assigns it to the RawApprovers field. +func (o *RepositoryConfigurationDto) SetRawApprovers(v map[string][]string) { + o.RawApprovers = v +} + +// GetWatchers returns the Watchers field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetWatchers() []string { + if o == nil || IsNil(o.Watchers) { + var ret []string + return ret + } + return o.Watchers +} + +// GetWatchersOk returns a tuple with the Watchers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetWatchersOk() ([]string, bool) { + if o == nil || IsNil(o.Watchers) { + return nil, false + } + return o.Watchers, true +} + +// HasWatchers returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasWatchers() bool { + if o != nil && !IsNil(o.Watchers) { + return true + } + + return false +} + +// SetWatchers gets a reference to the given []string and assigns it to the Watchers field. +func (o *RepositoryConfigurationDto) SetWatchers(v []string) { + o.Watchers = v +} + +// GetRawWatchers returns the RawWatchers field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetRawWatchers() []string { + if o == nil || IsNil(o.RawWatchers) { + var ret []string + return ret + } + return o.RawWatchers +} + +// GetRawWatchersOk returns a tuple with the RawWatchers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetRawWatchersOk() ([]string, bool) { + if o == nil || IsNil(o.RawWatchers) { + return nil, false + } + return o.RawWatchers, true +} + +// HasRawWatchers returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasRawWatchers() bool { + if o != nil && !IsNil(o.RawWatchers) { + return true + } + + return false +} + +// SetRawWatchers gets a reference to the given []string and assigns it to the RawWatchers field. +func (o *RepositoryConfigurationDto) SetRawWatchers(v []string) { + o.RawWatchers = v +} + +// GetArchived returns the Archived field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetArchived() bool { + if o == nil || IsNil(o.Archived) { + var ret bool + return ret + } + return *o.Archived +} + +// GetArchivedOk returns a tuple with the Archived field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetArchivedOk() (*bool, bool) { + if o == nil || IsNil(o.Archived) { + return nil, false + } + return o.Archived, true +} + +// HasArchived returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasArchived() bool { + if o != nil && !IsNil(o.Archived) { + return true + } + + return false +} + +// SetArchived gets a reference to the given bool and assigns it to the Archived field. +func (o *RepositoryConfigurationDto) SetArchived(v bool) { + o.Archived = &v +} + +// GetUnmanaged returns the Unmanaged field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetUnmanaged() bool { + if o == nil || IsNil(o.Unmanaged) { + var ret bool + return ret + } + return *o.Unmanaged +} + +// GetUnmanagedOk returns a tuple with the Unmanaged field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetUnmanagedOk() (*bool, bool) { + if o == nil || IsNil(o.Unmanaged) { + return nil, false + } + return o.Unmanaged, true +} + +// HasUnmanaged returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasUnmanaged() bool { + if o != nil && !IsNil(o.Unmanaged) { + return true + } + + return false +} + +// SetUnmanaged gets a reference to the given bool and assigns it to the Unmanaged field. +func (o *RepositoryConfigurationDto) SetUnmanaged(v bool) { + o.Unmanaged = &v +} + +// GetRefProtections returns the RefProtections field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetRefProtections() RefProtections { + if o == nil || IsNil(o.RefProtections) { + var ret RefProtections + return ret + } + return *o.RefProtections +} + +// GetRefProtectionsOk returns a tuple with the RefProtections field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetRefProtectionsOk() (*RefProtections, bool) { + if o == nil || IsNil(o.RefProtections) { + return nil, false + } + return o.RefProtections, true +} + +// HasRefProtections returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasRefProtections() bool { + if o != nil && !IsNil(o.RefProtections) { + return true + } + + return false +} + +// SetRefProtections gets a reference to the given RefProtections and assigns it to the RefProtections field. +func (o *RepositoryConfigurationDto) SetRefProtections(v RefProtections) { + o.RefProtections = &v +} + +// GetPullRequests returns the PullRequests field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetPullRequests() PullRequests { + if o == nil || IsNil(o.PullRequests) { + var ret PullRequests + return ret + } + return *o.PullRequests +} + +// GetPullRequestsOk returns a tuple with the PullRequests field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetPullRequestsOk() (*PullRequests, bool) { + if o == nil || IsNil(o.PullRequests) { + return nil, false + } + return o.PullRequests, true +} + +// HasPullRequests returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasPullRequests() bool { + if o != nil && !IsNil(o.PullRequests) { + return true + } + + return false +} + +// SetPullRequests gets a reference to the given PullRequests and assigns it to the PullRequests field. +func (o *RepositoryConfigurationDto) SetPullRequests(v PullRequests) { + o.PullRequests = &v +} + +// GetRequireIssue returns the RequireIssue field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetRequireIssue() bool { + if o == nil || IsNil(o.RequireIssue) { + var ret bool + return ret + } + return *o.RequireIssue +} + +// GetRequireIssueOk returns a tuple with the RequireIssue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetRequireIssueOk() (*bool, bool) { + if o == nil || IsNil(o.RequireIssue) { + return nil, false + } + return o.RequireIssue, true +} + +// HasRequireIssue returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasRequireIssue() bool { + if o != nil && !IsNil(o.RequireIssue) { + return true + } + + return false +} + +// SetRequireIssue gets a reference to the given bool and assigns it to the RequireIssue field. +func (o *RepositoryConfigurationDto) SetRequireIssue(v bool) { + o.RequireIssue = &v +} + +// GetRequireConditions returns the RequireConditions field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetRequireConditions() map[string]ConditionReferenceDto { + if o == nil || IsNil(o.RequireConditions) { + var ret map[string]ConditionReferenceDto + return ret + } + return o.RequireConditions +} + +// GetRequireConditionsOk returns a tuple with the RequireConditions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetRequireConditionsOk() (map[string]ConditionReferenceDto, bool) { + if o == nil || IsNil(o.RequireConditions) { + return map[string]ConditionReferenceDto{}, false + } + return o.RequireConditions, true +} + +// HasRequireConditions returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasRequireConditions() bool { + if o != nil && !IsNil(o.RequireConditions) { + return true + } + + return false +} + +// SetRequireConditions gets a reference to the given map[string]ConditionReferenceDto and assigns it to the RequireConditions field. +func (o *RepositoryConfigurationDto) SetRequireConditions(v map[string]ConditionReferenceDto) { + o.RequireConditions = v +} + +// GetActionsAccess returns the ActionsAccess field value if set, zero value otherwise. +func (o *RepositoryConfigurationDto) GetActionsAccess() string { + if o == nil || IsNil(o.ActionsAccess) { + var ret string + return ret + } + return *o.ActionsAccess +} + +// GetActionsAccessOk returns a tuple with the ActionsAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDto) GetActionsAccessOk() (*string, bool) { + if o == nil || IsNil(o.ActionsAccess) { + return nil, false + } + return o.ActionsAccess, true +} + +// HasActionsAccess returns a boolean if a field has been set. +func (o *RepositoryConfigurationDto) HasActionsAccess() bool { + if o != nil && !IsNil(o.ActionsAccess) { + return true + } + + return false +} + +// SetActionsAccess gets a reference to the given string and assigns it to the ActionsAccess field. +func (o *RepositoryConfigurationDto) SetActionsAccess(v string) { + o.ActionsAccess = &v +} + +func (o RepositoryConfigurationDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepositoryConfigurationDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AccessKeys) { + toSerialize["accessKeys"] = o.AccessKeys + } + if !IsNil(o.MergeConfig) { + toSerialize["mergeConfig"] = o.MergeConfig + } + if !IsNil(o.DefaultTasks) { + toSerialize["defaultTasks"] = o.DefaultTasks + } + if !IsNil(o.BranchNameRegex) { + toSerialize["branchNameRegex"] = o.BranchNameRegex + } + if !IsNil(o.CommitMessageRegex) { + toSerialize["commitMessageRegex"] = o.CommitMessageRegex + } + if !IsNil(o.CommitMessageType) { + toSerialize["commitMessageType"] = o.CommitMessageType + } + if !IsNil(o.RequireSuccessfulBuilds) { + toSerialize["requireSuccessfulBuilds"] = o.RequireSuccessfulBuilds + } + if !IsNil(o.RequireApprovals) { + toSerialize["requireApprovals"] = o.RequireApprovals + } + if !IsNil(o.ExcludeMergeCommits) { + toSerialize["excludeMergeCommits"] = o.ExcludeMergeCommits + } + if !IsNil(o.ExcludeMergeCheckUsers) { + toSerialize["excludeMergeCheckUsers"] = o.ExcludeMergeCheckUsers + } + if !IsNil(o.Webhooks) { + toSerialize["webhooks"] = o.Webhooks + } + if !IsNil(o.Approvers) { + toSerialize["approvers"] = o.Approvers + } + if !IsNil(o.RawApprovers) { + toSerialize["rawApprovers"] = o.RawApprovers + } + if !IsNil(o.Watchers) { + toSerialize["watchers"] = o.Watchers + } + if !IsNil(o.RawWatchers) { + toSerialize["rawWatchers"] = o.RawWatchers + } + if !IsNil(o.Archived) { + toSerialize["archived"] = o.Archived + } + if !IsNil(o.Unmanaged) { + toSerialize["unmanaged"] = o.Unmanaged + } + if !IsNil(o.RefProtections) { + toSerialize["refProtections"] = o.RefProtections + } + if !IsNil(o.PullRequests) { + toSerialize["pullRequests"] = o.PullRequests + } + if !IsNil(o.RequireIssue) { + toSerialize["requireIssue"] = o.RequireIssue + } + if !IsNil(o.RequireConditions) { + toSerialize["requireConditions"] = o.RequireConditions + } + if !IsNil(o.ActionsAccess) { + toSerialize["actionsAccess"] = o.ActionsAccess + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RepositoryConfigurationDto) UnmarshalJSON(data []byte) (err error) { + varRepositoryConfigurationDto := _RepositoryConfigurationDto{} + + err = json.Unmarshal(data, &varRepositoryConfigurationDto) + + if err != nil { + return err + } + + *o = RepositoryConfigurationDto(varRepositoryConfigurationDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "accessKeys") + delete(additionalProperties, "mergeConfig") + delete(additionalProperties, "defaultTasks") + delete(additionalProperties, "branchNameRegex") + delete(additionalProperties, "commitMessageRegex") + delete(additionalProperties, "commitMessageType") + delete(additionalProperties, "requireSuccessfulBuilds") + delete(additionalProperties, "requireApprovals") + delete(additionalProperties, "excludeMergeCommits") + delete(additionalProperties, "excludeMergeCheckUsers") + delete(additionalProperties, "webhooks") + delete(additionalProperties, "approvers") + delete(additionalProperties, "rawApprovers") + delete(additionalProperties, "watchers") + delete(additionalProperties, "rawWatchers") + delete(additionalProperties, "archived") + delete(additionalProperties, "unmanaged") + delete(additionalProperties, "refProtections") + delete(additionalProperties, "pullRequests") + delete(additionalProperties, "requireIssue") + delete(additionalProperties, "requireConditions") + delete(additionalProperties, "actionsAccess") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepositoryConfigurationDto struct { + value *RepositoryConfigurationDto + isSet bool +} + +func (v NullableRepositoryConfigurationDto) Get() *RepositoryConfigurationDto { + return v.value +} + +func (v *NullableRepositoryConfigurationDto) Set(val *RepositoryConfigurationDto) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryConfigurationDto) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryConfigurationDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryConfigurationDto(val *RepositoryConfigurationDto) *NullableRepositoryConfigurationDto { + return &NullableRepositoryConfigurationDto{value: val, isSet: true} +} + +func (v NullableRepositoryConfigurationDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryConfigurationDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_repository_configuration_dto_merge_config.go b/model_repository_configuration_dto_merge_config.go new file mode 100644 index 0000000..c1f7d8c --- /dev/null +++ b/model_repository_configuration_dto_merge_config.go @@ -0,0 +1,193 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the RepositoryConfigurationDtoMergeConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryConfigurationDtoMergeConfig{} + +// RepositoryConfigurationDtoMergeConfig struct for RepositoryConfigurationDtoMergeConfig +type RepositoryConfigurationDtoMergeConfig struct { + DefaultStrategy *MergeStrategy `json:"defaultStrategy,omitempty"` + Strategies []MergeStrategy `json:"strategies,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RepositoryConfigurationDtoMergeConfig RepositoryConfigurationDtoMergeConfig + +// NewRepositoryConfigurationDtoMergeConfig instantiates a new RepositoryConfigurationDtoMergeConfig object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryConfigurationDtoMergeConfig() *RepositoryConfigurationDtoMergeConfig { + this := RepositoryConfigurationDtoMergeConfig{} + return &this +} + +// NewRepositoryConfigurationDtoMergeConfigWithDefaults instantiates a new RepositoryConfigurationDtoMergeConfig object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryConfigurationDtoMergeConfigWithDefaults() *RepositoryConfigurationDtoMergeConfig { + this := RepositoryConfigurationDtoMergeConfig{} + return &this +} + +// GetDefaultStrategy returns the DefaultStrategy field value if set, zero value otherwise. +func (o *RepositoryConfigurationDtoMergeConfig) GetDefaultStrategy() MergeStrategy { + if o == nil || IsNil(o.DefaultStrategy) { + var ret MergeStrategy + return ret + } + return *o.DefaultStrategy +} + +// GetDefaultStrategyOk returns a tuple with the DefaultStrategy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDtoMergeConfig) GetDefaultStrategyOk() (*MergeStrategy, bool) { + if o == nil || IsNil(o.DefaultStrategy) { + return nil, false + } + return o.DefaultStrategy, true +} + +// HasDefaultStrategy returns a boolean if a field has been set. +func (o *RepositoryConfigurationDtoMergeConfig) HasDefaultStrategy() bool { + if o != nil && !IsNil(o.DefaultStrategy) { + return true + } + + return false +} + +// SetDefaultStrategy gets a reference to the given MergeStrategy and assigns it to the DefaultStrategy field. +func (o *RepositoryConfigurationDtoMergeConfig) SetDefaultStrategy(v MergeStrategy) { + o.DefaultStrategy = &v +} + +// GetStrategies returns the Strategies field value if set, zero value otherwise. +func (o *RepositoryConfigurationDtoMergeConfig) GetStrategies() []MergeStrategy { + if o == nil || IsNil(o.Strategies) { + var ret []MergeStrategy + return ret + } + return o.Strategies +} + +// GetStrategiesOk returns a tuple with the Strategies field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationDtoMergeConfig) GetStrategiesOk() ([]MergeStrategy, bool) { + if o == nil || IsNil(o.Strategies) { + return nil, false + } + return o.Strategies, true +} + +// HasStrategies returns a boolean if a field has been set. +func (o *RepositoryConfigurationDtoMergeConfig) HasStrategies() bool { + if o != nil && !IsNil(o.Strategies) { + return true + } + + return false +} + +// SetStrategies gets a reference to the given []MergeStrategy and assigns it to the Strategies field. +func (o *RepositoryConfigurationDtoMergeConfig) SetStrategies(v []MergeStrategy) { + o.Strategies = v +} + +func (o RepositoryConfigurationDtoMergeConfig) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepositoryConfigurationDtoMergeConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DefaultStrategy) { + toSerialize["defaultStrategy"] = o.DefaultStrategy + } + if !IsNil(o.Strategies) { + toSerialize["strategies"] = o.Strategies + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RepositoryConfigurationDtoMergeConfig) UnmarshalJSON(data []byte) (err error) { + varRepositoryConfigurationDtoMergeConfig := _RepositoryConfigurationDtoMergeConfig{} + + err = json.Unmarshal(data, &varRepositoryConfigurationDtoMergeConfig) + + if err != nil { + return err + } + + *o = RepositoryConfigurationDtoMergeConfig(varRepositoryConfigurationDtoMergeConfig) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "defaultStrategy") + delete(additionalProperties, "strategies") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepositoryConfigurationDtoMergeConfig struct { + value *RepositoryConfigurationDtoMergeConfig + isSet bool +} + +func (v NullableRepositoryConfigurationDtoMergeConfig) Get() *RepositoryConfigurationDtoMergeConfig { + return v.value +} + +func (v *NullableRepositoryConfigurationDtoMergeConfig) Set(val *RepositoryConfigurationDtoMergeConfig) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryConfigurationDtoMergeConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryConfigurationDtoMergeConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryConfigurationDtoMergeConfig(val *RepositoryConfigurationDtoMergeConfig) *NullableRepositoryConfigurationDtoMergeConfig { + return &NullableRepositoryConfigurationDtoMergeConfig{value: val, isSet: true} +} + +func (v NullableRepositoryConfigurationDtoMergeConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryConfigurationDtoMergeConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_repository_configuration_patch_dto.go b/model_repository_configuration_patch_dto.go new file mode 100644 index 0000000..396ac16 --- /dev/null +++ b/model_repository_configuration_patch_dto.go @@ -0,0 +1,874 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the RepositoryConfigurationPatchDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryConfigurationPatchDto{} + +// RepositoryConfigurationPatchDto Attributes to configure the repository. If a configuration exists there are also some configured defaults for the repository. +type RepositoryConfigurationPatchDto struct { + // Ssh-Keys configured on the repository. + AccessKeys []RepositoryConfigurationAccessKeyDto `json:"accessKeys,omitempty"` + MergeConfig *RepositoryConfigurationDtoMergeConfig `json:"mergeConfig,omitempty"` + DefaultTasks []RepositoryConfigurationDefaultTaskDto `json:"defaultTasks,omitempty"` + // Use an explicit branch name regex. + BranchNameRegex *string `json:"branchNameRegex,omitempty"` + // Use an explicit commit message regex. + CommitMessageRegex *string `json:"commitMessageRegex,omitempty"` + // Adds a corresponding commit message regex. + CommitMessageType *string `json:"commitMessageType,omitempty"` + // Set the required successful builds counter. + RequireSuccessfulBuilds *int32 `json:"requireSuccessfulBuilds,omitempty"` + // Set the required approvals counter. + RequireApprovals *int32 `json:"requireApprovals,omitempty"` + // Exclude merge commits from commit checks. + ExcludeMergeCommits *bool `json:"excludeMergeCommits,omitempty"` + // Exclude users from commit checks. + ExcludeMergeCheckUsers []ExcludeMergeCheckUserDto `json:"excludeMergeCheckUsers,omitempty"` + Webhooks *RepositoryConfigurationWebhooksDto `json:"webhooks,omitempty"` + // Map of string (group name e.g. some-owner) of strings (list of approvers), one approval for each group is required. + Approvers map[string][]string `json:"approvers,omitempty"` + // List of strings (list of watchers, either usernames or group identifier), which are added as reviewers but require no approval. + Watchers []string `json:"watchers,omitempty"` + // Moves the repository into the archive. + Archived *bool `json:"archived,omitempty"` + // Repository will not be configured, also not archived. + Unmanaged *bool `json:"unmanaged,omitempty"` + RefProtections *RefProtections `json:"refProtections,omitempty"` + // Configures JQL matcher with query: issuetype in (Story, Bug) AND 'Risk Level' is not EMPTY + RequireIssue *bool `json:"requireIssue,omitempty"` + // Configuration of conditional builds as map of structs (key name e.g. some-key) of target references. + RequireConditions map[string]ConditionReferenceDto `json:"requireConditions,omitempty"` + // Control how the repository is used by GitHub Actions workflows in other repositories + ActionsAccess *string `json:"actionsAccess,omitempty"` + PullRequests *PullRequests `json:"pullRequests,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RepositoryConfigurationPatchDto RepositoryConfigurationPatchDto + +// NewRepositoryConfigurationPatchDto instantiates a new RepositoryConfigurationPatchDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryConfigurationPatchDto() *RepositoryConfigurationPatchDto { + this := RepositoryConfigurationPatchDto{} + return &this +} + +// NewRepositoryConfigurationPatchDtoWithDefaults instantiates a new RepositoryConfigurationPatchDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryConfigurationPatchDtoWithDefaults() *RepositoryConfigurationPatchDto { + this := RepositoryConfigurationPatchDto{} + return &this +} + +// GetAccessKeys returns the AccessKeys field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetAccessKeys() []RepositoryConfigurationAccessKeyDto { + if o == nil || IsNil(o.AccessKeys) { + var ret []RepositoryConfigurationAccessKeyDto + return ret + } + return o.AccessKeys +} + +// GetAccessKeysOk returns a tuple with the AccessKeys field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetAccessKeysOk() ([]RepositoryConfigurationAccessKeyDto, bool) { + if o == nil || IsNil(o.AccessKeys) { + return nil, false + } + return o.AccessKeys, true +} + +// HasAccessKeys returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasAccessKeys() bool { + if o != nil && !IsNil(o.AccessKeys) { + return true + } + + return false +} + +// SetAccessKeys gets a reference to the given []RepositoryConfigurationAccessKeyDto and assigns it to the AccessKeys field. +func (o *RepositoryConfigurationPatchDto) SetAccessKeys(v []RepositoryConfigurationAccessKeyDto) { + o.AccessKeys = v +} + +// GetMergeConfig returns the MergeConfig field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetMergeConfig() RepositoryConfigurationDtoMergeConfig { + if o == nil || IsNil(o.MergeConfig) { + var ret RepositoryConfigurationDtoMergeConfig + return ret + } + return *o.MergeConfig +} + +// GetMergeConfigOk returns a tuple with the MergeConfig field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetMergeConfigOk() (*RepositoryConfigurationDtoMergeConfig, bool) { + if o == nil || IsNil(o.MergeConfig) { + return nil, false + } + return o.MergeConfig, true +} + +// HasMergeConfig returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasMergeConfig() bool { + if o != nil && !IsNil(o.MergeConfig) { + return true + } + + return false +} + +// SetMergeConfig gets a reference to the given RepositoryConfigurationDtoMergeConfig and assigns it to the MergeConfig field. +func (o *RepositoryConfigurationPatchDto) SetMergeConfig(v RepositoryConfigurationDtoMergeConfig) { + o.MergeConfig = &v +} + +// GetDefaultTasks returns the DefaultTasks field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetDefaultTasks() []RepositoryConfigurationDefaultTaskDto { + if o == nil || IsNil(o.DefaultTasks) { + var ret []RepositoryConfigurationDefaultTaskDto + return ret + } + return o.DefaultTasks +} + +// GetDefaultTasksOk returns a tuple with the DefaultTasks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetDefaultTasksOk() ([]RepositoryConfigurationDefaultTaskDto, bool) { + if o == nil || IsNil(o.DefaultTasks) { + return nil, false + } + return o.DefaultTasks, true +} + +// HasDefaultTasks returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasDefaultTasks() bool { + if o != nil && !IsNil(o.DefaultTasks) { + return true + } + + return false +} + +// SetDefaultTasks gets a reference to the given []RepositoryConfigurationDefaultTaskDto and assigns it to the DefaultTasks field. +func (o *RepositoryConfigurationPatchDto) SetDefaultTasks(v []RepositoryConfigurationDefaultTaskDto) { + o.DefaultTasks = v +} + +// GetBranchNameRegex returns the BranchNameRegex field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetBranchNameRegex() string { + if o == nil || IsNil(o.BranchNameRegex) { + var ret string + return ret + } + return *o.BranchNameRegex +} + +// GetBranchNameRegexOk returns a tuple with the BranchNameRegex field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetBranchNameRegexOk() (*string, bool) { + if o == nil || IsNil(o.BranchNameRegex) { + return nil, false + } + return o.BranchNameRegex, true +} + +// HasBranchNameRegex returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasBranchNameRegex() bool { + if o != nil && !IsNil(o.BranchNameRegex) { + return true + } + + return false +} + +// SetBranchNameRegex gets a reference to the given string and assigns it to the BranchNameRegex field. +func (o *RepositoryConfigurationPatchDto) SetBranchNameRegex(v string) { + o.BranchNameRegex = &v +} + +// GetCommitMessageRegex returns the CommitMessageRegex field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetCommitMessageRegex() string { + if o == nil || IsNil(o.CommitMessageRegex) { + var ret string + return ret + } + return *o.CommitMessageRegex +} + +// GetCommitMessageRegexOk returns a tuple with the CommitMessageRegex field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetCommitMessageRegexOk() (*string, bool) { + if o == nil || IsNil(o.CommitMessageRegex) { + return nil, false + } + return o.CommitMessageRegex, true +} + +// HasCommitMessageRegex returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasCommitMessageRegex() bool { + if o != nil && !IsNil(o.CommitMessageRegex) { + return true + } + + return false +} + +// SetCommitMessageRegex gets a reference to the given string and assigns it to the CommitMessageRegex field. +func (o *RepositoryConfigurationPatchDto) SetCommitMessageRegex(v string) { + o.CommitMessageRegex = &v +} + +// GetCommitMessageType returns the CommitMessageType field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetCommitMessageType() string { + if o == nil || IsNil(o.CommitMessageType) { + var ret string + return ret + } + return *o.CommitMessageType +} + +// GetCommitMessageTypeOk returns a tuple with the CommitMessageType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetCommitMessageTypeOk() (*string, bool) { + if o == nil || IsNil(o.CommitMessageType) { + return nil, false + } + return o.CommitMessageType, true +} + +// HasCommitMessageType returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasCommitMessageType() bool { + if o != nil && !IsNil(o.CommitMessageType) { + return true + } + + return false +} + +// SetCommitMessageType gets a reference to the given string and assigns it to the CommitMessageType field. +func (o *RepositoryConfigurationPatchDto) SetCommitMessageType(v string) { + o.CommitMessageType = &v +} + +// GetRequireSuccessfulBuilds returns the RequireSuccessfulBuilds field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetRequireSuccessfulBuilds() int32 { + if o == nil || IsNil(o.RequireSuccessfulBuilds) { + var ret int32 + return ret + } + return *o.RequireSuccessfulBuilds +} + +// GetRequireSuccessfulBuildsOk returns a tuple with the RequireSuccessfulBuilds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetRequireSuccessfulBuildsOk() (*int32, bool) { + if o == nil || IsNil(o.RequireSuccessfulBuilds) { + return nil, false + } + return o.RequireSuccessfulBuilds, true +} + +// HasRequireSuccessfulBuilds returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasRequireSuccessfulBuilds() bool { + if o != nil && !IsNil(o.RequireSuccessfulBuilds) { + return true + } + + return false +} + +// SetRequireSuccessfulBuilds gets a reference to the given int32 and assigns it to the RequireSuccessfulBuilds field. +func (o *RepositoryConfigurationPatchDto) SetRequireSuccessfulBuilds(v int32) { + o.RequireSuccessfulBuilds = &v +} + +// GetRequireApprovals returns the RequireApprovals field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetRequireApprovals() int32 { + if o == nil || IsNil(o.RequireApprovals) { + var ret int32 + return ret + } + return *o.RequireApprovals +} + +// GetRequireApprovalsOk returns a tuple with the RequireApprovals field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetRequireApprovalsOk() (*int32, bool) { + if o == nil || IsNil(o.RequireApprovals) { + return nil, false + } + return o.RequireApprovals, true +} + +// HasRequireApprovals returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasRequireApprovals() bool { + if o != nil && !IsNil(o.RequireApprovals) { + return true + } + + return false +} + +// SetRequireApprovals gets a reference to the given int32 and assigns it to the RequireApprovals field. +func (o *RepositoryConfigurationPatchDto) SetRequireApprovals(v int32) { + o.RequireApprovals = &v +} + +// GetExcludeMergeCommits returns the ExcludeMergeCommits field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetExcludeMergeCommits() bool { + if o == nil || IsNil(o.ExcludeMergeCommits) { + var ret bool + return ret + } + return *o.ExcludeMergeCommits +} + +// GetExcludeMergeCommitsOk returns a tuple with the ExcludeMergeCommits field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetExcludeMergeCommitsOk() (*bool, bool) { + if o == nil || IsNil(o.ExcludeMergeCommits) { + return nil, false + } + return o.ExcludeMergeCommits, true +} + +// HasExcludeMergeCommits returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasExcludeMergeCommits() bool { + if o != nil && !IsNil(o.ExcludeMergeCommits) { + return true + } + + return false +} + +// SetExcludeMergeCommits gets a reference to the given bool and assigns it to the ExcludeMergeCommits field. +func (o *RepositoryConfigurationPatchDto) SetExcludeMergeCommits(v bool) { + o.ExcludeMergeCommits = &v +} + +// GetExcludeMergeCheckUsers returns the ExcludeMergeCheckUsers field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetExcludeMergeCheckUsers() []ExcludeMergeCheckUserDto { + if o == nil || IsNil(o.ExcludeMergeCheckUsers) { + var ret []ExcludeMergeCheckUserDto + return ret + } + return o.ExcludeMergeCheckUsers +} + +// GetExcludeMergeCheckUsersOk returns a tuple with the ExcludeMergeCheckUsers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetExcludeMergeCheckUsersOk() ([]ExcludeMergeCheckUserDto, bool) { + if o == nil || IsNil(o.ExcludeMergeCheckUsers) { + return nil, false + } + return o.ExcludeMergeCheckUsers, true +} + +// HasExcludeMergeCheckUsers returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasExcludeMergeCheckUsers() bool { + if o != nil && !IsNil(o.ExcludeMergeCheckUsers) { + return true + } + + return false +} + +// SetExcludeMergeCheckUsers gets a reference to the given []ExcludeMergeCheckUserDto and assigns it to the ExcludeMergeCheckUsers field. +func (o *RepositoryConfigurationPatchDto) SetExcludeMergeCheckUsers(v []ExcludeMergeCheckUserDto) { + o.ExcludeMergeCheckUsers = v +} + +// GetWebhooks returns the Webhooks field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetWebhooks() RepositoryConfigurationWebhooksDto { + if o == nil || IsNil(o.Webhooks) { + var ret RepositoryConfigurationWebhooksDto + return ret + } + return *o.Webhooks +} + +// GetWebhooksOk returns a tuple with the Webhooks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetWebhooksOk() (*RepositoryConfigurationWebhooksDto, bool) { + if o == nil || IsNil(o.Webhooks) { + return nil, false + } + return o.Webhooks, true +} + +// HasWebhooks returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasWebhooks() bool { + if o != nil && !IsNil(o.Webhooks) { + return true + } + + return false +} + +// SetWebhooks gets a reference to the given RepositoryConfigurationWebhooksDto and assigns it to the Webhooks field. +func (o *RepositoryConfigurationPatchDto) SetWebhooks(v RepositoryConfigurationWebhooksDto) { + o.Webhooks = &v +} + +// GetApprovers returns the Approvers field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetApprovers() map[string][]string { + if o == nil || IsNil(o.Approvers) { + var ret map[string][]string + return ret + } + return o.Approvers +} + +// GetApproversOk returns a tuple with the Approvers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetApproversOk() (map[string][]string, bool) { + if o == nil || IsNil(o.Approvers) { + return map[string][]string{}, false + } + return o.Approvers, true +} + +// HasApprovers returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasApprovers() bool { + if o != nil && !IsNil(o.Approvers) { + return true + } + + return false +} + +// SetApprovers gets a reference to the given map[string][]string and assigns it to the Approvers field. +func (o *RepositoryConfigurationPatchDto) SetApprovers(v map[string][]string) { + o.Approvers = v +} + +// GetWatchers returns the Watchers field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetWatchers() []string { + if o == nil || IsNil(o.Watchers) { + var ret []string + return ret + } + return o.Watchers +} + +// GetWatchersOk returns a tuple with the Watchers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetWatchersOk() ([]string, bool) { + if o == nil || IsNil(o.Watchers) { + return nil, false + } + return o.Watchers, true +} + +// HasWatchers returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasWatchers() bool { + if o != nil && !IsNil(o.Watchers) { + return true + } + + return false +} + +// SetWatchers gets a reference to the given []string and assigns it to the Watchers field. +func (o *RepositoryConfigurationPatchDto) SetWatchers(v []string) { + o.Watchers = v +} + +// GetArchived returns the Archived field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetArchived() bool { + if o == nil || IsNil(o.Archived) { + var ret bool + return ret + } + return *o.Archived +} + +// GetArchivedOk returns a tuple with the Archived field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetArchivedOk() (*bool, bool) { + if o == nil || IsNil(o.Archived) { + return nil, false + } + return o.Archived, true +} + +// HasArchived returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasArchived() bool { + if o != nil && !IsNil(o.Archived) { + return true + } + + return false +} + +// SetArchived gets a reference to the given bool and assigns it to the Archived field. +func (o *RepositoryConfigurationPatchDto) SetArchived(v bool) { + o.Archived = &v +} + +// GetUnmanaged returns the Unmanaged field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetUnmanaged() bool { + if o == nil || IsNil(o.Unmanaged) { + var ret bool + return ret + } + return *o.Unmanaged +} + +// GetUnmanagedOk returns a tuple with the Unmanaged field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetUnmanagedOk() (*bool, bool) { + if o == nil || IsNil(o.Unmanaged) { + return nil, false + } + return o.Unmanaged, true +} + +// HasUnmanaged returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasUnmanaged() bool { + if o != nil && !IsNil(o.Unmanaged) { + return true + } + + return false +} + +// SetUnmanaged gets a reference to the given bool and assigns it to the Unmanaged field. +func (o *RepositoryConfigurationPatchDto) SetUnmanaged(v bool) { + o.Unmanaged = &v +} + +// GetRefProtections returns the RefProtections field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetRefProtections() RefProtections { + if o == nil || IsNil(o.RefProtections) { + var ret RefProtections + return ret + } + return *o.RefProtections +} + +// GetRefProtectionsOk returns a tuple with the RefProtections field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetRefProtectionsOk() (*RefProtections, bool) { + if o == nil || IsNil(o.RefProtections) { + return nil, false + } + return o.RefProtections, true +} + +// HasRefProtections returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasRefProtections() bool { + if o != nil && !IsNil(o.RefProtections) { + return true + } + + return false +} + +// SetRefProtections gets a reference to the given RefProtections and assigns it to the RefProtections field. +func (o *RepositoryConfigurationPatchDto) SetRefProtections(v RefProtections) { + o.RefProtections = &v +} + +// GetRequireIssue returns the RequireIssue field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetRequireIssue() bool { + if o == nil || IsNil(o.RequireIssue) { + var ret bool + return ret + } + return *o.RequireIssue +} + +// GetRequireIssueOk returns a tuple with the RequireIssue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetRequireIssueOk() (*bool, bool) { + if o == nil || IsNil(o.RequireIssue) { + return nil, false + } + return o.RequireIssue, true +} + +// HasRequireIssue returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasRequireIssue() bool { + if o != nil && !IsNil(o.RequireIssue) { + return true + } + + return false +} + +// SetRequireIssue gets a reference to the given bool and assigns it to the RequireIssue field. +func (o *RepositoryConfigurationPatchDto) SetRequireIssue(v bool) { + o.RequireIssue = &v +} + +// GetRequireConditions returns the RequireConditions field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetRequireConditions() map[string]ConditionReferenceDto { + if o == nil || IsNil(o.RequireConditions) { + var ret map[string]ConditionReferenceDto + return ret + } + return o.RequireConditions +} + +// GetRequireConditionsOk returns a tuple with the RequireConditions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetRequireConditionsOk() (map[string]ConditionReferenceDto, bool) { + if o == nil || IsNil(o.RequireConditions) { + return map[string]ConditionReferenceDto{}, false + } + return o.RequireConditions, true +} + +// HasRequireConditions returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasRequireConditions() bool { + if o != nil && !IsNil(o.RequireConditions) { + return true + } + + return false +} + +// SetRequireConditions gets a reference to the given map[string]ConditionReferenceDto and assigns it to the RequireConditions field. +func (o *RepositoryConfigurationPatchDto) SetRequireConditions(v map[string]ConditionReferenceDto) { + o.RequireConditions = v +} + +// GetActionsAccess returns the ActionsAccess field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetActionsAccess() string { + if o == nil || IsNil(o.ActionsAccess) { + var ret string + return ret + } + return *o.ActionsAccess +} + +// GetActionsAccessOk returns a tuple with the ActionsAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetActionsAccessOk() (*string, bool) { + if o == nil || IsNil(o.ActionsAccess) { + return nil, false + } + return o.ActionsAccess, true +} + +// HasActionsAccess returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasActionsAccess() bool { + if o != nil && !IsNil(o.ActionsAccess) { + return true + } + + return false +} + +// SetActionsAccess gets a reference to the given string and assigns it to the ActionsAccess field. +func (o *RepositoryConfigurationPatchDto) SetActionsAccess(v string) { + o.ActionsAccess = &v +} + +// GetPullRequests returns the PullRequests field value if set, zero value otherwise. +func (o *RepositoryConfigurationPatchDto) GetPullRequests() PullRequests { + if o == nil || IsNil(o.PullRequests) { + var ret PullRequests + return ret + } + return *o.PullRequests +} + +// GetPullRequestsOk returns a tuple with the PullRequests field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationPatchDto) GetPullRequestsOk() (*PullRequests, bool) { + if o == nil || IsNil(o.PullRequests) { + return nil, false + } + return o.PullRequests, true +} + +// HasPullRequests returns a boolean if a field has been set. +func (o *RepositoryConfigurationPatchDto) HasPullRequests() bool { + if o != nil && !IsNil(o.PullRequests) { + return true + } + + return false +} + +// SetPullRequests gets a reference to the given PullRequests and assigns it to the PullRequests field. +func (o *RepositoryConfigurationPatchDto) SetPullRequests(v PullRequests) { + o.PullRequests = &v +} + +func (o RepositoryConfigurationPatchDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepositoryConfigurationPatchDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AccessKeys) { + toSerialize["accessKeys"] = o.AccessKeys + } + if !IsNil(o.MergeConfig) { + toSerialize["mergeConfig"] = o.MergeConfig + } + if !IsNil(o.DefaultTasks) { + toSerialize["defaultTasks"] = o.DefaultTasks + } + if !IsNil(o.BranchNameRegex) { + toSerialize["branchNameRegex"] = o.BranchNameRegex + } + if !IsNil(o.CommitMessageRegex) { + toSerialize["commitMessageRegex"] = o.CommitMessageRegex + } + if !IsNil(o.CommitMessageType) { + toSerialize["commitMessageType"] = o.CommitMessageType + } + if !IsNil(o.RequireSuccessfulBuilds) { + toSerialize["requireSuccessfulBuilds"] = o.RequireSuccessfulBuilds + } + if !IsNil(o.RequireApprovals) { + toSerialize["requireApprovals"] = o.RequireApprovals + } + if !IsNil(o.ExcludeMergeCommits) { + toSerialize["excludeMergeCommits"] = o.ExcludeMergeCommits + } + if !IsNil(o.ExcludeMergeCheckUsers) { + toSerialize["excludeMergeCheckUsers"] = o.ExcludeMergeCheckUsers + } + if !IsNil(o.Webhooks) { + toSerialize["webhooks"] = o.Webhooks + } + if !IsNil(o.Approvers) { + toSerialize["approvers"] = o.Approvers + } + if !IsNil(o.Watchers) { + toSerialize["watchers"] = o.Watchers + } + if !IsNil(o.Archived) { + toSerialize["archived"] = o.Archived + } + if !IsNil(o.Unmanaged) { + toSerialize["unmanaged"] = o.Unmanaged + } + if !IsNil(o.RefProtections) { + toSerialize["refProtections"] = o.RefProtections + } + if !IsNil(o.RequireIssue) { + toSerialize["requireIssue"] = o.RequireIssue + } + if !IsNil(o.RequireConditions) { + toSerialize["requireConditions"] = o.RequireConditions + } + if !IsNil(o.ActionsAccess) { + toSerialize["actionsAccess"] = o.ActionsAccess + } + if !IsNil(o.PullRequests) { + toSerialize["pullRequests"] = o.PullRequests + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RepositoryConfigurationPatchDto) UnmarshalJSON(data []byte) (err error) { + varRepositoryConfigurationPatchDto := _RepositoryConfigurationPatchDto{} + + err = json.Unmarshal(data, &varRepositoryConfigurationPatchDto) + + if err != nil { + return err + } + + *o = RepositoryConfigurationPatchDto(varRepositoryConfigurationPatchDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "accessKeys") + delete(additionalProperties, "mergeConfig") + delete(additionalProperties, "defaultTasks") + delete(additionalProperties, "branchNameRegex") + delete(additionalProperties, "commitMessageRegex") + delete(additionalProperties, "commitMessageType") + delete(additionalProperties, "requireSuccessfulBuilds") + delete(additionalProperties, "requireApprovals") + delete(additionalProperties, "excludeMergeCommits") + delete(additionalProperties, "excludeMergeCheckUsers") + delete(additionalProperties, "webhooks") + delete(additionalProperties, "approvers") + delete(additionalProperties, "watchers") + delete(additionalProperties, "archived") + delete(additionalProperties, "unmanaged") + delete(additionalProperties, "refProtections") + delete(additionalProperties, "requireIssue") + delete(additionalProperties, "requireConditions") + delete(additionalProperties, "actionsAccess") + delete(additionalProperties, "pullRequests") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepositoryConfigurationPatchDto struct { + value *RepositoryConfigurationPatchDto + isSet bool +} + +func (v NullableRepositoryConfigurationPatchDto) Get() *RepositoryConfigurationPatchDto { + return v.value +} + +func (v *NullableRepositoryConfigurationPatchDto) Set(val *RepositoryConfigurationPatchDto) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryConfigurationPatchDto) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryConfigurationPatchDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryConfigurationPatchDto(val *RepositoryConfigurationPatchDto) *NullableRepositoryConfigurationPatchDto { + return &NullableRepositoryConfigurationPatchDto{value: val, isSet: true} +} + +func (v NullableRepositoryConfigurationPatchDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryConfigurationPatchDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_repository_configuration_webhook_dto.go b/model_repository_configuration_webhook_dto.go new file mode 100644 index 0000000..5d7ffa6 --- /dev/null +++ b/model_repository_configuration_webhook_dto.go @@ -0,0 +1,273 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the RepositoryConfigurationWebhookDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryConfigurationWebhookDto{} + +// RepositoryConfigurationWebhookDto struct for RepositoryConfigurationWebhookDto +type RepositoryConfigurationWebhookDto struct { + Name string `json:"name"` + Url string `json:"url"` + // Events the webhook should be triggered with. + Events []string `json:"events,omitempty"` + Configuration map[string]string `json:"configuration,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RepositoryConfigurationWebhookDto RepositoryConfigurationWebhookDto + +// NewRepositoryConfigurationWebhookDto instantiates a new RepositoryConfigurationWebhookDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryConfigurationWebhookDto(name string, url string) *RepositoryConfigurationWebhookDto { + this := RepositoryConfigurationWebhookDto{} + this.Name = name + this.Url = url + return &this +} + +// NewRepositoryConfigurationWebhookDtoWithDefaults instantiates a new RepositoryConfigurationWebhookDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryConfigurationWebhookDtoWithDefaults() *RepositoryConfigurationWebhookDto { + this := RepositoryConfigurationWebhookDto{} + return &this +} + +// GetName returns the Name field value +func (o *RepositoryConfigurationWebhookDto) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationWebhookDto) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RepositoryConfigurationWebhookDto) SetName(v string) { + o.Name = v +} + +// GetUrl returns the Url field value +func (o *RepositoryConfigurationWebhookDto) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationWebhookDto) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *RepositoryConfigurationWebhookDto) SetUrl(v string) { + o.Url = v +} + +// GetEvents returns the Events field value if set, zero value otherwise. +func (o *RepositoryConfigurationWebhookDto) GetEvents() []string { + if o == nil || IsNil(o.Events) { + var ret []string + return ret + } + return o.Events +} + +// GetEventsOk returns a tuple with the Events field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationWebhookDto) GetEventsOk() ([]string, bool) { + if o == nil || IsNil(o.Events) { + return nil, false + } + return o.Events, true +} + +// HasEvents returns a boolean if a field has been set. +func (o *RepositoryConfigurationWebhookDto) HasEvents() bool { + if o != nil && !IsNil(o.Events) { + return true + } + + return false +} + +// SetEvents gets a reference to the given []string and assigns it to the Events field. +func (o *RepositoryConfigurationWebhookDto) SetEvents(v []string) { + o.Events = v +} + +// GetConfiguration returns the Configuration field value if set, zero value otherwise. +func (o *RepositoryConfigurationWebhookDto) GetConfiguration() map[string]string { + if o == nil || IsNil(o.Configuration) { + var ret map[string]string + return ret + } + return o.Configuration +} + +// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationWebhookDto) GetConfigurationOk() (map[string]string, bool) { + if o == nil || IsNil(o.Configuration) { + return map[string]string{}, false + } + return o.Configuration, true +} + +// HasConfiguration returns a boolean if a field has been set. +func (o *RepositoryConfigurationWebhookDto) HasConfiguration() bool { + if o != nil && !IsNil(o.Configuration) { + return true + } + + return false +} + +// SetConfiguration gets a reference to the given map[string]string and assigns it to the Configuration field. +func (o *RepositoryConfigurationWebhookDto) SetConfiguration(v map[string]string) { + o.Configuration = v +} + +func (o RepositoryConfigurationWebhookDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepositoryConfigurationWebhookDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["url"] = o.Url + if !IsNil(o.Events) { + toSerialize["events"] = o.Events + } + if !IsNil(o.Configuration) { + toSerialize["configuration"] = o.Configuration + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RepositoryConfigurationWebhookDto) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "url", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRepositoryConfigurationWebhookDto := _RepositoryConfigurationWebhookDto{} + + err = json.Unmarshal(data, &varRepositoryConfigurationWebhookDto) + + if err != nil { + return err + } + + *o = RepositoryConfigurationWebhookDto(varRepositoryConfigurationWebhookDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "url") + delete(additionalProperties, "events") + delete(additionalProperties, "configuration") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepositoryConfigurationWebhookDto struct { + value *RepositoryConfigurationWebhookDto + isSet bool +} + +func (v NullableRepositoryConfigurationWebhookDto) Get() *RepositoryConfigurationWebhookDto { + return v.value +} + +func (v *NullableRepositoryConfigurationWebhookDto) Set(val *RepositoryConfigurationWebhookDto) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryConfigurationWebhookDto) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryConfigurationWebhookDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryConfigurationWebhookDto(val *RepositoryConfigurationWebhookDto) *NullableRepositoryConfigurationWebhookDto { + return &NullableRepositoryConfigurationWebhookDto{value: val, isSet: true} +} + +func (v NullableRepositoryConfigurationWebhookDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryConfigurationWebhookDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_repository_configuration_webhooks_dto.go b/model_repository_configuration_webhooks_dto.go new file mode 100644 index 0000000..056c8a2 --- /dev/null +++ b/model_repository_configuration_webhooks_dto.go @@ -0,0 +1,195 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the RepositoryConfigurationWebhooksDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryConfigurationWebhooksDto{} + +// RepositoryConfigurationWebhooksDto Webhooks configured to the repository. +type RepositoryConfigurationWebhooksDto struct { + // List of predefined webhooks + Predefined []string `json:"predefined,omitempty"` + // Additional webhooks to be configured. + Additional []RepositoryConfigurationWebhookDto `json:"additional,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RepositoryConfigurationWebhooksDto RepositoryConfigurationWebhooksDto + +// NewRepositoryConfigurationWebhooksDto instantiates a new RepositoryConfigurationWebhooksDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryConfigurationWebhooksDto() *RepositoryConfigurationWebhooksDto { + this := RepositoryConfigurationWebhooksDto{} + return &this +} + +// NewRepositoryConfigurationWebhooksDtoWithDefaults instantiates a new RepositoryConfigurationWebhooksDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryConfigurationWebhooksDtoWithDefaults() *RepositoryConfigurationWebhooksDto { + this := RepositoryConfigurationWebhooksDto{} + return &this +} + +// GetPredefined returns the Predefined field value if set, zero value otherwise. +func (o *RepositoryConfigurationWebhooksDto) GetPredefined() []string { + if o == nil || IsNil(o.Predefined) { + var ret []string + return ret + } + return o.Predefined +} + +// GetPredefinedOk returns a tuple with the Predefined field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationWebhooksDto) GetPredefinedOk() ([]string, bool) { + if o == nil || IsNil(o.Predefined) { + return nil, false + } + return o.Predefined, true +} + +// HasPredefined returns a boolean if a field has been set. +func (o *RepositoryConfigurationWebhooksDto) HasPredefined() bool { + if o != nil && !IsNil(o.Predefined) { + return true + } + + return false +} + +// SetPredefined gets a reference to the given []string and assigns it to the Predefined field. +func (o *RepositoryConfigurationWebhooksDto) SetPredefined(v []string) { + o.Predefined = v +} + +// GetAdditional returns the Additional field value if set, zero value otherwise. +func (o *RepositoryConfigurationWebhooksDto) GetAdditional() []RepositoryConfigurationWebhookDto { + if o == nil || IsNil(o.Additional) { + var ret []RepositoryConfigurationWebhookDto + return ret + } + return o.Additional +} + +// GetAdditionalOk returns a tuple with the Additional field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryConfigurationWebhooksDto) GetAdditionalOk() ([]RepositoryConfigurationWebhookDto, bool) { + if o == nil || IsNil(o.Additional) { + return nil, false + } + return o.Additional, true +} + +// HasAdditional returns a boolean if a field has been set. +func (o *RepositoryConfigurationWebhooksDto) HasAdditional() bool { + if o != nil && !IsNil(o.Additional) { + return true + } + + return false +} + +// SetAdditional gets a reference to the given []RepositoryConfigurationWebhookDto and assigns it to the Additional field. +func (o *RepositoryConfigurationWebhooksDto) SetAdditional(v []RepositoryConfigurationWebhookDto) { + o.Additional = v +} + +func (o RepositoryConfigurationWebhooksDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepositoryConfigurationWebhooksDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Predefined) { + toSerialize["predefined"] = o.Predefined + } + if !IsNil(o.Additional) { + toSerialize["additional"] = o.Additional + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RepositoryConfigurationWebhooksDto) UnmarshalJSON(data []byte) (err error) { + varRepositoryConfigurationWebhooksDto := _RepositoryConfigurationWebhooksDto{} + + err = json.Unmarshal(data, &varRepositoryConfigurationWebhooksDto) + + if err != nil { + return err + } + + *o = RepositoryConfigurationWebhooksDto(varRepositoryConfigurationWebhooksDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "predefined") + delete(additionalProperties, "additional") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepositoryConfigurationWebhooksDto struct { + value *RepositoryConfigurationWebhooksDto + isSet bool +} + +func (v NullableRepositoryConfigurationWebhooksDto) Get() *RepositoryConfigurationWebhooksDto { + return v.value +} + +func (v *NullableRepositoryConfigurationWebhooksDto) Set(val *RepositoryConfigurationWebhooksDto) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryConfigurationWebhooksDto) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryConfigurationWebhooksDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryConfigurationWebhooksDto(val *RepositoryConfigurationWebhooksDto) *NullableRepositoryConfigurationWebhooksDto { + return &NullableRepositoryConfigurationWebhooksDto{value: val, isSet: true} +} + +func (v NullableRepositoryConfigurationWebhooksDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryConfigurationWebhooksDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_repository_create_dto.go b/model_repository_create_dto.go new file mode 100644 index 0000000..30b7113 --- /dev/null +++ b/model_repository_create_dto.go @@ -0,0 +1,371 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the RepositoryCreateDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryCreateDto{} + +// RepositoryCreateDto struct for RepositoryCreateDto +type RepositoryCreateDto struct { + // The alias of the repository owner + Owner string `json:"owner"` + Url string `json:"url"` + Mainline string `json:"mainline"` + // the generator used for the initial contents of this repository + Generator *string `json:"generator,omitempty"` + Configuration *RepositoryConfigurationDto `json:"configuration,omitempty"` + // The jira issue to use for committing a change, or the last jira issue used. + JiraIssue string `json:"jiraIssue"` + // A map of arbitrary string labels attached to this repository. + Labels map[string]string `json:"labels,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RepositoryCreateDto RepositoryCreateDto + +// NewRepositoryCreateDto instantiates a new RepositoryCreateDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryCreateDto(owner string, url string, mainline string, jiraIssue string) *RepositoryCreateDto { + this := RepositoryCreateDto{} + this.Owner = owner + this.Url = url + this.Mainline = mainline + this.JiraIssue = jiraIssue + return &this +} + +// NewRepositoryCreateDtoWithDefaults instantiates a new RepositoryCreateDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryCreateDtoWithDefaults() *RepositoryCreateDto { + this := RepositoryCreateDto{} + return &this +} + +// GetOwner returns the Owner field value +func (o *RepositoryCreateDto) GetOwner() string { + if o == nil { + var ret string + return ret + } + + return o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value +// and a boolean to check if the value has been set. +func (o *RepositoryCreateDto) GetOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Owner, true +} + +// SetOwner sets field value +func (o *RepositoryCreateDto) SetOwner(v string) { + o.Owner = v +} + +// GetUrl returns the Url field value +func (o *RepositoryCreateDto) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *RepositoryCreateDto) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *RepositoryCreateDto) SetUrl(v string) { + o.Url = v +} + +// GetMainline returns the Mainline field value +func (o *RepositoryCreateDto) GetMainline() string { + if o == nil { + var ret string + return ret + } + + return o.Mainline +} + +// GetMainlineOk returns a tuple with the Mainline field value +// and a boolean to check if the value has been set. +func (o *RepositoryCreateDto) GetMainlineOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Mainline, true +} + +// SetMainline sets field value +func (o *RepositoryCreateDto) SetMainline(v string) { + o.Mainline = v +} + +// GetGenerator returns the Generator field value if set, zero value otherwise. +func (o *RepositoryCreateDto) GetGenerator() string { + if o == nil || IsNil(o.Generator) { + var ret string + return ret + } + return *o.Generator +} + +// GetGeneratorOk returns a tuple with the Generator field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryCreateDto) GetGeneratorOk() (*string, bool) { + if o == nil || IsNil(o.Generator) { + return nil, false + } + return o.Generator, true +} + +// HasGenerator returns a boolean if a field has been set. +func (o *RepositoryCreateDto) HasGenerator() bool { + if o != nil && !IsNil(o.Generator) { + return true + } + + return false +} + +// SetGenerator gets a reference to the given string and assigns it to the Generator field. +func (o *RepositoryCreateDto) SetGenerator(v string) { + o.Generator = &v +} + +// GetConfiguration returns the Configuration field value if set, zero value otherwise. +func (o *RepositoryCreateDto) GetConfiguration() RepositoryConfigurationDto { + if o == nil || IsNil(o.Configuration) { + var ret RepositoryConfigurationDto + return ret + } + return *o.Configuration +} + +// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryCreateDto) GetConfigurationOk() (*RepositoryConfigurationDto, bool) { + if o == nil || IsNil(o.Configuration) { + return nil, false + } + return o.Configuration, true +} + +// HasConfiguration returns a boolean if a field has been set. +func (o *RepositoryCreateDto) HasConfiguration() bool { + if o != nil && !IsNil(o.Configuration) { + return true + } + + return false +} + +// SetConfiguration gets a reference to the given RepositoryConfigurationDto and assigns it to the Configuration field. +func (o *RepositoryCreateDto) SetConfiguration(v RepositoryConfigurationDto) { + o.Configuration = &v +} + +// GetJiraIssue returns the JiraIssue field value +func (o *RepositoryCreateDto) GetJiraIssue() string { + if o == nil { + var ret string + return ret + } + + return o.JiraIssue +} + +// GetJiraIssueOk returns a tuple with the JiraIssue field value +// and a boolean to check if the value has been set. +func (o *RepositoryCreateDto) GetJiraIssueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraIssue, true +} + +// SetJiraIssue sets field value +func (o *RepositoryCreateDto) SetJiraIssue(v string) { + o.JiraIssue = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *RepositoryCreateDto) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryCreateDto) GetLabelsOk() (map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return map[string]string{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *RepositoryCreateDto) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *RepositoryCreateDto) SetLabels(v map[string]string) { + o.Labels = v +} + +func (o RepositoryCreateDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepositoryCreateDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["owner"] = o.Owner + toSerialize["url"] = o.Url + toSerialize["mainline"] = o.Mainline + if !IsNil(o.Generator) { + toSerialize["generator"] = o.Generator + } + if !IsNil(o.Configuration) { + toSerialize["configuration"] = o.Configuration + } + toSerialize["jiraIssue"] = o.JiraIssue + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RepositoryCreateDto) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "owner", + "url", + "mainline", + "jiraIssue", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRepositoryCreateDto := _RepositoryCreateDto{} + + err = json.Unmarshal(data, &varRepositoryCreateDto) + + if err != nil { + return err + } + + *o = RepositoryCreateDto(varRepositoryCreateDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "owner") + delete(additionalProperties, "url") + delete(additionalProperties, "mainline") + delete(additionalProperties, "generator") + delete(additionalProperties, "configuration") + delete(additionalProperties, "jiraIssue") + delete(additionalProperties, "labels") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepositoryCreateDto struct { + value *RepositoryCreateDto + isSet bool +} + +func (v NullableRepositoryCreateDto) Get() *RepositoryCreateDto { + return v.value +} + +func (v *NullableRepositoryCreateDto) Set(val *RepositoryCreateDto) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryCreateDto) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryCreateDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryCreateDto(val *RepositoryCreateDto) *NullableRepositoryCreateDto { + return &NullableRepositoryCreateDto{value: val, isSet: true} +} + +func (v NullableRepositoryCreateDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryCreateDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_repository_dto.go b/model_repository_dto.go new file mode 100644 index 0000000..c4497a9 --- /dev/null +++ b/model_repository_dto.go @@ -0,0 +1,506 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the RepositoryDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryDto{} + +// RepositoryDto struct for RepositoryDto +type RepositoryDto struct { + // The type of the repository as determined by its key. + Type *string `json:"type,omitempty"` + // The alias of the repository owner + Owner string `json:"owner"` + Description *string `json:"description,omitempty"` + Url string `json:"url"` + Mainline string `json:"mainline"` + // the generator used for the initial contents of this repository + Generator *string `json:"generator,omitempty"` + Configuration *RepositoryConfigurationDto `json:"configuration,omitempty"` + // ISO-8601 UTC date time at which this information was originally committed. When sending an update, include the original timestamp you got so we can detect concurrent updates. + TimeStamp string `json:"timeStamp"` + // The git commit hash this information was originally committed under. When sending an update, include the original commitHash you got so we can detect concurrent updates. + CommitHash string `json:"commitHash"` + // The jira issue to use for committing a change, or the last jira issue used. + JiraIssue string `json:"jiraIssue"` + // A map of arbitrary string labels attached to this repository. + Labels map[string]string `json:"labels,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RepositoryDto RepositoryDto + +// NewRepositoryDto instantiates a new RepositoryDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryDto(owner string, url string, mainline string, timeStamp string, commitHash string, jiraIssue string) *RepositoryDto { + this := RepositoryDto{} + this.Owner = owner + this.Url = url + this.Mainline = mainline + this.TimeStamp = timeStamp + this.CommitHash = commitHash + this.JiraIssue = jiraIssue + return &this +} + +// NewRepositoryDtoWithDefaults instantiates a new RepositoryDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryDtoWithDefaults() *RepositoryDto { + this := RepositoryDto{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *RepositoryDto) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryDto) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *RepositoryDto) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *RepositoryDto) SetType(v string) { + o.Type = &v +} + +// GetOwner returns the Owner field value +func (o *RepositoryDto) GetOwner() string { + if o == nil { + var ret string + return ret + } + + return o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value +// and a boolean to check if the value has been set. +func (o *RepositoryDto) GetOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Owner, true +} + +// SetOwner sets field value +func (o *RepositoryDto) SetOwner(v string) { + o.Owner = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *RepositoryDto) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryDto) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *RepositoryDto) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *RepositoryDto) SetDescription(v string) { + o.Description = &v +} + +// GetUrl returns the Url field value +func (o *RepositoryDto) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *RepositoryDto) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *RepositoryDto) SetUrl(v string) { + o.Url = v +} + +// GetMainline returns the Mainline field value +func (o *RepositoryDto) GetMainline() string { + if o == nil { + var ret string + return ret + } + + return o.Mainline +} + +// GetMainlineOk returns a tuple with the Mainline field value +// and a boolean to check if the value has been set. +func (o *RepositoryDto) GetMainlineOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Mainline, true +} + +// SetMainline sets field value +func (o *RepositoryDto) SetMainline(v string) { + o.Mainline = v +} + +// GetGenerator returns the Generator field value if set, zero value otherwise. +func (o *RepositoryDto) GetGenerator() string { + if o == nil || IsNil(o.Generator) { + var ret string + return ret + } + return *o.Generator +} + +// GetGeneratorOk returns a tuple with the Generator field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryDto) GetGeneratorOk() (*string, bool) { + if o == nil || IsNil(o.Generator) { + return nil, false + } + return o.Generator, true +} + +// HasGenerator returns a boolean if a field has been set. +func (o *RepositoryDto) HasGenerator() bool { + if o != nil && !IsNil(o.Generator) { + return true + } + + return false +} + +// SetGenerator gets a reference to the given string and assigns it to the Generator field. +func (o *RepositoryDto) SetGenerator(v string) { + o.Generator = &v +} + +// GetConfiguration returns the Configuration field value if set, zero value otherwise. +func (o *RepositoryDto) GetConfiguration() RepositoryConfigurationDto { + if o == nil || IsNil(o.Configuration) { + var ret RepositoryConfigurationDto + return ret + } + return *o.Configuration +} + +// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryDto) GetConfigurationOk() (*RepositoryConfigurationDto, bool) { + if o == nil || IsNil(o.Configuration) { + return nil, false + } + return o.Configuration, true +} + +// HasConfiguration returns a boolean if a field has been set. +func (o *RepositoryDto) HasConfiguration() bool { + if o != nil && !IsNil(o.Configuration) { + return true + } + + return false +} + +// SetConfiguration gets a reference to the given RepositoryConfigurationDto and assigns it to the Configuration field. +func (o *RepositoryDto) SetConfiguration(v RepositoryConfigurationDto) { + o.Configuration = &v +} + +// GetTimeStamp returns the TimeStamp field value +func (o *RepositoryDto) GetTimeStamp() string { + if o == nil { + var ret string + return ret + } + + return o.TimeStamp +} + +// GetTimeStampOk returns a tuple with the TimeStamp field value +// and a boolean to check if the value has been set. +func (o *RepositoryDto) GetTimeStampOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TimeStamp, true +} + +// SetTimeStamp sets field value +func (o *RepositoryDto) SetTimeStamp(v string) { + o.TimeStamp = v +} + +// GetCommitHash returns the CommitHash field value +func (o *RepositoryDto) GetCommitHash() string { + if o == nil { + var ret string + return ret + } + + return o.CommitHash +} + +// GetCommitHashOk returns a tuple with the CommitHash field value +// and a boolean to check if the value has been set. +func (o *RepositoryDto) GetCommitHashOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CommitHash, true +} + +// SetCommitHash sets field value +func (o *RepositoryDto) SetCommitHash(v string) { + o.CommitHash = v +} + +// GetJiraIssue returns the JiraIssue field value +func (o *RepositoryDto) GetJiraIssue() string { + if o == nil { + var ret string + return ret + } + + return o.JiraIssue +} + +// GetJiraIssueOk returns a tuple with the JiraIssue field value +// and a boolean to check if the value has been set. +func (o *RepositoryDto) GetJiraIssueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraIssue, true +} + +// SetJiraIssue sets field value +func (o *RepositoryDto) SetJiraIssue(v string) { + o.JiraIssue = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *RepositoryDto) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryDto) GetLabelsOk() (map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return map[string]string{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *RepositoryDto) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *RepositoryDto) SetLabels(v map[string]string) { + o.Labels = v +} + +func (o RepositoryDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepositoryDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["owner"] = o.Owner + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["url"] = o.Url + toSerialize["mainline"] = o.Mainline + if !IsNil(o.Generator) { + toSerialize["generator"] = o.Generator + } + if !IsNil(o.Configuration) { + toSerialize["configuration"] = o.Configuration + } + toSerialize["timeStamp"] = o.TimeStamp + toSerialize["commitHash"] = o.CommitHash + toSerialize["jiraIssue"] = o.JiraIssue + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RepositoryDto) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "owner", + "url", + "mainline", + "timeStamp", + "commitHash", + "jiraIssue", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRepositoryDto := _RepositoryDto{} + + err = json.Unmarshal(data, &varRepositoryDto) + + if err != nil { + return err + } + + *o = RepositoryDto(varRepositoryDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "owner") + delete(additionalProperties, "description") + delete(additionalProperties, "url") + delete(additionalProperties, "mainline") + delete(additionalProperties, "generator") + delete(additionalProperties, "configuration") + delete(additionalProperties, "timeStamp") + delete(additionalProperties, "commitHash") + delete(additionalProperties, "jiraIssue") + delete(additionalProperties, "labels") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepositoryDto struct { + value *RepositoryDto + isSet bool +} + +func (v NullableRepositoryDto) Get() *RepositoryDto { + return v.value +} + +func (v *NullableRepositoryDto) Set(val *RepositoryDto) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryDto) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryDto(val *RepositoryDto) *NullableRepositoryDto { + return &NullableRepositoryDto{value: val, isSet: true} +} + +func (v NullableRepositoryDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_repository_list_dto.go b/model_repository_list_dto.go new file mode 100644 index 0000000..425e3be --- /dev/null +++ b/model_repository_list_dto.go @@ -0,0 +1,199 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the RepositoryListDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryListDto{} + +// RepositoryListDto struct for RepositoryListDto +type RepositoryListDto struct { + Repositories map[string]RepositoryDto `json:"repositories"` + // ISO-8601 UTC date time at which the list of repositories was obtained from service-metadata + TimeStamp string `json:"timeStamp"` + AdditionalProperties map[string]interface{} +} + +type _RepositoryListDto RepositoryListDto + +// NewRepositoryListDto instantiates a new RepositoryListDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryListDto(repositories map[string]RepositoryDto, timeStamp string) *RepositoryListDto { + this := RepositoryListDto{} + this.Repositories = repositories + this.TimeStamp = timeStamp + return &this +} + +// NewRepositoryListDtoWithDefaults instantiates a new RepositoryListDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryListDtoWithDefaults() *RepositoryListDto { + this := RepositoryListDto{} + return &this +} + +// GetRepositories returns the Repositories field value +func (o *RepositoryListDto) GetRepositories() map[string]RepositoryDto { + if o == nil { + var ret map[string]RepositoryDto + return ret + } + + return o.Repositories +} + +// GetRepositoriesOk returns a tuple with the Repositories field value +// and a boolean to check if the value has been set. +func (o *RepositoryListDto) GetRepositoriesOk() (map[string]RepositoryDto, bool) { + if o == nil { + return map[string]RepositoryDto{}, false + } + return o.Repositories, true +} + +// SetRepositories sets field value +func (o *RepositoryListDto) SetRepositories(v map[string]RepositoryDto) { + o.Repositories = v +} + +// GetTimeStamp returns the TimeStamp field value +func (o *RepositoryListDto) GetTimeStamp() string { + if o == nil { + var ret string + return ret + } + + return o.TimeStamp +} + +// GetTimeStampOk returns a tuple with the TimeStamp field value +// and a boolean to check if the value has been set. +func (o *RepositoryListDto) GetTimeStampOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TimeStamp, true +} + +// SetTimeStamp sets field value +func (o *RepositoryListDto) SetTimeStamp(v string) { + o.TimeStamp = v +} + +func (o RepositoryListDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepositoryListDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["repositories"] = o.Repositories + toSerialize["timeStamp"] = o.TimeStamp + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RepositoryListDto) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "repositories", + "timeStamp", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRepositoryListDto := _RepositoryListDto{} + + err = json.Unmarshal(data, &varRepositoryListDto) + + if err != nil { + return err + } + + *o = RepositoryListDto(varRepositoryListDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "repositories") + delete(additionalProperties, "timeStamp") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepositoryListDto struct { + value *RepositoryListDto + isSet bool +} + +func (v NullableRepositoryListDto) Get() *RepositoryListDto { + return v.value +} + +func (v *NullableRepositoryListDto) Set(val *RepositoryListDto) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryListDto) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryListDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryListDto(val *RepositoryListDto) *NullableRepositoryListDto { + return &NullableRepositoryListDto{value: val, isSet: true} +} + +func (v NullableRepositoryListDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryListDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_repository_patch_dto.go b/model_repository_patch_dto.go new file mode 100644 index 0000000..99621d5 --- /dev/null +++ b/model_repository_patch_dto.go @@ -0,0 +1,455 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the RepositoryPatchDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryPatchDto{} + +// RepositoryPatchDto struct for RepositoryPatchDto +type RepositoryPatchDto struct { + // The alias of the repository owner + Owner *string `json:"owner,omitempty"` + Url *string `json:"url,omitempty"` + Mainline *string `json:"mainline,omitempty"` + // the generator used for the initial contents of this repository + Generator *string `json:"generator,omitempty"` + Configuration *RepositoryConfigurationPatchDto `json:"configuration,omitempty"` + // ISO-8601 UTC date time at which this information was originally committed. When sending an update, include the original timestamp you got so we can detect concurrent updates. + TimeStamp string `json:"timeStamp"` + // The git commit hash this information was originally committed under. When sending an update, include the original commitHash you got so we can detect concurrent updates. + CommitHash string `json:"commitHash"` + // The jira issue to use for committing a change, or the last jira issue used. + JiraIssue string `json:"jiraIssue"` + // A map of arbitrary string labels attached to this repository. + Labels map[string]string `json:"labels,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _RepositoryPatchDto RepositoryPatchDto + +// NewRepositoryPatchDto instantiates a new RepositoryPatchDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRepositoryPatchDto(timeStamp string, commitHash string, jiraIssue string) *RepositoryPatchDto { + this := RepositoryPatchDto{} + this.TimeStamp = timeStamp + this.CommitHash = commitHash + this.JiraIssue = jiraIssue + return &this +} + +// NewRepositoryPatchDtoWithDefaults instantiates a new RepositoryPatchDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRepositoryPatchDtoWithDefaults() *RepositoryPatchDto { + this := RepositoryPatchDto{} + return &this +} + +// GetOwner returns the Owner field value if set, zero value otherwise. +func (o *RepositoryPatchDto) GetOwner() string { + if o == nil || IsNil(o.Owner) { + var ret string + return ret + } + return *o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryPatchDto) GetOwnerOk() (*string, bool) { + if o == nil || IsNil(o.Owner) { + return nil, false + } + return o.Owner, true +} + +// HasOwner returns a boolean if a field has been set. +func (o *RepositoryPatchDto) HasOwner() bool { + if o != nil && !IsNil(o.Owner) { + return true + } + + return false +} + +// SetOwner gets a reference to the given string and assigns it to the Owner field. +func (o *RepositoryPatchDto) SetOwner(v string) { + o.Owner = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *RepositoryPatchDto) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryPatchDto) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *RepositoryPatchDto) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *RepositoryPatchDto) SetUrl(v string) { + o.Url = &v +} + +// GetMainline returns the Mainline field value if set, zero value otherwise. +func (o *RepositoryPatchDto) GetMainline() string { + if o == nil || IsNil(o.Mainline) { + var ret string + return ret + } + return *o.Mainline +} + +// GetMainlineOk returns a tuple with the Mainline field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryPatchDto) GetMainlineOk() (*string, bool) { + if o == nil || IsNil(o.Mainline) { + return nil, false + } + return o.Mainline, true +} + +// HasMainline returns a boolean if a field has been set. +func (o *RepositoryPatchDto) HasMainline() bool { + if o != nil && !IsNil(o.Mainline) { + return true + } + + return false +} + +// SetMainline gets a reference to the given string and assigns it to the Mainline field. +func (o *RepositoryPatchDto) SetMainline(v string) { + o.Mainline = &v +} + +// GetGenerator returns the Generator field value if set, zero value otherwise. +func (o *RepositoryPatchDto) GetGenerator() string { + if o == nil || IsNil(o.Generator) { + var ret string + return ret + } + return *o.Generator +} + +// GetGeneratorOk returns a tuple with the Generator field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryPatchDto) GetGeneratorOk() (*string, bool) { + if o == nil || IsNil(o.Generator) { + return nil, false + } + return o.Generator, true +} + +// HasGenerator returns a boolean if a field has been set. +func (o *RepositoryPatchDto) HasGenerator() bool { + if o != nil && !IsNil(o.Generator) { + return true + } + + return false +} + +// SetGenerator gets a reference to the given string and assigns it to the Generator field. +func (o *RepositoryPatchDto) SetGenerator(v string) { + o.Generator = &v +} + +// GetConfiguration returns the Configuration field value if set, zero value otherwise. +func (o *RepositoryPatchDto) GetConfiguration() RepositoryConfigurationPatchDto { + if o == nil || IsNil(o.Configuration) { + var ret RepositoryConfigurationPatchDto + return ret + } + return *o.Configuration +} + +// GetConfigurationOk returns a tuple with the Configuration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryPatchDto) GetConfigurationOk() (*RepositoryConfigurationPatchDto, bool) { + if o == nil || IsNil(o.Configuration) { + return nil, false + } + return o.Configuration, true +} + +// HasConfiguration returns a boolean if a field has been set. +func (o *RepositoryPatchDto) HasConfiguration() bool { + if o != nil && !IsNil(o.Configuration) { + return true + } + + return false +} + +// SetConfiguration gets a reference to the given RepositoryConfigurationPatchDto and assigns it to the Configuration field. +func (o *RepositoryPatchDto) SetConfiguration(v RepositoryConfigurationPatchDto) { + o.Configuration = &v +} + +// GetTimeStamp returns the TimeStamp field value +func (o *RepositoryPatchDto) GetTimeStamp() string { + if o == nil { + var ret string + return ret + } + + return o.TimeStamp +} + +// GetTimeStampOk returns a tuple with the TimeStamp field value +// and a boolean to check if the value has been set. +func (o *RepositoryPatchDto) GetTimeStampOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TimeStamp, true +} + +// SetTimeStamp sets field value +func (o *RepositoryPatchDto) SetTimeStamp(v string) { + o.TimeStamp = v +} + +// GetCommitHash returns the CommitHash field value +func (o *RepositoryPatchDto) GetCommitHash() string { + if o == nil { + var ret string + return ret + } + + return o.CommitHash +} + +// GetCommitHashOk returns a tuple with the CommitHash field value +// and a boolean to check if the value has been set. +func (o *RepositoryPatchDto) GetCommitHashOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CommitHash, true +} + +// SetCommitHash sets field value +func (o *RepositoryPatchDto) SetCommitHash(v string) { + o.CommitHash = v +} + +// GetJiraIssue returns the JiraIssue field value +func (o *RepositoryPatchDto) GetJiraIssue() string { + if o == nil { + var ret string + return ret + } + + return o.JiraIssue +} + +// GetJiraIssueOk returns a tuple with the JiraIssue field value +// and a boolean to check if the value has been set. +func (o *RepositoryPatchDto) GetJiraIssueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraIssue, true +} + +// SetJiraIssue sets field value +func (o *RepositoryPatchDto) SetJiraIssue(v string) { + o.JiraIssue = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *RepositoryPatchDto) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryPatchDto) GetLabelsOk() (map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return map[string]string{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *RepositoryPatchDto) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *RepositoryPatchDto) SetLabels(v map[string]string) { + o.Labels = v +} + +func (o RepositoryPatchDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepositoryPatchDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Owner) { + toSerialize["owner"] = o.Owner + } + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if !IsNil(o.Mainline) { + toSerialize["mainline"] = o.Mainline + } + if !IsNil(o.Generator) { + toSerialize["generator"] = o.Generator + } + if !IsNil(o.Configuration) { + toSerialize["configuration"] = o.Configuration + } + toSerialize["timeStamp"] = o.TimeStamp + toSerialize["commitHash"] = o.CommitHash + toSerialize["jiraIssue"] = o.JiraIssue + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *RepositoryPatchDto) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "timeStamp", + "commitHash", + "jiraIssue", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRepositoryPatchDto := _RepositoryPatchDto{} + + err = json.Unmarshal(data, &varRepositoryPatchDto) + + if err != nil { + return err + } + + *o = RepositoryPatchDto(varRepositoryPatchDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "owner") + delete(additionalProperties, "url") + delete(additionalProperties, "mainline") + delete(additionalProperties, "generator") + delete(additionalProperties, "configuration") + delete(additionalProperties, "timeStamp") + delete(additionalProperties, "commitHash") + delete(additionalProperties, "jiraIssue") + delete(additionalProperties, "labels") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableRepositoryPatchDto struct { + value *RepositoryPatchDto + isSet bool +} + +func (v NullableRepositoryPatchDto) Get() *RepositoryPatchDto { + return v.value +} + +func (v *NullableRepositoryPatchDto) Set(val *RepositoryPatchDto) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryPatchDto) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryPatchDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryPatchDto(val *RepositoryPatchDto) *NullableRepositoryPatchDto { + return &NullableRepositoryPatchDto{value: val, isSet: true} +} + +func (v NullableRepositoryPatchDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryPatchDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_service_create_dto.go b/model_service_create_dto.go new file mode 100644 index 0000000..8a82dfe --- /dev/null +++ b/model_service_create_dto.go @@ -0,0 +1,557 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the ServiceCreateDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceCreateDto{} + +// ServiceCreateDto struct for ServiceCreateDto +type ServiceCreateDto struct { + // The alias of the service owner. Note, an update with changed owner will move the service and any associated repositories to the new owner, but of course this will not move e.g. Jenkins jobs. That's your job. + Owner string `json:"owner"` + // A short description of the functionality of the service. + Description *string `json:"description,omitempty"` + // A list of quicklinks related to the service + Quicklinks []Quicklink `json:"quicklinks"` + // The keys of repositories associated with the service. When sending an update, they must refer to repositories that belong to this service, or the update will fail + Repositories []string `json:"repositories"` + // The default channel used to send any alerts of the service to. Can be an email address or a Teams webhook URL + AlertTarget string `json:"alertTarget"` + // The operation type of the service. 'WORKLOAD' follows the default deployment strategy of one instance per environment, 'PLATFORM' one instance per cluster or node and 'APPLICATION' is a standalone application that is not deployed via the common strategies. + OperationType *string `json:"operationType,omitempty"` + // The value defines if the service is available from the internet and the time period in which security holes must be processed. + InternetExposed *bool `json:"internetExposed,omitempty"` + Tags []string `json:"tags,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Spec *ServiceSpecDto `json:"spec,omitempty"` + // Post promote dependencies. + PostPromotes *PostPromote `json:"postPromotes,omitempty"` + // The jira issue to use for committing a change, or the last jira issue used. + JiraIssue string `json:"jiraIssue"` + AdditionalProperties map[string]interface{} +} + +type _ServiceCreateDto ServiceCreateDto + +// NewServiceCreateDto instantiates a new ServiceCreateDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceCreateDto(owner string, quicklinks []Quicklink, repositories []string, alertTarget string, jiraIssue string) *ServiceCreateDto { + this := ServiceCreateDto{} + this.Owner = owner + this.Quicklinks = quicklinks + this.Repositories = repositories + this.AlertTarget = alertTarget + var operationType string = "WORKLOAD" + this.OperationType = &operationType + this.JiraIssue = jiraIssue + return &this +} + +// NewServiceCreateDtoWithDefaults instantiates a new ServiceCreateDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceCreateDtoWithDefaults() *ServiceCreateDto { + this := ServiceCreateDto{} + var operationType string = "WORKLOAD" + this.OperationType = &operationType + return &this +} + +// GetOwner returns the Owner field value +func (o *ServiceCreateDto) GetOwner() string { + if o == nil { + var ret string + return ret + } + + return o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value +// and a boolean to check if the value has been set. +func (o *ServiceCreateDto) GetOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Owner, true +} + +// SetOwner sets field value +func (o *ServiceCreateDto) SetOwner(v string) { + o.Owner = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ServiceCreateDto) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceCreateDto) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ServiceCreateDto) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ServiceCreateDto) SetDescription(v string) { + o.Description = &v +} + +// GetQuicklinks returns the Quicklinks field value +func (o *ServiceCreateDto) GetQuicklinks() []Quicklink { + if o == nil { + var ret []Quicklink + return ret + } + + return o.Quicklinks +} + +// GetQuicklinksOk returns a tuple with the Quicklinks field value +// and a boolean to check if the value has been set. +func (o *ServiceCreateDto) GetQuicklinksOk() ([]Quicklink, bool) { + if o == nil { + return nil, false + } + return o.Quicklinks, true +} + +// SetQuicklinks sets field value +func (o *ServiceCreateDto) SetQuicklinks(v []Quicklink) { + o.Quicklinks = v +} + +// GetRepositories returns the Repositories field value +func (o *ServiceCreateDto) GetRepositories() []string { + if o == nil { + var ret []string + return ret + } + + return o.Repositories +} + +// GetRepositoriesOk returns a tuple with the Repositories field value +// and a boolean to check if the value has been set. +func (o *ServiceCreateDto) GetRepositoriesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Repositories, true +} + +// SetRepositories sets field value +func (o *ServiceCreateDto) SetRepositories(v []string) { + o.Repositories = v +} + +// GetAlertTarget returns the AlertTarget field value +func (o *ServiceCreateDto) GetAlertTarget() string { + if o == nil { + var ret string + return ret + } + + return o.AlertTarget +} + +// GetAlertTargetOk returns a tuple with the AlertTarget field value +// and a boolean to check if the value has been set. +func (o *ServiceCreateDto) GetAlertTargetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AlertTarget, true +} + +// SetAlertTarget sets field value +func (o *ServiceCreateDto) SetAlertTarget(v string) { + o.AlertTarget = v +} + +// GetOperationType returns the OperationType field value if set, zero value otherwise. +func (o *ServiceCreateDto) GetOperationType() string { + if o == nil || IsNil(o.OperationType) { + var ret string + return ret + } + return *o.OperationType +} + +// GetOperationTypeOk returns a tuple with the OperationType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceCreateDto) GetOperationTypeOk() (*string, bool) { + if o == nil || IsNil(o.OperationType) { + return nil, false + } + return o.OperationType, true +} + +// HasOperationType returns a boolean if a field has been set. +func (o *ServiceCreateDto) HasOperationType() bool { + if o != nil && !IsNil(o.OperationType) { + return true + } + + return false +} + +// SetOperationType gets a reference to the given string and assigns it to the OperationType field. +func (o *ServiceCreateDto) SetOperationType(v string) { + o.OperationType = &v +} + +// GetInternetExposed returns the InternetExposed field value if set, zero value otherwise. +func (o *ServiceCreateDto) GetInternetExposed() bool { + if o == nil || IsNil(o.InternetExposed) { + var ret bool + return ret + } + return *o.InternetExposed +} + +// GetInternetExposedOk returns a tuple with the InternetExposed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceCreateDto) GetInternetExposedOk() (*bool, bool) { + if o == nil || IsNil(o.InternetExposed) { + return nil, false + } + return o.InternetExposed, true +} + +// HasInternetExposed returns a boolean if a field has been set. +func (o *ServiceCreateDto) HasInternetExposed() bool { + if o != nil && !IsNil(o.InternetExposed) { + return true + } + + return false +} + +// SetInternetExposed gets a reference to the given bool and assigns it to the InternetExposed field. +func (o *ServiceCreateDto) SetInternetExposed(v bool) { + o.InternetExposed = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *ServiceCreateDto) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceCreateDto) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *ServiceCreateDto) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *ServiceCreateDto) SetTags(v []string) { + o.Tags = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *ServiceCreateDto) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceCreateDto) GetLabelsOk() (map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return map[string]string{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *ServiceCreateDto) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *ServiceCreateDto) SetLabels(v map[string]string) { + o.Labels = v +} + +// GetSpec returns the Spec field value if set, zero value otherwise. +func (o *ServiceCreateDto) GetSpec() ServiceSpecDto { + if o == nil || IsNil(o.Spec) { + var ret ServiceSpecDto + return ret + } + return *o.Spec +} + +// GetSpecOk returns a tuple with the Spec field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceCreateDto) GetSpecOk() (*ServiceSpecDto, bool) { + if o == nil || IsNil(o.Spec) { + return nil, false + } + return o.Spec, true +} + +// HasSpec returns a boolean if a field has been set. +func (o *ServiceCreateDto) HasSpec() bool { + if o != nil && !IsNil(o.Spec) { + return true + } + + return false +} + +// SetSpec gets a reference to the given ServiceSpecDto and assigns it to the Spec field. +func (o *ServiceCreateDto) SetSpec(v ServiceSpecDto) { + o.Spec = &v +} + +// GetPostPromotes returns the PostPromotes field value if set, zero value otherwise. +func (o *ServiceCreateDto) GetPostPromotes() PostPromote { + if o == nil || IsNil(o.PostPromotes) { + var ret PostPromote + return ret + } + return *o.PostPromotes +} + +// GetPostPromotesOk returns a tuple with the PostPromotes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceCreateDto) GetPostPromotesOk() (*PostPromote, bool) { + if o == nil || IsNil(o.PostPromotes) { + return nil, false + } + return o.PostPromotes, true +} + +// HasPostPromotes returns a boolean if a field has been set. +func (o *ServiceCreateDto) HasPostPromotes() bool { + if o != nil && !IsNil(o.PostPromotes) { + return true + } + + return false +} + +// SetPostPromotes gets a reference to the given PostPromote and assigns it to the PostPromotes field. +func (o *ServiceCreateDto) SetPostPromotes(v PostPromote) { + o.PostPromotes = &v +} + +// GetJiraIssue returns the JiraIssue field value +func (o *ServiceCreateDto) GetJiraIssue() string { + if o == nil { + var ret string + return ret + } + + return o.JiraIssue +} + +// GetJiraIssueOk returns a tuple with the JiraIssue field value +// and a boolean to check if the value has been set. +func (o *ServiceCreateDto) GetJiraIssueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraIssue, true +} + +// SetJiraIssue sets field value +func (o *ServiceCreateDto) SetJiraIssue(v string) { + o.JiraIssue = v +} + +func (o ServiceCreateDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceCreateDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["owner"] = o.Owner + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["quicklinks"] = o.Quicklinks + toSerialize["repositories"] = o.Repositories + toSerialize["alertTarget"] = o.AlertTarget + if !IsNil(o.OperationType) { + toSerialize["operationType"] = o.OperationType + } + if !IsNil(o.InternetExposed) { + toSerialize["internetExposed"] = o.InternetExposed + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Spec) { + toSerialize["spec"] = o.Spec + } + if !IsNil(o.PostPromotes) { + toSerialize["postPromotes"] = o.PostPromotes + } + toSerialize["jiraIssue"] = o.JiraIssue + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ServiceCreateDto) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "owner", + "quicklinks", + "repositories", + "alertTarget", + "jiraIssue", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varServiceCreateDto := _ServiceCreateDto{} + + err = json.Unmarshal(data, &varServiceCreateDto) + + if err != nil { + return err + } + + *o = ServiceCreateDto(varServiceCreateDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "owner") + delete(additionalProperties, "description") + delete(additionalProperties, "quicklinks") + delete(additionalProperties, "repositories") + delete(additionalProperties, "alertTarget") + delete(additionalProperties, "operationType") + delete(additionalProperties, "internetExposed") + delete(additionalProperties, "tags") + delete(additionalProperties, "labels") + delete(additionalProperties, "spec") + delete(additionalProperties, "postPromotes") + delete(additionalProperties, "jiraIssue") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableServiceCreateDto struct { + value *ServiceCreateDto + isSet bool +} + +func (v NullableServiceCreateDto) Get() *ServiceCreateDto { + return v.value +} + +func (v *NullableServiceCreateDto) Set(val *ServiceCreateDto) { + v.value = val + v.isSet = true +} + +func (v NullableServiceCreateDto) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceCreateDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceCreateDto(val *ServiceCreateDto) *NullableServiceCreateDto { + return &NullableServiceCreateDto{value: val, isSet: true} +} + +func (v NullableServiceCreateDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceCreateDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_service_dto.go b/model_service_dto.go new file mode 100644 index 0000000..9a790c2 --- /dev/null +++ b/model_service_dto.go @@ -0,0 +1,655 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the ServiceDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceDto{} + +// ServiceDto struct for ServiceDto +type ServiceDto struct { + // The alias of the service owner. Note, an update with changed owner will move the service and any associated repositories to the new owner, but of course this will not move e.g. Jenkins jobs. That's your job. + Owner string `json:"owner"` + // A short description of the functionality of the service. + Description *string `json:"description,omitempty"` + // A list of quicklinks related to the service + Quicklinks []Quicklink `json:"quicklinks"` + // The keys of repositories associated with the service. When sending an update, they must refer to repositories that belong to this service, or the update will fail + Repositories []string `json:"repositories"` + // The default channel used to send any alerts of the service to. Can be an email address or a Teams webhook URL + AlertTarget string `json:"alertTarget"` + // The operation type of the service. 'WORKLOAD' follows the default deployment strategy of one instance per environment, 'PLATFORM' one instance per cluster or node and 'APPLICATION' is a standalone application that is not deployed via the common strategies. + OperationType *string `json:"operationType,omitempty"` + // The value defines if the service is available from the internet and the time period in which security holes must be processed. + InternetExposed *bool `json:"internetExposed,omitempty"` + Tags []string `json:"tags,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Spec *ServiceSpecDto `json:"spec,omitempty"` + // Post promote dependencies. + PostPromotes *PostPromote `json:"postPromotes,omitempty"` + // ISO-8601 UTC date time at which this information was originally committed. When sending an update, include the original timestamp you got so we can detect concurrent updates. + TimeStamp string `json:"timeStamp"` + // The git commit hash this information was originally committed under. When sending an update, include the original commitHash you got so we can detect concurrent updates. + CommitHash string `json:"commitHash"` + // The jira issue to use for committing a change, or the last jira issue used. + JiraIssue string `json:"jiraIssue"` + // The current phase of the service's development. A service usually starts off as 'experimental', then becomes 'operational' (i. e. can be reliably used and/or consumed). Once 'deprecated', the service doesn’t guarantee reliable use/consumption any longer and if 'decommissionable', the service will soon cease to exist. + Lifecycle *string `json:"lifecycle,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ServiceDto ServiceDto + +// NewServiceDto instantiates a new ServiceDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceDto(owner string, quicklinks []Quicklink, repositories []string, alertTarget string, timeStamp string, commitHash string, jiraIssue string) *ServiceDto { + this := ServiceDto{} + this.Owner = owner + this.Quicklinks = quicklinks + this.Repositories = repositories + this.AlertTarget = alertTarget + var operationType string = "WORKLOAD" + this.OperationType = &operationType + this.TimeStamp = timeStamp + this.CommitHash = commitHash + this.JiraIssue = jiraIssue + return &this +} + +// NewServiceDtoWithDefaults instantiates a new ServiceDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceDtoWithDefaults() *ServiceDto { + this := ServiceDto{} + var operationType string = "WORKLOAD" + this.OperationType = &operationType + return &this +} + +// GetOwner returns the Owner field value +func (o *ServiceDto) GetOwner() string { + if o == nil { + var ret string + return ret + } + + return o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value +// and a boolean to check if the value has been set. +func (o *ServiceDto) GetOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Owner, true +} + +// SetOwner sets field value +func (o *ServiceDto) SetOwner(v string) { + o.Owner = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ServiceDto) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceDto) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ServiceDto) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ServiceDto) SetDescription(v string) { + o.Description = &v +} + +// GetQuicklinks returns the Quicklinks field value +func (o *ServiceDto) GetQuicklinks() []Quicklink { + if o == nil { + var ret []Quicklink + return ret + } + + return o.Quicklinks +} + +// GetQuicklinksOk returns a tuple with the Quicklinks field value +// and a boolean to check if the value has been set. +func (o *ServiceDto) GetQuicklinksOk() ([]Quicklink, bool) { + if o == nil { + return nil, false + } + return o.Quicklinks, true +} + +// SetQuicklinks sets field value +func (o *ServiceDto) SetQuicklinks(v []Quicklink) { + o.Quicklinks = v +} + +// GetRepositories returns the Repositories field value +func (o *ServiceDto) GetRepositories() []string { + if o == nil { + var ret []string + return ret + } + + return o.Repositories +} + +// GetRepositoriesOk returns a tuple with the Repositories field value +// and a boolean to check if the value has been set. +func (o *ServiceDto) GetRepositoriesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Repositories, true +} + +// SetRepositories sets field value +func (o *ServiceDto) SetRepositories(v []string) { + o.Repositories = v +} + +// GetAlertTarget returns the AlertTarget field value +func (o *ServiceDto) GetAlertTarget() string { + if o == nil { + var ret string + return ret + } + + return o.AlertTarget +} + +// GetAlertTargetOk returns a tuple with the AlertTarget field value +// and a boolean to check if the value has been set. +func (o *ServiceDto) GetAlertTargetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AlertTarget, true +} + +// SetAlertTarget sets field value +func (o *ServiceDto) SetAlertTarget(v string) { + o.AlertTarget = v +} + +// GetOperationType returns the OperationType field value if set, zero value otherwise. +func (o *ServiceDto) GetOperationType() string { + if o == nil || IsNil(o.OperationType) { + var ret string + return ret + } + return *o.OperationType +} + +// GetOperationTypeOk returns a tuple with the OperationType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceDto) GetOperationTypeOk() (*string, bool) { + if o == nil || IsNil(o.OperationType) { + return nil, false + } + return o.OperationType, true +} + +// HasOperationType returns a boolean if a field has been set. +func (o *ServiceDto) HasOperationType() bool { + if o != nil && !IsNil(o.OperationType) { + return true + } + + return false +} + +// SetOperationType gets a reference to the given string and assigns it to the OperationType field. +func (o *ServiceDto) SetOperationType(v string) { + o.OperationType = &v +} + +// GetInternetExposed returns the InternetExposed field value if set, zero value otherwise. +func (o *ServiceDto) GetInternetExposed() bool { + if o == nil || IsNil(o.InternetExposed) { + var ret bool + return ret + } + return *o.InternetExposed +} + +// GetInternetExposedOk returns a tuple with the InternetExposed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceDto) GetInternetExposedOk() (*bool, bool) { + if o == nil || IsNil(o.InternetExposed) { + return nil, false + } + return o.InternetExposed, true +} + +// HasInternetExposed returns a boolean if a field has been set. +func (o *ServiceDto) HasInternetExposed() bool { + if o != nil && !IsNil(o.InternetExposed) { + return true + } + + return false +} + +// SetInternetExposed gets a reference to the given bool and assigns it to the InternetExposed field. +func (o *ServiceDto) SetInternetExposed(v bool) { + o.InternetExposed = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *ServiceDto) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceDto) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *ServiceDto) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *ServiceDto) SetTags(v []string) { + o.Tags = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *ServiceDto) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceDto) GetLabelsOk() (map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return map[string]string{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *ServiceDto) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *ServiceDto) SetLabels(v map[string]string) { + o.Labels = v +} + +// GetSpec returns the Spec field value if set, zero value otherwise. +func (o *ServiceDto) GetSpec() ServiceSpecDto { + if o == nil || IsNil(o.Spec) { + var ret ServiceSpecDto + return ret + } + return *o.Spec +} + +// GetSpecOk returns a tuple with the Spec field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceDto) GetSpecOk() (*ServiceSpecDto, bool) { + if o == nil || IsNil(o.Spec) { + return nil, false + } + return o.Spec, true +} + +// HasSpec returns a boolean if a field has been set. +func (o *ServiceDto) HasSpec() bool { + if o != nil && !IsNil(o.Spec) { + return true + } + + return false +} + +// SetSpec gets a reference to the given ServiceSpecDto and assigns it to the Spec field. +func (o *ServiceDto) SetSpec(v ServiceSpecDto) { + o.Spec = &v +} + +// GetPostPromotes returns the PostPromotes field value if set, zero value otherwise. +func (o *ServiceDto) GetPostPromotes() PostPromote { + if o == nil || IsNil(o.PostPromotes) { + var ret PostPromote + return ret + } + return *o.PostPromotes +} + +// GetPostPromotesOk returns a tuple with the PostPromotes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceDto) GetPostPromotesOk() (*PostPromote, bool) { + if o == nil || IsNil(o.PostPromotes) { + return nil, false + } + return o.PostPromotes, true +} + +// HasPostPromotes returns a boolean if a field has been set. +func (o *ServiceDto) HasPostPromotes() bool { + if o != nil && !IsNil(o.PostPromotes) { + return true + } + + return false +} + +// SetPostPromotes gets a reference to the given PostPromote and assigns it to the PostPromotes field. +func (o *ServiceDto) SetPostPromotes(v PostPromote) { + o.PostPromotes = &v +} + +// GetTimeStamp returns the TimeStamp field value +func (o *ServiceDto) GetTimeStamp() string { + if o == nil { + var ret string + return ret + } + + return o.TimeStamp +} + +// GetTimeStampOk returns a tuple with the TimeStamp field value +// and a boolean to check if the value has been set. +func (o *ServiceDto) GetTimeStampOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TimeStamp, true +} + +// SetTimeStamp sets field value +func (o *ServiceDto) SetTimeStamp(v string) { + o.TimeStamp = v +} + +// GetCommitHash returns the CommitHash field value +func (o *ServiceDto) GetCommitHash() string { + if o == nil { + var ret string + return ret + } + + return o.CommitHash +} + +// GetCommitHashOk returns a tuple with the CommitHash field value +// and a boolean to check if the value has been set. +func (o *ServiceDto) GetCommitHashOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CommitHash, true +} + +// SetCommitHash sets field value +func (o *ServiceDto) SetCommitHash(v string) { + o.CommitHash = v +} + +// GetJiraIssue returns the JiraIssue field value +func (o *ServiceDto) GetJiraIssue() string { + if o == nil { + var ret string + return ret + } + + return o.JiraIssue +} + +// GetJiraIssueOk returns a tuple with the JiraIssue field value +// and a boolean to check if the value has been set. +func (o *ServiceDto) GetJiraIssueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraIssue, true +} + +// SetJiraIssue sets field value +func (o *ServiceDto) SetJiraIssue(v string) { + o.JiraIssue = v +} + +// GetLifecycle returns the Lifecycle field value if set, zero value otherwise. +func (o *ServiceDto) GetLifecycle() string { + if o == nil || IsNil(o.Lifecycle) { + var ret string + return ret + } + return *o.Lifecycle +} + +// GetLifecycleOk returns a tuple with the Lifecycle field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceDto) GetLifecycleOk() (*string, bool) { + if o == nil || IsNil(o.Lifecycle) { + return nil, false + } + return o.Lifecycle, true +} + +// HasLifecycle returns a boolean if a field has been set. +func (o *ServiceDto) HasLifecycle() bool { + if o != nil && !IsNil(o.Lifecycle) { + return true + } + + return false +} + +// SetLifecycle gets a reference to the given string and assigns it to the Lifecycle field. +func (o *ServiceDto) SetLifecycle(v string) { + o.Lifecycle = &v +} + +func (o ServiceDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["owner"] = o.Owner + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["quicklinks"] = o.Quicklinks + toSerialize["repositories"] = o.Repositories + toSerialize["alertTarget"] = o.AlertTarget + if !IsNil(o.OperationType) { + toSerialize["operationType"] = o.OperationType + } + if !IsNil(o.InternetExposed) { + toSerialize["internetExposed"] = o.InternetExposed + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Spec) { + toSerialize["spec"] = o.Spec + } + if !IsNil(o.PostPromotes) { + toSerialize["postPromotes"] = o.PostPromotes + } + toSerialize["timeStamp"] = o.TimeStamp + toSerialize["commitHash"] = o.CommitHash + toSerialize["jiraIssue"] = o.JiraIssue + if !IsNil(o.Lifecycle) { + toSerialize["lifecycle"] = o.Lifecycle + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ServiceDto) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "owner", + "quicklinks", + "repositories", + "alertTarget", + "timeStamp", + "commitHash", + "jiraIssue", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varServiceDto := _ServiceDto{} + + err = json.Unmarshal(data, &varServiceDto) + + if err != nil { + return err + } + + *o = ServiceDto(varServiceDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "owner") + delete(additionalProperties, "description") + delete(additionalProperties, "quicklinks") + delete(additionalProperties, "repositories") + delete(additionalProperties, "alertTarget") + delete(additionalProperties, "operationType") + delete(additionalProperties, "internetExposed") + delete(additionalProperties, "tags") + delete(additionalProperties, "labels") + delete(additionalProperties, "spec") + delete(additionalProperties, "postPromotes") + delete(additionalProperties, "timeStamp") + delete(additionalProperties, "commitHash") + delete(additionalProperties, "jiraIssue") + delete(additionalProperties, "lifecycle") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableServiceDto struct { + value *ServiceDto + isSet bool +} + +func (v NullableServiceDto) Get() *ServiceDto { + return v.value +} + +func (v *NullableServiceDto) Set(val *ServiceDto) { + v.value = val + v.isSet = true +} + +func (v NullableServiceDto) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceDto(val *ServiceDto) *NullableServiceDto { + return &NullableServiceDto{value: val, isSet: true} +} + +func (v NullableServiceDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_service_list_dto.go b/model_service_list_dto.go new file mode 100644 index 0000000..309f6e7 --- /dev/null +++ b/model_service_list_dto.go @@ -0,0 +1,199 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the ServiceListDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceListDto{} + +// ServiceListDto struct for ServiceListDto +type ServiceListDto struct { + Services map[string]ServiceDto `json:"services"` + // ISO-8601 UTC date time at which the list of services was obtained from service-metadata + TimeStamp string `json:"timeStamp"` + AdditionalProperties map[string]interface{} +} + +type _ServiceListDto ServiceListDto + +// NewServiceListDto instantiates a new ServiceListDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceListDto(services map[string]ServiceDto, timeStamp string) *ServiceListDto { + this := ServiceListDto{} + this.Services = services + this.TimeStamp = timeStamp + return &this +} + +// NewServiceListDtoWithDefaults instantiates a new ServiceListDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceListDtoWithDefaults() *ServiceListDto { + this := ServiceListDto{} + return &this +} + +// GetServices returns the Services field value +func (o *ServiceListDto) GetServices() map[string]ServiceDto { + if o == nil { + var ret map[string]ServiceDto + return ret + } + + return o.Services +} + +// GetServicesOk returns a tuple with the Services field value +// and a boolean to check if the value has been set. +func (o *ServiceListDto) GetServicesOk() (map[string]ServiceDto, bool) { + if o == nil { + return map[string]ServiceDto{}, false + } + return o.Services, true +} + +// SetServices sets field value +func (o *ServiceListDto) SetServices(v map[string]ServiceDto) { + o.Services = v +} + +// GetTimeStamp returns the TimeStamp field value +func (o *ServiceListDto) GetTimeStamp() string { + if o == nil { + var ret string + return ret + } + + return o.TimeStamp +} + +// GetTimeStampOk returns a tuple with the TimeStamp field value +// and a boolean to check if the value has been set. +func (o *ServiceListDto) GetTimeStampOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TimeStamp, true +} + +// SetTimeStamp sets field value +func (o *ServiceListDto) SetTimeStamp(v string) { + o.TimeStamp = v +} + +func (o ServiceListDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceListDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["services"] = o.Services + toSerialize["timeStamp"] = o.TimeStamp + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ServiceListDto) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "services", + "timeStamp", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varServiceListDto := _ServiceListDto{} + + err = json.Unmarshal(data, &varServiceListDto) + + if err != nil { + return err + } + + *o = ServiceListDto(varServiceListDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "services") + delete(additionalProperties, "timeStamp") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableServiceListDto struct { + value *ServiceListDto + isSet bool +} + +func (v NullableServiceListDto) Get() *ServiceListDto { + return v.value +} + +func (v *NullableServiceListDto) Set(val *ServiceListDto) { + v.value = val + v.isSet = true +} + +func (v NullableServiceListDto) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceListDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceListDto(val *ServiceListDto) *NullableServiceListDto { + return &NullableServiceListDto{value: val, isSet: true} +} + +func (v NullableServiceListDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceListDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_service_patch_dto.go b/model_service_patch_dto.go new file mode 100644 index 0000000..831554f --- /dev/null +++ b/model_service_patch_dto.go @@ -0,0 +1,687 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the ServicePatchDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServicePatchDto{} + +// ServicePatchDto struct for ServicePatchDto +type ServicePatchDto struct { + // The alias of the service owner. Note, a patch with changed owner will move the service and any associated repositories to the new owner, but of course this will not move e.g. Jenkins jobs. That's your job. + Owner *string `json:"owner,omitempty"` + // A short description of the functionality of the service. + Description *string `json:"description,omitempty"` + // A list of quicklinks related to the service + Quicklinks []Quicklink `json:"quicklinks,omitempty"` + // The keys of repositories associated with the service. When sending an update, they must refer to repositories that belong to this service, or the update will fail + Repositories []string `json:"repositories,omitempty"` + // The default channel used to send any alerts of the service to. Can be an email address or a Teams webhook URL + AlertTarget *string `json:"alertTarget,omitempty"` + // The operation type of the service. 'WORKLOAD' follows the default deployment strategy of one instance per environment, 'PLATFORM' one instance per cluster or node and 'APPLICATION' is a standalone application that is not deployed via the common strategies. + OperationType *string `json:"operationType,omitempty"` + // The value defines if the service is available from the internet and the time period in which security holes must be processed. + InternetExposed *bool `json:"internetExposed,omitempty"` + Tags []string `json:"tags,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Spec *ServiceSpecDto `json:"spec,omitempty"` + // Post promote dependencies. + PostPromotes *PostPromote `json:"postPromotes,omitempty"` + // ISO-8601 UTC date time at which this information was originally committed. When sending an update, include the original timestamp you got so we can detect concurrent updates. + TimeStamp string `json:"timeStamp"` + // The git commit hash this information was originally committed under. When sending an update, include the original commitHash you got so we can detect concurrent updates. + CommitHash string `json:"commitHash"` + // The jira issue to use for committing a change, or the last jira issue used. + JiraIssue string `json:"jiraIssue"` + // The current phase of the service's development. A service usually starts off as 'experimental', then becomes 'operational' (i. e. can be reliably used and/or consumed). Once 'deprecated', the service doesn’t guarantee reliable use/consumption any longer. + Lifecycle *string `json:"lifecycle,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ServicePatchDto ServicePatchDto + +// NewServicePatchDto instantiates a new ServicePatchDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServicePatchDto(timeStamp string, commitHash string, jiraIssue string) *ServicePatchDto { + this := ServicePatchDto{} + var operationType string = "WORKLOAD" + this.OperationType = &operationType + this.TimeStamp = timeStamp + this.CommitHash = commitHash + this.JiraIssue = jiraIssue + return &this +} + +// NewServicePatchDtoWithDefaults instantiates a new ServicePatchDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServicePatchDtoWithDefaults() *ServicePatchDto { + this := ServicePatchDto{} + var operationType string = "WORKLOAD" + this.OperationType = &operationType + return &this +} + +// GetOwner returns the Owner field value if set, zero value otherwise. +func (o *ServicePatchDto) GetOwner() string { + if o == nil || IsNil(o.Owner) { + var ret string + return ret + } + return *o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServicePatchDto) GetOwnerOk() (*string, bool) { + if o == nil || IsNil(o.Owner) { + return nil, false + } + return o.Owner, true +} + +// HasOwner returns a boolean if a field has been set. +func (o *ServicePatchDto) HasOwner() bool { + if o != nil && !IsNil(o.Owner) { + return true + } + + return false +} + +// SetOwner gets a reference to the given string and assigns it to the Owner field. +func (o *ServicePatchDto) SetOwner(v string) { + o.Owner = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ServicePatchDto) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServicePatchDto) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ServicePatchDto) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ServicePatchDto) SetDescription(v string) { + o.Description = &v +} + +// GetQuicklinks returns the Quicklinks field value if set, zero value otherwise. +func (o *ServicePatchDto) GetQuicklinks() []Quicklink { + if o == nil || IsNil(o.Quicklinks) { + var ret []Quicklink + return ret + } + return o.Quicklinks +} + +// GetQuicklinksOk returns a tuple with the Quicklinks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServicePatchDto) GetQuicklinksOk() ([]Quicklink, bool) { + if o == nil || IsNil(o.Quicklinks) { + return nil, false + } + return o.Quicklinks, true +} + +// HasQuicklinks returns a boolean if a field has been set. +func (o *ServicePatchDto) HasQuicklinks() bool { + if o != nil && !IsNil(o.Quicklinks) { + return true + } + + return false +} + +// SetQuicklinks gets a reference to the given []Quicklink and assigns it to the Quicklinks field. +func (o *ServicePatchDto) SetQuicklinks(v []Quicklink) { + o.Quicklinks = v +} + +// GetRepositories returns the Repositories field value if set, zero value otherwise. +func (o *ServicePatchDto) GetRepositories() []string { + if o == nil || IsNil(o.Repositories) { + var ret []string + return ret + } + return o.Repositories +} + +// GetRepositoriesOk returns a tuple with the Repositories field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServicePatchDto) GetRepositoriesOk() ([]string, bool) { + if o == nil || IsNil(o.Repositories) { + return nil, false + } + return o.Repositories, true +} + +// HasRepositories returns a boolean if a field has been set. +func (o *ServicePatchDto) HasRepositories() bool { + if o != nil && !IsNil(o.Repositories) { + return true + } + + return false +} + +// SetRepositories gets a reference to the given []string and assigns it to the Repositories field. +func (o *ServicePatchDto) SetRepositories(v []string) { + o.Repositories = v +} + +// GetAlertTarget returns the AlertTarget field value if set, zero value otherwise. +func (o *ServicePatchDto) GetAlertTarget() string { + if o == nil || IsNil(o.AlertTarget) { + var ret string + return ret + } + return *o.AlertTarget +} + +// GetAlertTargetOk returns a tuple with the AlertTarget field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServicePatchDto) GetAlertTargetOk() (*string, bool) { + if o == nil || IsNil(o.AlertTarget) { + return nil, false + } + return o.AlertTarget, true +} + +// HasAlertTarget returns a boolean if a field has been set. +func (o *ServicePatchDto) HasAlertTarget() bool { + if o != nil && !IsNil(o.AlertTarget) { + return true + } + + return false +} + +// SetAlertTarget gets a reference to the given string and assigns it to the AlertTarget field. +func (o *ServicePatchDto) SetAlertTarget(v string) { + o.AlertTarget = &v +} + +// GetOperationType returns the OperationType field value if set, zero value otherwise. +func (o *ServicePatchDto) GetOperationType() string { + if o == nil || IsNil(o.OperationType) { + var ret string + return ret + } + return *o.OperationType +} + +// GetOperationTypeOk returns a tuple with the OperationType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServicePatchDto) GetOperationTypeOk() (*string, bool) { + if o == nil || IsNil(o.OperationType) { + return nil, false + } + return o.OperationType, true +} + +// HasOperationType returns a boolean if a field has been set. +func (o *ServicePatchDto) HasOperationType() bool { + if o != nil && !IsNil(o.OperationType) { + return true + } + + return false +} + +// SetOperationType gets a reference to the given string and assigns it to the OperationType field. +func (o *ServicePatchDto) SetOperationType(v string) { + o.OperationType = &v +} + +// GetInternetExposed returns the InternetExposed field value if set, zero value otherwise. +func (o *ServicePatchDto) GetInternetExposed() bool { + if o == nil || IsNil(o.InternetExposed) { + var ret bool + return ret + } + return *o.InternetExposed +} + +// GetInternetExposedOk returns a tuple with the InternetExposed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServicePatchDto) GetInternetExposedOk() (*bool, bool) { + if o == nil || IsNil(o.InternetExposed) { + return nil, false + } + return o.InternetExposed, true +} + +// HasInternetExposed returns a boolean if a field has been set. +func (o *ServicePatchDto) HasInternetExposed() bool { + if o != nil && !IsNil(o.InternetExposed) { + return true + } + + return false +} + +// SetInternetExposed gets a reference to the given bool and assigns it to the InternetExposed field. +func (o *ServicePatchDto) SetInternetExposed(v bool) { + o.InternetExposed = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *ServicePatchDto) GetTags() []string { + if o == nil || IsNil(o.Tags) { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServicePatchDto) GetTagsOk() ([]string, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *ServicePatchDto) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *ServicePatchDto) SetTags(v []string) { + o.Tags = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *ServicePatchDto) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServicePatchDto) GetLabelsOk() (map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return map[string]string{}, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *ServicePatchDto) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *ServicePatchDto) SetLabels(v map[string]string) { + o.Labels = v +} + +// GetSpec returns the Spec field value if set, zero value otherwise. +func (o *ServicePatchDto) GetSpec() ServiceSpecDto { + if o == nil || IsNil(o.Spec) { + var ret ServiceSpecDto + return ret + } + return *o.Spec +} + +// GetSpecOk returns a tuple with the Spec field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServicePatchDto) GetSpecOk() (*ServiceSpecDto, bool) { + if o == nil || IsNil(o.Spec) { + return nil, false + } + return o.Spec, true +} + +// HasSpec returns a boolean if a field has been set. +func (o *ServicePatchDto) HasSpec() bool { + if o != nil && !IsNil(o.Spec) { + return true + } + + return false +} + +// SetSpec gets a reference to the given ServiceSpecDto and assigns it to the Spec field. +func (o *ServicePatchDto) SetSpec(v ServiceSpecDto) { + o.Spec = &v +} + +// GetPostPromotes returns the PostPromotes field value if set, zero value otherwise. +func (o *ServicePatchDto) GetPostPromotes() PostPromote { + if o == nil || IsNil(o.PostPromotes) { + var ret PostPromote + return ret + } + return *o.PostPromotes +} + +// GetPostPromotesOk returns a tuple with the PostPromotes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServicePatchDto) GetPostPromotesOk() (*PostPromote, bool) { + if o == nil || IsNil(o.PostPromotes) { + return nil, false + } + return o.PostPromotes, true +} + +// HasPostPromotes returns a boolean if a field has been set. +func (o *ServicePatchDto) HasPostPromotes() bool { + if o != nil && !IsNil(o.PostPromotes) { + return true + } + + return false +} + +// SetPostPromotes gets a reference to the given PostPromote and assigns it to the PostPromotes field. +func (o *ServicePatchDto) SetPostPromotes(v PostPromote) { + o.PostPromotes = &v +} + +// GetTimeStamp returns the TimeStamp field value +func (o *ServicePatchDto) GetTimeStamp() string { + if o == nil { + var ret string + return ret + } + + return o.TimeStamp +} + +// GetTimeStampOk returns a tuple with the TimeStamp field value +// and a boolean to check if the value has been set. +func (o *ServicePatchDto) GetTimeStampOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TimeStamp, true +} + +// SetTimeStamp sets field value +func (o *ServicePatchDto) SetTimeStamp(v string) { + o.TimeStamp = v +} + +// GetCommitHash returns the CommitHash field value +func (o *ServicePatchDto) GetCommitHash() string { + if o == nil { + var ret string + return ret + } + + return o.CommitHash +} + +// GetCommitHashOk returns a tuple with the CommitHash field value +// and a boolean to check if the value has been set. +func (o *ServicePatchDto) GetCommitHashOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CommitHash, true +} + +// SetCommitHash sets field value +func (o *ServicePatchDto) SetCommitHash(v string) { + o.CommitHash = v +} + +// GetJiraIssue returns the JiraIssue field value +func (o *ServicePatchDto) GetJiraIssue() string { + if o == nil { + var ret string + return ret + } + + return o.JiraIssue +} + +// GetJiraIssueOk returns a tuple with the JiraIssue field value +// and a boolean to check if the value has been set. +func (o *ServicePatchDto) GetJiraIssueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraIssue, true +} + +// SetJiraIssue sets field value +func (o *ServicePatchDto) SetJiraIssue(v string) { + o.JiraIssue = v +} + +// GetLifecycle returns the Lifecycle field value if set, zero value otherwise. +func (o *ServicePatchDto) GetLifecycle() string { + if o == nil || IsNil(o.Lifecycle) { + var ret string + return ret + } + return *o.Lifecycle +} + +// GetLifecycleOk returns a tuple with the Lifecycle field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServicePatchDto) GetLifecycleOk() (*string, bool) { + if o == nil || IsNil(o.Lifecycle) { + return nil, false + } + return o.Lifecycle, true +} + +// HasLifecycle returns a boolean if a field has been set. +func (o *ServicePatchDto) HasLifecycle() bool { + if o != nil && !IsNil(o.Lifecycle) { + return true + } + + return false +} + +// SetLifecycle gets a reference to the given string and assigns it to the Lifecycle field. +func (o *ServicePatchDto) SetLifecycle(v string) { + o.Lifecycle = &v +} + +func (o ServicePatchDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServicePatchDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Owner) { + toSerialize["owner"] = o.Owner + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Quicklinks) { + toSerialize["quicklinks"] = o.Quicklinks + } + if !IsNil(o.Repositories) { + toSerialize["repositories"] = o.Repositories + } + if !IsNil(o.AlertTarget) { + toSerialize["alertTarget"] = o.AlertTarget + } + if !IsNil(o.OperationType) { + toSerialize["operationType"] = o.OperationType + } + if !IsNil(o.InternetExposed) { + toSerialize["internetExposed"] = o.InternetExposed + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Spec) { + toSerialize["spec"] = o.Spec + } + if !IsNil(o.PostPromotes) { + toSerialize["postPromotes"] = o.PostPromotes + } + toSerialize["timeStamp"] = o.TimeStamp + toSerialize["commitHash"] = o.CommitHash + toSerialize["jiraIssue"] = o.JiraIssue + if !IsNil(o.Lifecycle) { + toSerialize["lifecycle"] = o.Lifecycle + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ServicePatchDto) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "timeStamp", + "commitHash", + "jiraIssue", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varServicePatchDto := _ServicePatchDto{} + + err = json.Unmarshal(data, &varServicePatchDto) + + if err != nil { + return err + } + + *o = ServicePatchDto(varServicePatchDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "owner") + delete(additionalProperties, "description") + delete(additionalProperties, "quicklinks") + delete(additionalProperties, "repositories") + delete(additionalProperties, "alertTarget") + delete(additionalProperties, "operationType") + delete(additionalProperties, "internetExposed") + delete(additionalProperties, "tags") + delete(additionalProperties, "labels") + delete(additionalProperties, "spec") + delete(additionalProperties, "postPromotes") + delete(additionalProperties, "timeStamp") + delete(additionalProperties, "commitHash") + delete(additionalProperties, "jiraIssue") + delete(additionalProperties, "lifecycle") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableServicePatchDto struct { + value *ServicePatchDto + isSet bool +} + +func (v NullableServicePatchDto) Get() *ServicePatchDto { + return v.value +} + +func (v *NullableServicePatchDto) Set(val *ServicePatchDto) { + v.value = val + v.isSet = true +} + +func (v NullableServicePatchDto) IsSet() bool { + return v.isSet +} + +func (v *NullableServicePatchDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServicePatchDto(val *ServicePatchDto) *NullableServicePatchDto { + return &NullableServicePatchDto{value: val, isSet: true} +} + +func (v NullableServicePatchDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServicePatchDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_service_promoters_dto.go b/model_service_promoters_dto.go new file mode 100644 index 0000000..e03c417 --- /dev/null +++ b/model_service_promoters_dto.go @@ -0,0 +1,169 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the ServicePromotersDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServicePromotersDto{} + +// ServicePromotersDto struct for ServicePromotersDto +type ServicePromotersDto struct { + Promoters []string `json:"promoters"` + AdditionalProperties map[string]interface{} +} + +type _ServicePromotersDto ServicePromotersDto + +// NewServicePromotersDto instantiates a new ServicePromotersDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServicePromotersDto(promoters []string) *ServicePromotersDto { + this := ServicePromotersDto{} + this.Promoters = promoters + return &this +} + +// NewServicePromotersDtoWithDefaults instantiates a new ServicePromotersDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServicePromotersDtoWithDefaults() *ServicePromotersDto { + this := ServicePromotersDto{} + return &this +} + +// GetPromoters returns the Promoters field value +func (o *ServicePromotersDto) GetPromoters() []string { + if o == nil { + var ret []string + return ret + } + + return o.Promoters +} + +// GetPromotersOk returns a tuple with the Promoters field value +// and a boolean to check if the value has been set. +func (o *ServicePromotersDto) GetPromotersOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Promoters, true +} + +// SetPromoters sets field value +func (o *ServicePromotersDto) SetPromoters(v []string) { + o.Promoters = v +} + +func (o ServicePromotersDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServicePromotersDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["promoters"] = o.Promoters + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ServicePromotersDto) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "promoters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varServicePromotersDto := _ServicePromotersDto{} + + err = json.Unmarshal(data, &varServicePromotersDto) + + if err != nil { + return err + } + + *o = ServicePromotersDto(varServicePromotersDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "promoters") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableServicePromotersDto struct { + value *ServicePromotersDto + isSet bool +} + +func (v NullableServicePromotersDto) Get() *ServicePromotersDto { + return v.value +} + +func (v *NullableServicePromotersDto) Set(val *ServicePromotersDto) { + v.value = val + v.isSet = true +} + +func (v NullableServicePromotersDto) IsSet() bool { + return v.isSet +} + +func (v *NullableServicePromotersDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServicePromotersDto(val *ServicePromotersDto) *NullableServicePromotersDto { + return &NullableServicePromotersDto{value: val, isSet: true} +} + +func (v NullableServicePromotersDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServicePromotersDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_service_spec_dto.go b/model_service_spec_dto.go new file mode 100644 index 0000000..cbfc6da --- /dev/null +++ b/model_service_spec_dto.go @@ -0,0 +1,271 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the ServiceSpecDto type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceSpecDto{} + +// ServiceSpecDto struct for ServiceSpecDto +type ServiceSpecDto struct { + // A reference to the system that the component belongs to + System *string `json:"system,omitempty"` + // A relation denoting a dependency on another entity + DependsOn []string `json:"dependsOn,omitempty"` + // A relation with an API, provided by this entity + ProvidesApis []string `json:"providesApis,omitempty"` + // A relation with an API, consumed by this entity + ConsumesApis []string `json:"consumesApis,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _ServiceSpecDto ServiceSpecDto + +// NewServiceSpecDto instantiates a new ServiceSpecDto object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceSpecDto() *ServiceSpecDto { + this := ServiceSpecDto{} + return &this +} + +// NewServiceSpecDtoWithDefaults instantiates a new ServiceSpecDto object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceSpecDtoWithDefaults() *ServiceSpecDto { + this := ServiceSpecDto{} + return &this +} + +// GetSystem returns the System field value if set, zero value otherwise. +func (o *ServiceSpecDto) GetSystem() string { + if o == nil || IsNil(o.System) { + var ret string + return ret + } + return *o.System +} + +// GetSystemOk returns a tuple with the System field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceSpecDto) GetSystemOk() (*string, bool) { + if o == nil || IsNil(o.System) { + return nil, false + } + return o.System, true +} + +// HasSystem returns a boolean if a field has been set. +func (o *ServiceSpecDto) HasSystem() bool { + if o != nil && !IsNil(o.System) { + return true + } + + return false +} + +// SetSystem gets a reference to the given string and assigns it to the System field. +func (o *ServiceSpecDto) SetSystem(v string) { + o.System = &v +} + +// GetDependsOn returns the DependsOn field value if set, zero value otherwise. +func (o *ServiceSpecDto) GetDependsOn() []string { + if o == nil || IsNil(o.DependsOn) { + var ret []string + return ret + } + return o.DependsOn +} + +// GetDependsOnOk returns a tuple with the DependsOn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceSpecDto) GetDependsOnOk() ([]string, bool) { + if o == nil || IsNil(o.DependsOn) { + return nil, false + } + return o.DependsOn, true +} + +// HasDependsOn returns a boolean if a field has been set. +func (o *ServiceSpecDto) HasDependsOn() bool { + if o != nil && !IsNil(o.DependsOn) { + return true + } + + return false +} + +// SetDependsOn gets a reference to the given []string and assigns it to the DependsOn field. +func (o *ServiceSpecDto) SetDependsOn(v []string) { + o.DependsOn = v +} + +// GetProvidesApis returns the ProvidesApis field value if set, zero value otherwise. +func (o *ServiceSpecDto) GetProvidesApis() []string { + if o == nil || IsNil(o.ProvidesApis) { + var ret []string + return ret + } + return o.ProvidesApis +} + +// GetProvidesApisOk returns a tuple with the ProvidesApis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceSpecDto) GetProvidesApisOk() ([]string, bool) { + if o == nil || IsNil(o.ProvidesApis) { + return nil, false + } + return o.ProvidesApis, true +} + +// HasProvidesApis returns a boolean if a field has been set. +func (o *ServiceSpecDto) HasProvidesApis() bool { + if o != nil && !IsNil(o.ProvidesApis) { + return true + } + + return false +} + +// SetProvidesApis gets a reference to the given []string and assigns it to the ProvidesApis field. +func (o *ServiceSpecDto) SetProvidesApis(v []string) { + o.ProvidesApis = v +} + +// GetConsumesApis returns the ConsumesApis field value if set, zero value otherwise. +func (o *ServiceSpecDto) GetConsumesApis() []string { + if o == nil || IsNil(o.ConsumesApis) { + var ret []string + return ret + } + return o.ConsumesApis +} + +// GetConsumesApisOk returns a tuple with the ConsumesApis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceSpecDto) GetConsumesApisOk() ([]string, bool) { + if o == nil || IsNil(o.ConsumesApis) { + return nil, false + } + return o.ConsumesApis, true +} + +// HasConsumesApis returns a boolean if a field has been set. +func (o *ServiceSpecDto) HasConsumesApis() bool { + if o != nil && !IsNil(o.ConsumesApis) { + return true + } + + return false +} + +// SetConsumesApis gets a reference to the given []string and assigns it to the ConsumesApis field. +func (o *ServiceSpecDto) SetConsumesApis(v []string) { + o.ConsumesApis = v +} + +func (o ServiceSpecDto) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceSpecDto) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.System) { + toSerialize["system"] = o.System + } + if !IsNil(o.DependsOn) { + toSerialize["dependsOn"] = o.DependsOn + } + if !IsNil(o.ProvidesApis) { + toSerialize["providesApis"] = o.ProvidesApis + } + if !IsNil(o.ConsumesApis) { + toSerialize["consumesApis"] = o.ConsumesApis + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ServiceSpecDto) UnmarshalJSON(data []byte) (err error) { + varServiceSpecDto := _ServiceSpecDto{} + + err = json.Unmarshal(data, &varServiceSpecDto) + + if err != nil { + return err + } + + *o = ServiceSpecDto(varServiceSpecDto) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "system") + delete(additionalProperties, "dependsOn") + delete(additionalProperties, "providesApis") + delete(additionalProperties, "consumesApis") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableServiceSpecDto struct { + value *ServiceSpecDto + isSet bool +} + +func (v NullableServiceSpecDto) Get() *ServiceSpecDto { + return v.value +} + +func (v *NullableServiceSpecDto) Set(val *ServiceSpecDto) { + v.value = val + v.isSet = true +} + +func (v NullableServiceSpecDto) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceSpecDto) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceSpecDto(val *ServiceSpecDto) *NullableServiceSpecDto { + return &NullableServiceSpecDto{value: val, isSet: true} +} + +func (v NullableServiceSpecDto) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceSpecDto) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/openapitools.json b/openapitools.json new file mode 100644 index 0000000..2075551 --- /dev/null +++ b/openapitools.json @@ -0,0 +1,19 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "7.12.0", + "generators": { + "v1": { + "generatorName": "go", + "inputSpec": "./specs/v1.yaml", + "output": "./", + "additionalProperties": { + "disallowAdditionalPropertiesIfNotPresent": false + }, + "gitUserId": "Interhyp", + "gitRepoId": "metadata-service-api" + } + } + } +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..c367e15 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2124 @@ +{ + "name": "metadata-service-api", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "metadata-service-api", + "version": "1.0.0", + "license": "ISC", + "devDependencies": { + "@openapitools/openapi-generator-cli": "^2.20.0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.27.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/@babel/runtime/-/runtime-7.27.1.tgz", + "integrity": "sha512-1x3D2xEk2fRo3PAhwQwu5UubzgiVWSXTBfWpVd2Mx2AzRqJuDJCsgaDVZ7HB5iGzDW1Hl1sWN2mFyKjmR9uAog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@lukeed/csprng": { + "version": "1.1.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/@lukeed/csprng/-/csprng-1.1.0.tgz", + "integrity": "sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@nestjs/axios": { + "version": "4.0.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/@nestjs/axios/-/axios-4.0.0.tgz", + "integrity": "sha512-1cB+Jyltu/uUPNQrpUimRHEQHrnQrpLzVj6dU3dgn6iDDDdahr10TgHFGTmw5VuJ9GzKZsCLDL78VSwJAs/9JQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@nestjs/common": "^10.0.0 || ^11.0.0", + "axios": "^1.3.1", + "rxjs": "^7.0.0" + } + }, + "node_modules/@nestjs/common": { + "version": "11.0.20", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/@nestjs/common/-/common-11.0.20.tgz", + "integrity": "sha512-/GH8NDCczjn6+6RNEtSNAts/nq/wQE8L1qZ9TRjqjNqEsZNE1vpFuRIhmcO2isQZ0xY5rySnpaRdrOAul3gQ3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "file-type": "20.4.1", + "iterare": "1.2.1", + "load-esm": "1.0.2", + "tslib": "2.8.1", + "uid": "2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "class-transformer": "*", + "class-validator": "*", + "reflect-metadata": "^0.1.12 || ^0.2.0", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "class-transformer": { + "optional": true + }, + "class-validator": { + "optional": true + } + } + }, + "node_modules/@nestjs/core": { + "version": "11.0.20", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/@nestjs/core/-/core-11.0.20.tgz", + "integrity": "sha512-yUkEzBGiRNSEThVl6vMCXgoA9sDGWoRbJsTLdYdCC7lg7PE1iXBnna1FiBfQjT995pm0fjyM1e3WsXmyWeJXbw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "@nuxt/opencollective": "0.4.1", + "fast-safe-stringify": "2.1.1", + "iterare": "1.2.1", + "path-to-regexp": "8.2.0", + "tslib": "2.8.1", + "uid": "2.0.2" + }, + "engines": { + "node": ">= 20" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "@nestjs/common": "^11.0.0", + "@nestjs/microservices": "^11.0.0", + "@nestjs/platform-express": "^11.0.0", + "@nestjs/websockets": "^11.0.0", + "reflect-metadata": "^0.1.12 || ^0.2.0", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "@nestjs/microservices": { + "optional": true + }, + "@nestjs/platform-express": { + "optional": true + }, + "@nestjs/websockets": { + "optional": true + } + } + }, + "node_modules/@nuxt/opencollective": { + "version": "0.4.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/@nuxt/opencollective/-/opencollective-0.4.1.tgz", + "integrity": "sha512-GXD3wy50qYbxCJ652bDrDzgMr3NFEkIS374+IgFQKkCvk9yiYcLvX2XDYr7UyQxf4wK0e+yqDYRubZ0DtOxnmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "consola": "^3.2.3" + }, + "bin": { + "opencollective": "bin/opencollective.js" + }, + "engines": { + "node": "^14.18.0 || >=16.10.0", + "npm": ">=5.10.0" + } + }, + "node_modules/@nuxtjs/opencollective": { + "version": "0.3.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz", + "integrity": "sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "consola": "^2.15.0", + "node-fetch": "^2.6.1" + }, + "bin": { + "opencollective": "bin/opencollective.js" + }, + "engines": { + "node": ">=8.0.0", + "npm": ">=5.0.0" + } + }, + "node_modules/@nuxtjs/opencollective/node_modules/consola": { + "version": "2.15.3", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/consola/-/consola-2.15.3.tgz", + "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@openapitools/openapi-generator-cli": { + "version": "2.20.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.20.0.tgz", + "integrity": "sha512-Amtd7/9Lodaxnmfsru8R5n0CW9lyWOI40UsppGMfuNFkFFbabq51/VAJFsOHkNnDRwVUc7AGKWjN5icphDGlTQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@nestjs/axios": "4.0.0", + "@nestjs/common": "11.0.20", + "@nestjs/core": "11.0.20", + "@nuxtjs/opencollective": "0.3.2", + "axios": "1.8.4", + "chalk": "4.1.2", + "commander": "8.3.0", + "compare-versions": "4.1.4", + "concurrently": "6.5.1", + "console.table": "0.10.0", + "fs-extra": "11.3.0", + "glob": "9.3.5", + "inquirer": "8.2.6", + "lodash": "4.17.21", + "proxy-agent": "6.5.0", + "reflect-metadata": "0.2.2", + "rxjs": "7.8.2", + "tslib": "2.8.1" + }, + "bin": { + "openapi-generator-cli": "main.js" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/openapi_generator" + } + }, + "node_modules/@tokenizer/inflate": { + "version": "0.2.7", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/@tokenizer/inflate/-/inflate-0.2.7.tgz", + "integrity": "sha512-MADQgmZT1eKjp06jpI2yozxaU9uVs4GzzgSL+uEq7bVcJ9V1ZXQkeGNql1fsSI0gMy1vhvNTNbUqrx+pZfJVmg==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "fflate": "^0.8.2", + "token-types": "^6.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/@tokenizer/token": { + "version": "0.3.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/@tokenizer/token/-/token-0.3.0.tgz", + "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tootallnate/quickjs-emscripten": { + "version": "0.23.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", + "dev": true, + "license": "MIT" + }, + "node_modules/agent-base": { + "version": "7.1.3", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/agent-base/-/agent-base-7.1.3.tgz", + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ast-types": { + "version": "0.13.4", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.8.4", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/axios/-/axios-1.8.4.tgz", + "integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/basic-ftp": { + "version": "5.0.5", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/basic-ftp/-/basic-ftp-5.0.5.tgz", + "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true, + "license": "MIT" + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 10" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "8.3.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/compare-versions": { + "version": "4.1.4", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/compare-versions/-/compare-versions-4.1.4.tgz", + "integrity": "sha512-FemMreK9xNyL8gQevsdRMrvO4lFCkQP7qbuktn1q8ndcNk1+0mz7lgE7b/sNvbhVgY4w6tMN1FDp6aADjqw2rw==", + "dev": true, + "license": "MIT" + }, + "node_modules/concurrently": { + "version": "6.5.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/concurrently/-/concurrently-6.5.1.tgz", + "integrity": "sha512-FlSwNpGjWQfRwPLXvJ/OgysbBxPkWpiVjy1042b0U7on7S7qwwMIILRj7WTN1mTgqa582bG6NFuScOoh6Zgdag==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "date-fns": "^2.16.1", + "lodash": "^4.17.21", + "rxjs": "^6.6.3", + "spawn-command": "^0.0.2-1", + "supports-color": "^8.1.0", + "tree-kill": "^1.2.2", + "yargs": "^16.2.0" + }, + "bin": { + "concurrently": "bin/concurrently.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/concurrently/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/concurrently/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/consola": { + "version": "3.4.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/consola/-/consola-3.4.2.tgz", + "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, + "node_modules/console.table": { + "version": "0.10.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/console.table/-/console.table-0.10.0.tgz", + "integrity": "sha512-dPyZofqggxuvSf7WXvNjuRfnsOk1YazkVP8FdxH4tcH2c37wc79/Yl6Bhr7Lsu00KMgy2ql/qCMuNu8xctZM8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "easy-table": "1.1.0" + }, + "engines": { + "node": "> 0.10" + } + }, + "node_modules/data-uri-to-buffer": { + "version": "6.0.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/date-fns": { + "version": "2.30.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.21.0" + }, + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, + "node_modules/debug": { + "version": "4.4.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/degenerator": { + "version": "5.0.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/easy-table": { + "version": "1.1.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/easy-table/-/easy-table-1.1.0.tgz", + "integrity": "sha512-oq33hWOSSnl2Hoh00tZWaIPi1ievrD9aFG82/IgjlycAnW9hHx5PkJiXpxPsgEE+H7BsbVQXFVFST8TEXS6/pA==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "wcwidth": ">=1.0.1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/fflate": { + "version": "0.8.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/fflate/-/fflate-0.8.2.tgz", + "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", + "dev": true, + "license": "MIT" + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/file-type": { + "version": "20.4.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/file-type/-/file-type-20.4.1.tgz", + "integrity": "sha512-hw9gNZXUfZ02Jo0uafWLaFVPter5/k2rfcrjFJJHX/77xtSDOfJuEFb6oKlFV86FLP1SuyHMW1PSk0U9M5tKkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tokenizer/inflate": "^0.2.6", + "strtok3": "^10.2.0", + "token-types": "^6.0.0", + "uint8array-extras": "^1.4.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sindresorhus/file-type?sponsor=1" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/form-data/-/form-data-4.0.2.tgz", + "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fs-extra": { + "version": "11.3.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/fs-extra/-/fs-extra-11.3.0.tgz", + "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-uri": { + "version": "6.0.4", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/get-uri/-/get-uri-6.0.4.tgz", + "integrity": "sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "basic-ftp": "^5.0.2", + "data-uri-to-buffer": "^6.0.2", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/glob": { + "version": "9.3.5", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/glob/-/glob-9.3.5.tgz", + "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "minimatch": "^8.0.2", + "minipass": "^4.2.4", + "path-scurry": "^1.6.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/inquirer": { + "version": "8.2.6", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/inquirer/-/inquirer-8.2.6.tgz", + "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^6.0.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/iterare": { + "version": "1.2.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/iterare/-/iterare-1.2.1.tgz", + "integrity": "sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=6" + } + }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/load-esm": { + "version": "1.0.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/load-esm/-/load-esm-1.0.2.tgz", + "integrity": "sha512-nVAvWk/jeyrWyXEAs84mpQCYccxRqgKY4OznLuJhJCa0XsPSfdOIr2zvBZEj3IHEHbX97jjscKRRV539bW0Gpw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + }, + { + "type": "buymeacoffee", + "url": "https://buymeacoffee.com/borewit" + } + ], + "license": "MIT", + "engines": { + "node": ">=13.2.0" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true, + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "8.0.4", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/minimatch/-/minimatch-8.0.4.tgz", + "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "4.2.8", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/minipass/-/minipass-4.2.8.tgz", + "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true, + "license": "ISC" + }, + "node_modules/netmask": { + "version": "2.0.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pac-proxy-agent": { + "version": "7.2.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz", + "integrity": "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tootallnate/quickjs-emscripten": "^0.23.0", + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "get-uri": "^6.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.6", + "pac-resolver": "^7.0.1", + "socks-proxy-agent": "^8.0.5" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/pac-resolver": { + "version": "7.0.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/pac-resolver/-/pac-resolver-7.0.1.tgz", + "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", + "dev": true, + "license": "MIT", + "dependencies": { + "degenerator": "^5.0.0", + "netmask": "^2.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/path-to-regexp": { + "version": "8.2.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/path-to-regexp/-/path-to-regexp-8.2.0.tgz", + "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + } + }, + "node_modules/peek-readable": { + "version": "7.0.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/peek-readable/-/peek-readable-7.0.0.tgz", + "integrity": "sha512-nri2TO5JE3/mRryik9LlHFT53cgHfRK0Lt0BAZQXku/AW3E6XLt2GaY8siWi7dvW/m1z0ecn+J+bpDa9ZN3IsQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/proxy-agent": { + "version": "6.5.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/proxy-agent/-/proxy-agent-6.5.0.tgz", + "integrity": "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.6", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.1.0", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.5" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/proxy-agent/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true, + "license": "MIT" + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/reflect-metadata": { + "version": "0.2.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/reflect-metadata/-/reflect-metadata-0.2.2.tgz", + "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.4", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/socks/-/socks-2.8.4.tgz", + "integrity": "sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.5", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", + "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spawn-command": { + "version": "0.0.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/spawn-command/-/spawn-command-0.0.2.tgz", + "integrity": "sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==", + "dev": true + }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strtok3": { + "version": "10.2.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/strtok3/-/strtok3-10.2.2.tgz", + "integrity": "sha512-Xt18+h4s7Z8xyZ0tmBoRmzxcop97R4BAh+dXouUDCYn+Em+1P3qpkUfI5ueWLT8ynC5hZ+q4iPEmGG1urvQGBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tokenizer/token": "^0.3.0", + "peek-readable": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/token-types": { + "version": "6.0.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/token-types/-/token-types-6.0.0.tgz", + "integrity": "sha512-lbDrTLVsHhOMljPscd0yitpozq7Ga2M5Cvez5AjGg8GASBjtt6iERCAJ93yommPmz62fb45oFIXHEZ3u9bfJEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tokenizer/token": "^0.3.0", + "ieee754": "^1.2.1" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true, + "license": "MIT" + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/uid": { + "version": "2.0.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/uid/-/uid-2.0.2.tgz", + "integrity": "sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lukeed/csprng": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/uint8array-extras": { + "version": "1.4.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/uint8array-extras/-/uint8array-extras-1.4.0.tgz", + "integrity": "sha512-ZPtzy0hu4cZjv3z5NW9gfKnNLjoz4y6uv4HlelAjDK7sY/xOkKZv9xK/WQpcsBB3jEybChz9DPC2U/+cusjJVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://nexus.interhyp-intern.de/repository/npm-public/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..edba8c5 --- /dev/null +++ b/package.json @@ -0,0 +1,16 @@ +{ + "name": "metadata-service-api", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "api": "npx @openapitools/openapi-generator-cli generate" + }, + "keywords": [], + "author": "", + "license": "ISC", + "packageManager": "pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977", + "devDependencies": { + "@openapitools/openapi-generator-cli": "^2.20.0" + } +} diff --git a/response.go b/response.go new file mode 100644 index 0000000..5235fe6 --- /dev/null +++ b/response.go @@ -0,0 +1,48 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/specs/v1.yaml b/specs/v1.yaml new file mode 100644 index 0000000..bc789c0 --- /dev/null +++ b/specs/v1.yaml @@ -0,0 +1,2437 @@ +openapi: 3.1.0 +info: + title: Metadata + description: 'Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!**' + contact: + name: replace me + url: 'http://domain.com' + email: somebody@some-organisation.com + license: + name: (C) 2022 - Some Organisation + url: 'https://www.some-organisation.com/' + version: v1 +paths: + /rest/api/v1/owners: + get: + operationId: getOwners + summary: get owners + description: 'Obtains all owners. Currently, no filtering is available.' + parameters: [ ] + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerListDto' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + tags: + - /rest/api/v1/owners + '/rest/api/v1/owners/{owner}': + get: + operationId: getOwner + summary: get a single owner by alias + description: Obtains owner information for a single owner. + parameters: + - name: owner + in: path + required: true + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerDto' + '404': + description: Owner not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + tags: + - /rest/api/v1/owners + post: + operationId: createOwner + summary: create a new owner with a given alias + description: Create a new owner. + parameters: + - name: owner + in: path + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerCreateDto' + responses: + '201': + description: Created + headers: + Location: + schema: + type: string + example: /rest/api/v1/owners/some-owner + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerDto' + '400': + description: 'Unable to parse input (invalid owner alias format, or the body failed to validate)' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '401': + description: Unauthorized (aka unauthenticated) - you need to provide the Authorization header with a bearer token + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '403': + description: Forbidden (aka unauthorized) - your bearer token did not grant you access to this operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '409': + description: Conflict - this owner alias already exists + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerDto' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '502': + description: Bad gateway - a downstream error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + security: + - bearerAuth: [ ] + - basicAuth: [ ] + tags: + - /rest/api/v1/owners + put: + operationId: updateOwner + summary: update an existing owner with a given alias + description: Update an owner. + parameters: + - name: owner + in: path + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerDto' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerDto' + '400': + description: Unable to parse input (the body failed to validate) + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '401': + description: Unauthorized (aka unauthenticated) - you need to provide the Authorization header with a bearer token + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '403': + description: Forbidden (aka unauthorized) - your bearer token did not grant you access to this operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '404': + description: Not Found - an owner with this alias does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '409': + description: 'Conflict - concurrent update detected, please retry the operation based on the current commit hash and timestamp' + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerDto' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '502': + description: Bad gateway - a downstream error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + security: + - bearerAuth: [ ] + - basicAuth: [ ] + tags: + - /rest/api/v1/owners + patch: + operationId: patchOwner + summary: patch an existing owner with a given alias + description: Patch an owner. + parameters: + - name: owner + in: path + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerPatchDto' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerDto' + '400': + description: Unable to parse input (the body failed to validate) + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '401': + description: Unauthorized (aka unauthenticated) - you need to provide the Authorization header with a bearer token + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '403': + description: Forbidden (aka unauthorized) - your bearer token did not grant you access to this operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '404': + description: Not Found - an owner with this alias does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '409': + description: 'Conflict - concurrent update detected, please retry the operation based on the current commit hash and timestamp' + content: + application/json: + schema: + $ref: '#/components/schemas/OwnerDto' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '502': + description: Bad gateway - a downstream error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + security: + - bearerAuth: [ ] + - basicAuth: [ ] + tags: + - /rest/api/v1/owners + delete: + operationId: deleteOwner + summary: delete the owner with a given alias + description: Delete an owner - cannot have any services or repositories left + parameters: + - name: owner + in: path + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DeletionDto' + responses: + '204': + description: No Content - successfully deleted + '400': + description: Unable to parse input (the body failed to validate) + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '401': + description: Unauthorized (aka unauthenticated) - you need to provide the Authorization header with a bearer token + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '403': + description: Forbidden (aka unauthorized) - your bearer token did not grant you access to this operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '404': + description: Not Found - an owner with this alias does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '409': + description: Conflict - this owner still owns something and cannot be deleted + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '502': + description: Bad gateway - a downstream error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + security: + - bearerAuth: [ ] + - basicAuth: [ ] + tags: + - /rest/api/v1/owners + /rest/api/v1/services: + get: + operationId: getServices + summary: get services + description: 'Obtains the list of services, possibly filtered by an owner alias.' + parameters: + - name: owner + in: query + description: 'Allows filtering the output by owner alias. Valid aliases match `^[a-z](-?[a-z0-9]+)*$`.' + required: false + schema: + type: string + example: some-owner + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceListDto' + '404': + description: Owner not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + tags: + - /rest/api/v1/services + '/rest/api/v1/services/{service}': + get: + operationId: getService + summary: get a single service by name + parameters: + - name: service + in: path + description: 'The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`.' + required: true + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDto' + '404': + description: Service not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + tags: + - /rest/api/v1/services + post: + operationId: registerService + summary: register a new service with the given name + description: Register a new service in the metadata. + parameters: + - name: service + in: path + description: 'The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`.' + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceCreateDto' + responses: + '201': + description: Created + headers: + Location: + schema: + type: string + example: /rest/api/v1/services/unicorn-finder-service + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDto' + '400': + description: 'Unable to parse input (invalid service name format, or the body failed to validate)' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '401': + description: Unauthorized (aka unauthenticated) - you need to provide the Authorization header with a bearer token + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '403': + description: Forbidden (aka unauthorized) - your bearer token did not grant you access to this operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '409': + description: Conflict - this service name already exists (may be under a different owner - service names are globally unique) + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDto' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '502': + description: Bad gateway - a downstream error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + security: + - bearerAuth: [ ] + - basicAuth: [ ] + tags: + - /rest/api/v1/services + put: + operationId: updateService + summary: update an existing service with the given name + description: Update a service. + parameters: + - name: service + in: path + description: 'The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`.' + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDto' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDto' + '400': + description: Unable to parse input (the body failed to validate) + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '401': + description: Unauthorized (aka unauthenticated) - you need to provide the Authorization header with a bearer token + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '403': + description: Forbidden (aka unauthorized) - your bearer token did not grant you access to this operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '404': + description: Not Found - a service with this name does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '409': + description: 'Conflict - concurrent update detected, please retry the operation based on the current commit hash and timestamp' + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDto' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '502': + description: Bad gateway - a downstream error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + security: + - bearerAuth: [ ] + - basicAuth: [ ] + tags: + - /rest/api/v1/services + patch: + operationId: patchService + summary: patch an existing service with the given name + description: Patch a service. + parameters: + - name: service + in: path + description: 'The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`.' + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ServicePatchDto' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDto' + '400': + description: Unable to parse input (the body failed to validate) + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '401': + description: Unauthorized (aka unauthenticated) - you need to provide the Authorization header with a bearer token + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '403': + description: Forbidden (aka unauthorized) - your bearer token did not grant you access to this operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '404': + description: Not Found - a service with this name does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '409': + description: 'Conflict - concurrent update detected, please retry the operation based on the current commit hash and timestamp' + content: + application/json: + schema: + $ref: '#/components/schemas/ServiceDto' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '502': + description: Bad gateway - a downstream error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + security: + - bearerAuth: [ ] + - basicAuth: [ ] + tags: + - /rest/api/v1/services + delete: + operationId: deleteService + summary: delete the service with a given name + description: Delete a service. Will not delete associated repositories from metadata. + parameters: + - name: service + in: path + description: 'The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`.' + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DeletionDto' + responses: + '204': + description: No Content - successfully deleted + '400': + description: Unable to parse input (the body failed to validate) + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '401': + description: Unauthorized (aka unauthenticated) - you need to provide the Authorization header with a bearer token + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '403': + description: Forbidden (aka unauthorized) - your bearer token did not grant you access to this operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '404': + description: Not Found - a service with this name does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '409': + description: 'Conflict - concurrent update detected, git change could not be pushed. Please retry the operation based on the current data' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '502': + description: Bad gateway - a downstream error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + security: + - bearerAuth: [ ] + - basicAuth: [ ] + tags: + - /rest/api/v1/services + '/rest/api/v1/services/{service}/promoters': + get: + operationId: getServicePromoters + summary: get all users who may promote a service + parameters: + - name: service + in: path + description: 'The (globally unique) name of the service, must match `^[a-z](-?[a-z0-9]+)*$`.' + required: true + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/ServicePromotersDto' + '404': + description: Service not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + tags: + - /rest/api/v1/services + /rest/api/v1/repositories: + get: + operationId: getRepositoriesOfOwner + summary: get repositories + description: 'Obtain a list of repositories, potentially filtered by owner alias or service name' + parameters: + - name: url + in: query + description: 'Optional - allows filtering the output by repository url. Must match `^[a-z](-?:?@?.?\/?[a-z0-9]+)*$`.' + required: false + schema: + type: string + example: git@github.com:some-org/some-repo.git + - name: owner + in: query + description: 'Optional - the alias of an owner. If present, only repositories with this owner are returned. Must match `^[a-z](-?[a-z0-9]+)*$`.' + required: false + schema: + type: string + example: some-owner + - name: service + in: query + description: 'Optional - the name of a service. If present, only repositories referenced by the given service are returned. Must match `^[a-z](-?[a-z0-9]+)*$`.' + required: false + schema: + type: string + example: unicorn-finder-service + - name: name + in: query + description: 'Optional - allows filtering the output by repository name (the first part of the key before the .). Must match `^[a-z](-?[a-z0-9]+)*$`.' + required: false + schema: + type: string + example: some-service + - name: type + in: query + description: 'Optional - allows filtering the output by repository type (the second part of the key after the .). Must currently be one of api, helm-chart, helm-deployment, implementation, terraform-module, javascript-module.' + required: false + schema: + type: string + example: helm-chart + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryListDto' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + tags: + - /rest/api/v1/repositories + '/rest/api/v1/repositories/{repository}': + get: + operationId: getRepository + summary: get a single repository by key + parameters: + - name: repository + in: path + required: true + schema: + type: string + example: unicorn-finder-service.implementation + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryDto' + '404': + description: Owner or repository not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + tags: + - /rest/api/v1/repositories + post: + operationId: registerRepository + summary: register a new repository with the given key + description: Register a new repository in the metadata. Note that this does not actually create it. + parameters: + - name: repository + in: path + required: true + schema: + type: string + example: unicorn-finder-service.implementation + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryCreateDto' + responses: + '201': + description: Created + headers: + Location: + schema: + type: string + example: /rest/api/v1/repositories/unicorn-finder-service.implementation + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryDto' + '400': + description: 'Unable to parse input (invalid repository key format, or the body failed to validate)' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '401': + description: Unauthorized (aka unauthenticated) - you need to provide the Authorization header with a bearer token + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '403': + description: Forbidden (aka unauthorized) - your bearer token did not grant you access to this operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '409': + description: Conflict - this repository key already exists (may be under a different owner - repository keys are globally unique) + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryDto' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '502': + description: Bad gateway - a downstream error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + security: + - bearerAuth: [ ] + - basicAuth: [ ] + tags: + - /rest/api/v1/repositories + put: + operationId: updateRepository + summary: update an existing repository with the given key + description: Update a repository + parameters: + - name: repository + in: path + required: true + schema: + type: string + example: unicorn-finder-service.implementation + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryDto' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryDto' + '400': + description: Unable to parse input (the body failed to validate) + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '401': + description: Unauthorized (aka unauthenticated) - you need to provide the Authorization header with a bearer token + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '403': + description: Forbidden (aka unauthorized) - your bearer token did not grant you access to this operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '404': + description: Not Found - a repository with this key does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '409': + description: 'Conflict - concurrent update detected, please retry the operation based on the current commit hash and timestamp, or you tried to move a repository to another owner while a service refers to it, in this case, please move the service instead' + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryDto' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '502': + description: Bad gateway - a downstream error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + security: + - bearerAuth: [ ] + - basicAuth: [ ] + tags: + - /rest/api/v1/repositories + patch: + operationId: patchRepository + summary: patch an existing repository with the given key + description: Patch a repository. + parameters: + - name: repository + in: path + required: true + schema: + type: string + example: unicorn-finder-service.implementation + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryPatchDto' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryDto' + '400': + description: Unable to parse input (the body failed to validate) + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '401': + description: Unauthorized (aka unauthenticated) - you need to provide the Authorization header with a bearer token + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '403': + description: Forbidden (aka unauthorized) - your bearer token did not grant you access to this operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '404': + description: Not Found - a repository with this key does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '409': + description: 'Conflict - concurrent update detected, please retry the operation based on the current commit hash and timestamp' + content: + application/json: + schema: + $ref: '#/components/schemas/RepositoryDto' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '502': + description: Bad gateway - a downstream error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + security: + - bearerAuth: [ ] + - basicAuth: [ ] + tags: + - /rest/api/v1/repositories + delete: + operationId: removeRepository + summary: remove the repository with the given key + description: 'Delete a repository from metadata. Will not delete the actual repository, just the metadata.' + parameters: + - name: repository + in: path + required: true + schema: + type: string + example: unicorn-finder-service.implementation + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/DeletionDto' + responses: + '204': + description: No Content - successfully deleted + '400': + description: Unable to parse input (the body failed to validate) + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '401': + description: Unauthorized (aka unauthenticated) - you need to provide the Authorization header with a bearer token + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '403': + description: Forbidden (aka unauthorized) - your bearer token did not grant you access to this operation + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '404': + description: Not Found - a repository with this key does not exist + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '409': + description: 'Conflict - concurrent update detected, git change could not be pushed. Please retry the operation based on the current data' + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '500': + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + '502': + description: Bad gateway - a downstream error occurred + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorDto' + security: + - bearerAuth: [ ] + - basicAuth: [ ] + tags: + - /rest/api/v1/repositories + /health: + get: + operationId: getHealth + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/HealthComponent' + '500': + description: Internal Server Error + content: + '*/*': + schema: + $ref: '#/components/schemas/ErrorDto' + tags: + - management + /management/health: + get: + operationId: getHealth_1 + responses: + '200': + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/HealthComponent' + '500': + description: Internal Server Error + content: + '*/*': + schema: + $ref: '#/components/schemas/ErrorDto' + tags: + - management + /webhooks/vcs/github: + post: + tags: + - webhooks + operationId: postWebhook + requestBody: + required: true + content: + application/json: + schema: + type: object + responses: + '204': + description: Success + '400': + description: Bad Request + '404': + description: Deployment Repository or Git Reference Not found + '422': + description: Bad Deployment Repository + '500': + description: Internal Server Error + content: + "*/*": + schema: + "$ref": "#/components/schemas/ErrorDto" +components: + schemas: + OwnerDto: + type: object + properties: + contact: + description: The contact information of the owner + type: string + examples: + - squad@some-organisation.com + teamsChannelURL: + description: The teams channel url information of the owner + type: string + examples: + - 'https://teams.microsoft.com/l/channel/.....' + productOwner: + description: The product owner of this owner space + type: string + examples: + - kschlangenheld + members: + description: A list of users which constitute this owner + type: array + items: + type: string + groups: + description: 'Collection of arbitrary user groups which can be referenced in service configurations. Map of string (group name e.g. some-owner) of strings (list of usernames), one username for each group is required.' + type: object + examples: + - some-owner: { } + additionalProperties: + type: array + items: + type: string + promoters: + description: A list of users that are allowed to promote services in this owner space + type: array + items: + type: string + description: The username of a user allowed to promote services in this owner space + examples: + - kschlangenheld + examples: + - - kschlangenheld + - someotheruser + defaultJiraProject: + description: The default jira project that is used by this owner space + type: string + examples: + - LELTEC + timeStamp: + description: 'ISO-8601 UTC date time at which this information was originally committed. When sending an update, include the original timestamp you got so we can detect concurrent updates.' + type: string + examples: + - '2022-04-18T14:22:38Z' + commitHash: + description: 'The git commit hash this information was originally committed under. When sending an update, include the original commitHash you got so we can detect concurrent updates.' + type: string + examples: + - 6c8ac2c35791edf9979623c717a243fc53400000 + jiraIssue: + description: 'The jira issue to use for committing a change, or the last jira issue used.' + type: string + examples: + - ISSUE-0000 + displayName: + description: 'A display name of the owner, to be presented in user interfaces instead of the owner''s name, when available' + type: string + examples: + - Owner Display Name + links: + type: array + items: + $ref: '#/components/schemas/Link' + required: + - contact + - timeStamp + - commitHash + - jiraIssue + OwnerCreateDto: + type: object + properties: + contact: + description: The contact information of the owner + type: string + examples: + - squad@some-organisation.com + teamsChannelURL: + description: The teams channel url information of the owner + type: string + examples: + - 'https://teams.microsoft.com/l/channel/.....' + productOwner: + description: The product owner of this owner space + type: string + examples: + - kschlangenheld + promoters: + description: A list of users that are allowed to promote services in this owner space + type: array + items: + type: string + description: The username of a user allowed to promote services in this owner space + examples: + - kschlangenheld + examples: + - - kschlangenheld + - someotheruser + members: + description: A list of users which constitute this owner + type: array + items: + type: string + groups: + description: 'Map of string (group name e.g. some-owner) of strings (list of usernames), one username for each group is required.' + type: object + examples: + - some-owner: + - someotheruser + additionalProperties: + type: array + items: + type: string + defaultJiraProject: + description: The default jira project that is used by this owner space + type: string + examples: + - LELTEC + jiraIssue: + description: 'The jira issue to use for committing a change, or the last jira issue used.' + type: string + examples: + - ISSUE-0000 + displayName: + description: 'A display name of the owner, to be presented in user interfaces instead of the owner''s name, when available' + type: string + examples: + - Owner Display Name + links: + type: array + items: + $ref: '#/components/schemas/Link' + required: + - contact + - jiraIssue + OwnerPatchDto: + type: object + properties: + contact: + description: The contact information of the owner + type: string + examples: + - squad@some-organisation.com + teamsChannelURL: + description: The teams channel url information of the owner + type: string + examples: + - 'https://teams.microsoft.com/l/channel/.....' + productOwner: + description: The product owner of this owner space + type: string + examples: + - kschlangenheld + members: + description: A list of users which constitute this owner + type: array + items: + type: string + groups: + description: 'Map of string (group name e.g. some-owner) of strings (list of usernames), one username for each group is required.' + type: object + examples: + - some-owner: { } + additionalProperties: + type: array + items: + type: string + promoters: + description: A list of users that are allowed to promote services in this owner space + type: array + items: + type: string + description: The username of a user allowed to promote services in this owner space + examples: + - kschlangenheld + examples: + - - kschlangenheld + - someotheruser + defaultJiraProject: + description: The default jira project that is used by this owner space + type: string + examples: + - LELTEC + timeStamp: + description: 'ISO-8601 UTC date time at which this information was originally committed. When sending an update, include the original timestamp you got so we can detect concurrent updates.' + type: string + examples: + - '2022-04-18T14:22:38Z' + commitHash: + description: 'The git commit hash this information was originally committed under. When sending an update, include the original commitHash you got so we can detect concurrent updates.' + type: string + examples: + - 6c8ac2c35791edf9979623c717a243fc53400000 + jiraIssue: + description: 'The jira issue to use for committing a change, or the last jira issue used.' + type: string + examples: + - ISSUE-0000 + displayName: + description: 'A display name of the owner, to be presented in user interfaces instead of the owner''s name, when available' + type: string + examples: + - Owner Display Name + links: + type: array + items: + $ref: '#/components/schemas/Link' + required: + - timeStamp + - commitHash + - jiraIssue + OwnerListDto: + type: object + properties: + owners: + type: object + examples: + - some-owner: + contact: squad@some-organisation.com + productOwner: kschlangenheld + defaultJiraProject: LELTEC + timeStamp: '2022-04-18T14:22:38Z' + additionalProperties: + $ref: '#/components/schemas/OwnerDto' + timeStamp: + description: ISO-8601 UTC date time at which the list of owners was obtained from service-metadata + type: string + examples: + - '2022-04-18T14:22:38Z' + required: + - owners + - timeStamp + ServiceDto: + type: object + properties: + owner: + description: 'The alias of the service owner. Note, an update with changed owner will move the service and any associated repositories to the new owner, but of course this will not move e.g. Jenkins jobs. That''s your job.' + type: string + examples: + - some-owner + description: + description: A short description of the functionality of the service. + type: string + quicklinks: + description: A list of quicklinks related to the service + type: array + items: + $ref: '#/components/schemas/Quicklink' + examples: + - - url: /swagger-ui/index.html + title: SwaggerUI + repositories: + description: 'The keys of repositories associated with the service. When sending an update, they must refer to repositories that belong to this service, or the update will fail' + type: array + items: + type: string + description: The key of a repository associated with the service + examples: + - unicorn-finder-service.implementation + alertTarget: + description: The default channel used to send any alerts of the service to. Can be an email address or a Teams webhook URL + type: string + examples: + - somebody@some-organisation.com + operationType: + description: 'The operation type of the service. ''WORKLOAD'' follows the default deployment strategy of one instance per environment, ''PLATFORM'' one instance per cluster or node and ''APPLICATION'' is a standalone application that is not deployed via the common strategies.' + type: string + default: WORKLOAD + x-extensible-enum: + - WORKLOAD + - PLATFORM + - APPLICATION + internetExposed: + description: The value defines if the service is available from the internet and the time period in which security holes must be processed. + type: boolean + tags: + type: array + items: + type: string + examples: + - - some-tag + - other-tag + labels: + type: object + examples: + - some-key: some-value + other-key: other-value + additionalProperties: + type: string + spec: + $ref: '#/components/schemas/ServiceSpecDto' + postPromotes: + description: Post promote dependencies. + $ref: '#/components/schemas/PostPromote' + timeStamp: + description: 'ISO-8601 UTC date time at which this information was originally committed. When sending an update, include the original timestamp you got so we can detect concurrent updates.' + type: string + examples: + - '2022-04-18T14:22:38Z' + commitHash: + description: 'The git commit hash this information was originally committed under. When sending an update, include the original commitHash you got so we can detect concurrent updates.' + type: string + examples: + - 6c8ac2c35791edf9979623c717a243fc53400000 + jiraIssue: + description: 'The jira issue to use for committing a change, or the last jira issue used.' + type: string + examples: + - ISSUE-0000 + lifecycle: + description: 'The current phase of the service''s development. A service usually starts off as ''experimental'', then becomes ''operational'' (i. e. can be reliably used and/or consumed). Once ''deprecated'', the service doesn’t guarantee reliable use/consumption any longer and if ''decommissionable'', the service will soon cease to exist.' + type: string + examples: + - operational + enum: + - experimental + - operational + - deprecated + - decommissionable + required: + - owner + - quicklinks + - repositories + - alertTarget + - timeStamp + - commitHash + - jiraIssue + ServiceCreateDto: + type: object + properties: + owner: + description: 'The alias of the service owner. Note, an update with changed owner will move the service and any associated repositories to the new owner, but of course this will not move e.g. Jenkins jobs. That''s your job.' + type: string + examples: + - some-owner + description: + description: A short description of the functionality of the service. + type: string + quicklinks: + description: A list of quicklinks related to the service + type: array + items: + $ref: '#/components/schemas/Quicklink' + examples: + - - url: /swagger-ui/index.html + title: SwaggerUI + repositories: + description: 'The keys of repositories associated with the service. When sending an update, they must refer to repositories that belong to this service, or the update will fail' + type: array + items: + type: string + description: The key of a repository associated with the service + examples: + - unicorn-finder-service.implementation + alertTarget: + description: The default channel used to send any alerts of the service to. Can be an email address or a Teams webhook URL + type: string + examples: + - somebody@some-organisation.com + operationType: + description: 'The operation type of the service. ''WORKLOAD'' follows the default deployment strategy of one instance per environment, ''PLATFORM'' one instance per cluster or node and ''APPLICATION'' is a standalone application that is not deployed via the common strategies.' + type: string + default: WORKLOAD + x-extensible-enum: + - WORKLOAD + - PLATFORM + - APPLICATION + internetExposed: + description: The value defines if the service is available from the internet and the time period in which security holes must be processed. + type: boolean + tags: + type: array + items: + type: string + examples: + - - some-tag + - other-tag + labels: + type: object + examples: + - some-key: some-value + other-key: other-value + additionalProperties: + type: string + spec: + $ref: '#/components/schemas/ServiceSpecDto' + postPromotes: + description: Post promote dependencies. + $ref: '#/components/schemas/PostPromote' + jiraIssue: + description: 'The jira issue to use for committing a change, or the last jira issue used.' + type: string + examples: + - ISSUE-0000 + required: + - owner + - quicklinks + - repositories + - alertTarget + - jiraIssue + ServicePatchDto: + type: object + properties: + owner: + description: 'The alias of the service owner. Note, a patch with changed owner will move the service and any associated repositories to the new owner, but of course this will not move e.g. Jenkins jobs. That''s your job.' + type: string + examples: + - some-owner + description: + description: A short description of the functionality of the service. + type: string + quicklinks: + description: A list of quicklinks related to the service + type: array + items: + $ref: '#/components/schemas/Quicklink' + examples: + - - url: /swagger-ui/index.html + title: SwaggerUI + repositories: + description: 'The keys of repositories associated with the service. When sending an update, they must refer to repositories that belong to this service, or the update will fail' + type: array + items: + type: string + description: The key of a repository associated with the service + examples: + - unicorn-finder-service.implementation + alertTarget: + description: The default channel used to send any alerts of the service to. Can be an email address or a Teams webhook URL + type: string + examples: + - somebody@some-organisation.com + operationType: + description: 'The operation type of the service. ''WORKLOAD'' follows the default deployment strategy of one instance per environment, ''PLATFORM'' one instance per cluster or node and ''APPLICATION'' is a standalone application that is not deployed via the common strategies.' + type: string + default: WORKLOAD + x-extensible-enum: + - WORKLOAD + - PLATFORM + - APPLICATION + internetExposed: + description: The value defines if the service is available from the internet and the time period in which security holes must be processed. + type: boolean + tags: + type: array + items: + type: string + examples: + - - some-tag + - other-tag + labels: + type: object + examples: + - some-key: some-value + other-key: other-value + additionalProperties: + type: string + spec: + $ref: '#/components/schemas/ServiceSpecDto' + postPromotes: + description: Post promote dependencies. + $ref: '#/components/schemas/PostPromote' + timeStamp: + description: 'ISO-8601 UTC date time at which this information was originally committed. When sending an update, include the original timestamp you got so we can detect concurrent updates.' + type: string + examples: + - '2022-04-18T14:22:38Z' + commitHash: + description: 'The git commit hash this information was originally committed under. When sending an update, include the original commitHash you got so we can detect concurrent updates.' + type: string + examples: + - 6c8ac2c35791edf9979623c717a243fc53400000 + jiraIssue: + description: 'The jira issue to use for committing a change, or the last jira issue used.' + type: string + examples: + - ISSUE-0000 + lifecycle: + description: 'The current phase of the service''s development. A service usually starts off as ''experimental'', then becomes ''operational'' (i. e. can be reliably used and/or consumed). Once ''deprecated'', the service doesn’t guarantee reliable use/consumption any longer.' + type: string + examples: + - operational + enum: + - experimental + - operational + - deprecated + required: + - timeStamp + - commitHash + - jiraIssue + ServiceListDto: + type: object + properties: + services: + type: object + examples: + - unicorn-finder-service: + quicklinks: [ ] + repositories: + - unicorn-finder-service.implementation + - unicorn-finder-service.helm-deployment + alertTarget: somebody@some-organisation.com + operationType: WORKLOAD + timeStamp: '2022-04-18T14:22:38Z' + additionalProperties: + $ref: '#/components/schemas/ServiceDto' + timeStamp: + description: ISO-8601 UTC date time at which the list of services was obtained from service-metadata + type: string + examples: + - '2022-04-18T14:22:38Z' + required: + - services + - timeStamp + ServicePromotersDto: + type: object + properties: + promoters: + type: array + items: + type: string + examples: + - - user1 + - user2 + required: + - promoters + ServiceSpecDto: + type: object + properties: + system: + description: A reference to the system that the component belongs to + type: string + examples: + - some-system + dependsOn: + description: A relation denoting a dependency on another entity + type: array + items: + type: string + examples: + - - some-service + - other-service + providesApis: + description: 'A relation with an API, provided by this entity' + type: array + items: + type: string + examples: + - - some-api + consumesApis: + description: 'A relation with an API, consumed by this entity' + type: array + items: + type: string + examples: + - - some-api + - other-api + PostPromote: + type: object + properties: + binaries: + type: array + items: + $ref: '#/components/schemas/Binary' + Binary: + type: object + description: Parameters to identify a binary in e.g. nexus + required: + - groupId + - artifactId + - versionPrefix + properties: + groupId: + description: The group id of binary + type: string + artifactId: + description: The artifact id of binary + type: string + versionPrefix: + description: The version prefix of binary + type: string + classifier: + description: The classifier of binary + type: string + fileType: + description: The file type of binary e.g. tar.gz + type: string + Notification: + description: Schema of the Dto sent to all configured downstreams upon a change of service. + type: object + properties: + name: + description: name of the service that was updated + type: string + event: + type: string + enum: + - CREATED + - MODIFIED + - DELETED + type: + type: string + enum: + - Owner + - Service + - Repository + payload: + type: object + maxProperties: 1 + minProperties: 1 + properties: + Owner: + $ref: '#/components/schemas/OwnerDto' + Service: + $ref: '#/components/schemas/ServiceDto' + Repository: + $ref: '#/components/schemas/RepositoryDto' + required: + - name + - type + - event + Quicklink: + example: + url: /swagger-ui/index.html + title: SwaggerUI + description: Displays the frontend for the API. + allOf: + - $ref: '#/components/schemas/Link' + - type: object + properties: + description: + type: string + Link: + description: 'A link ' + type: object + properties: + url: + type: string + title: + type: string + examples: + - url: /swagger-ui/index.html + title: SwaggerUI + RepositoryDto: + type: object + properties: + type: + description: The type of the repository as determined by its key. + type: string + examples: + - none + - implementation + - helm-deployment + owner: + description: The alias of the repository owner + type: string + examples: + - some-owner + description: + type: string + url: + type: string + mainline: + type: string + generator: + description: the generator used for the initial contents of this repository + type: string + examples: + - java-spring-cloud + configuration: + $ref: '#/components/schemas/RepositoryConfigurationDto' + timeStamp: + description: 'ISO-8601 UTC date time at which this information was originally committed. When sending an update, include the original timestamp you got so we can detect concurrent updates.' + type: string + examples: + - '2022-04-18T14:22:38Z' + commitHash: + description: 'The git commit hash this information was originally committed under. When sending an update, include the original commitHash you got so we can detect concurrent updates.' + type: string + examples: + - 6c8ac2c35791edf9979623c717a243fc53400000 + jiraIssue: + description: 'The jira issue to use for committing a change, or the last jira issue used.' + type: string + examples: + - ISSUE-0000 + labels: + description: A map of arbitrary string labels attached to this repository. + type: object + examples: + - some-key: some-value + other-key: other-value + additionalProperties: + type: string + required: + - owner + - url + - mainline + - timeStamp + - commitHash + - jiraIssue + RepositoryCreateDto: + type: object + properties: + owner: + description: The alias of the repository owner + type: string + examples: + - some-owner + url: + type: string + mainline: + type: string + generator: + description: the generator used for the initial contents of this repository + type: string + examples: + - java-spring-cloud + configuration: + $ref: '#/components/schemas/RepositoryConfigurationDto' + jiraIssue: + description: 'The jira issue to use for committing a change, or the last jira issue used.' + type: string + examples: + - ISSUE-0000 + labels: + description: A map of arbitrary string labels attached to this repository. + type: object + examples: + - some-key: some-value + other-key: other-value + additionalProperties: + type: string + required: + - owner + - url + - mainline + - jiraIssue + RepositoryPatchDto: + type: object + properties: + owner: + description: The alias of the repository owner + type: string + examples: + - some-owner + url: + type: string + mainline: + type: string + generator: + description: the generator used for the initial contents of this repository + type: string + examples: + - java-spring-cloud + configuration: + $ref: '#/components/schemas/RepositoryConfigurationPatchDto' + timeStamp: + description: 'ISO-8601 UTC date time at which this information was originally committed. When sending an update, include the original timestamp you got so we can detect concurrent updates.' + type: string + examples: + - '2022-04-18T14:22:38Z' + commitHash: + description: 'The git commit hash this information was originally committed under. When sending an update, include the original commitHash you got so we can detect concurrent updates.' + type: string + examples: + - 6c8ac2c35791edf9979623c717a243fc53400000 + jiraIssue: + description: 'The jira issue to use for committing a change, or the last jira issue used.' + type: string + examples: + - ISSUE-0000 + labels: + description: A map of arbitrary string labels attached to this repository. + type: object + examples: + - some-key: some-value + other-key: other-value + additionalProperties: + type: string + required: + - timeStamp + - commitHash + - jiraIssue + RepositoryListDto: + type: object + properties: + repositories: + type: object + examples: + - unicorn-finder-service.helm-deployment: + url: 'ssh://git@bitbucket.some-organisation.com:7999/UNICORNS/unicorn-finder-service-deployment.git' + mainline: main + configuration: + branchNameRegex: '(testing_[^_-]+_[^-]+$|development.*|production.*|versioncheck.*|renovate.*)' + commitMessageRegex: '(([A-Z][A-Z_0-9]+-[0-9]+)|(Ticket#[0-9]{16})[^0-9]|((SCTASK|INC|RITM|CHG)[0-9]{7}))(.|\n)*' + commitMessageType: DEFAULT + requireIssue: true + requireSuccessfulBuilds: 1 + requireApprovals: 1 + accessKeys: + - key: DEPLOYMENT + permission: REPO_READ + webhooks: + predefined: + - jenkinsPipeline + additional: + - name: trigger something + url: 'https://somejenkinspipeline' + events: [ ] + approvers: + testing: + - user-one + - user-two + timeStamp: '2022-04-18T14:22:38Z' + unicorn-finder-service.implementation: + url: 'ssh://git@bitbucket.some-organisation.com:7999/UNICORNS/unicorn-finder-service.git' + mainline: master + timeStamp: '2022-04-18T14:22:38Z' + additionalProperties: + $ref: '#/components/schemas/RepositoryDto' + timeStamp: + description: ISO-8601 UTC date time at which the list of repositories was obtained from service-metadata + type: string + examples: + - '2022-04-18T14:22:38Z' + required: + - repositories + - timeStamp + DeletionDto: + type: object + properties: + jiraIssue: + description: The jira issue to use for committing the deletion. + type: string + examples: + - ISSUE-0000 + required: + - jiraIssue + RepositoryConfigurationDto: + description: Attributes to configure the repository. If a configuration exists there are also some configured defaults for the repository. + type: object + properties: + accessKeys: + description: Ssh-Keys configured on the repository. + type: array + items: + $ref: '#/components/schemas/RepositoryConfigurationAccessKeyDto' + mergeConfig: + type: object + properties: + defaultStrategy: + $ref: '#/components/schemas/MergeStrategy' + strategies: + type: array + items: + $ref: '#/components/schemas/MergeStrategy' + defaultTasks: + type: array + items: + $ref: '#/components/schemas/RepositoryConfigurationDefaultTaskDto' + branchNameRegex: + description: Use an explicit branch name regex. + type: string + commitMessageRegex: + description: Use an explicit commit message regex. + type: string + commitMessageType: + description: Adds a corresponding commit message regex. + type: string + enum: + - DEFAULT + - SEMANTIC + - SNOW_AND_INCIDENTS + requireSuccessfulBuilds: + description: Set the required successful builds counter. + type: integer + requireApprovals: + description: Set the required approvals counter. + type: integer + excludeMergeCommits: + description: Exclude merge commits from commit checks. + type: boolean + excludeMergeCheckUsers: + description: Exclude users from commit checks. + type: array + items: + $ref: '#/components/schemas/ExcludeMergeCheckUserDto' + webhooks: + $ref: '#/components/schemas/RepositoryConfigurationWebhooksDto' + approvers: + description: 'Map of string (group name e.g. some-owner) of strings (list of approvers), one approval for each group is required.' + type: object + examples: + - some-owner: { } + additionalProperties: + type: array + items: + type: string + rawApprovers: + description: 'Raw data of approvers' + type: object + examples: + - some-owner: { } + additionalProperties: + type: array + items: + type: string + watchers: + description: 'List of strings (list of watchers, either usernames or group identifier), which are added as reviewers but require no approval.' + type: array + items: + type: string + examples: + - - someUser + - anotherUser + - '@owner.users' + rawWatchers: + description: 'Raw data of watchers' + type: array + items: + type: string + examples: + - - someUser + - anotherUser + - '@owner.users' + archived: + description: Moves the repository into the archive. + type: boolean + unmanaged: + description: 'Repository will not be configured, also not archived.' + type: boolean + refProtections: + $ref: '#/components/schemas/RefProtections' + pullRequests: + $ref: '#/components/schemas/PullRequests' + requireIssue: + description: 'Configures JQL matcher with query: issuetype in (Story, Bug) AND ''Risk Level'' is not EMPTY' + type: boolean + requireConditions: + description: Configuration of conditional builds as map of structs (key name e.g. some-key) of target references. + type: object + examples: + - some-key: + refMatcher: main + additionalProperties: + $ref: '#/components/schemas/ConditionReferenceDto' + actionsAccess: + description: Control how the repository is used by GitHub Actions workflows in other repositories + type: string + enum: + - NONE + - ORGANIZATION + - ENTERPRISE + example: NOT_ACCESSIBLE + RepositoryConfigurationPatchDto: + description: Attributes to configure the repository. If a configuration exists there are also some configured defaults for the repository. + type: object + properties: + accessKeys: + description: Ssh-Keys configured on the repository. + type: array + items: + $ref: '#/components/schemas/RepositoryConfigurationAccessKeyDto' + mergeConfig: + type: object + properties: + defaultStrategy: + $ref: '#/components/schemas/MergeStrategy' + strategies: + type: array + items: + $ref: '#/components/schemas/MergeStrategy' + defaultTasks: + type: array + items: + $ref: '#/components/schemas/RepositoryConfigurationDefaultTaskDto' + branchNameRegex: + description: Use an explicit branch name regex. + type: string + commitMessageRegex: + description: Use an explicit commit message regex. + type: string + commitMessageType: + description: Adds a corresponding commit message regex. + type: string + enum: + - DEFAULT + - SEMANTIC + - SNOW_AND_INCIDENTS + requireSuccessfulBuilds: + description: Set the required successful builds counter. + type: integer + requireApprovals: + description: Set the required approvals counter. + type: integer + excludeMergeCommits: + description: Exclude merge commits from commit checks. + type: boolean + excludeMergeCheckUsers: + description: Exclude users from commit checks. + type: array + items: + $ref: '#/components/schemas/ExcludeMergeCheckUserDto' + webhooks: + $ref: '#/components/schemas/RepositoryConfigurationWebhooksDto' + approvers: + description: 'Map of string (group name e.g. some-owner) of strings (list of approvers), one approval for each group is required.' + type: object + examples: + - some-owner: { } + additionalProperties: + type: array + items: + type: string + watchers: + description: 'List of strings (list of watchers, either usernames or group identifier), which are added as reviewers but require no approval.' + type: array + items: + type: string + examples: + - - someUser + - anotherUser + - '@owner.users' + archived: + description: Moves the repository into the archive. + type: boolean + unmanaged: + description: 'Repository will not be configured, also not archived.' + type: boolean + refProtections: + $ref: '#/components/schemas/RefProtections' + requireIssue: + description: 'Configures JQL matcher with query: issuetype in (Story, Bug) AND ''Risk Level'' is not EMPTY' + type: boolean + requireConditions: + description: Configuration of conditional builds as map of structs (key name e.g. some-key) of target references. + type: object + examples: + - some-key: + refMatcher: main + additionalProperties: + $ref: '#/components/schemas/ConditionReferenceDto' + actionsAccess: + description: Control how the repository is used by GitHub Actions workflows in other repositories + type: string + enum: + - NONE + - ORGANIZATION + - ENTERPRISE + example: NOT_ACCESSIBLE + pullRequests: + $ref: '#/components/schemas/PullRequests' + MergeStrategy: + type: object + properties: + id: + type: string + examples: + - - no-ff + - ff + - ff-only + - squash + - squash-ff-only + - rebase-no-ff + - rebase-ff-only + enum: + - no-ff + - ff + - ff-only + - squash + - squash-ff-only + - rebase-no-ff + - rebase-ff-only + additionalProperties: false + required: + - id + title: Strategy + RepositoryConfigurationAccessKeyDto: + properties: + key: + type: string + data: + type: string + permission: + type: string + enum: + - REPO_READ + - REPO_WRITE + RepositoryConfigurationDefaultTaskDto: + required: + - text + properties: + text: + type: string + ConditionReferenceDto: + description: Configuration of conditional build references. + type: object + properties: + refMatcher: + description: Reference of a branch. + type: string + exemptions: + description: list of users or groups for which this protection does not apply. + type: array + items: + type: string + description: 'A user or group. Groups are denoted by @..' + source: + type: string + description: The expected source for the required conditional build. + required: + - refMatcher + ExcludeMergeCheckUserDto: + type: object + required: [ name ] + properties: + name: + description: Name of merge check exclude user + type: string + RepositoryConfigurationWebhooksDto: + description: Webhooks configured to the repository. + type: object + properties: + predefined: + description: List of predefined webhooks + type: array + items: + type: string + additional: + description: Additional webhooks to be configured. + type: array + items: + $ref: '#/components/schemas/RepositoryConfigurationWebhookDto' + RepositoryConfigurationWebhookDto: + type: object + properties: + name: + type: string + url: + type: string + events: + description: Events the webhook should be triggered with. + type: array + items: + type: string + examples: + - 'repo:refs_changed, repo:modified, ...' + configuration: + type: object + examples: + - 'secret: ''''' + additionalProperties: + type: string + required: + - name + - url + PullRequests: + type: object + description: Configures pull request settings + properties: + allowMergeCommits: + description: Allows merge commits on pull requests + type: boolean + default: true + allowRebaseMerging: + description: Allows rebase merging on pull requests + type: boolean + default: true + RefProtections: + type: object + description: Configures available protections for git refs + properties: + branches: + type: object + properties: + requirePR: + description: Forces creating a PR to update the protected refs. + type: array + items: + $ref: '#/components/schemas/ProtectedRef' + preventAllChanges: + description: Prevents all changes of the protected refs. + type: array + items: + $ref: '#/components/schemas/ProtectedRef' + preventCreation: + description: Prevents creation of the protected refs. + type: array + items: + $ref: '#/components/schemas/ProtectedRef' + preventDeletion: + description: Prevents deletion of the protected refs. + type: array + items: + $ref: '#/components/schemas/ProtectedRef' + preventPush: + description: Prevents pushes to the protected refs. + type: array + items: + $ref: '#/components/schemas/ProtectedRef' + preventForcePush: + description: Prevents force pushes to the protected refs for users with push permission. + type: array + items: + $ref: '#/components/schemas/ProtectedRef' + tags: + type: object + properties: + preventAllChanges: + description: Prevents all changes of the protected refs. + type: array + items: + $ref: '#/components/schemas/ProtectedRef' + preventCreation: + description: Prevents creation of the protected refs. + type: array + items: + $ref: '#/components/schemas/ProtectedRef' + preventDeletion: + description: Prevents deletion of the protected refs. + type: array + items: + $ref: '#/components/schemas/ProtectedRef' + preventForcePush: + description: Prevents force pushes to the protected refs for users with push permission. + type: array + items: + $ref: '#/components/schemas/ProtectedRef' + ProtectedRef: + type: object + required: [ pattern ] + properties: + pattern: + type: string + pattern: '^(?!refs\/(heads|tags)\/).*$' + description: "fnmatch pattern to define protected refs. Must not start with refs/heads/ or refs/tags/. Special value :MAINLINE: matches the currently configured mainline for branch protections." + exemptions: + description: list of users or groups for which this protection does not apply. + type: array + items: + type: string + description: 'A user or a group identifier. Groups are identified by @.. Group identifiers will be resolved for this field during read operations.' + exemptionsRoles: + description: list of group identifiers for which this protection does not apply. This field is read-only and will be filled automatically from the exemptions fields. + type: array + items: + type: string + description: 'A group identifier. Groups are identified by @..' + ErrorDto: + type: object + properties: + details: + type: string + message: + type: string + timestamp: + type: string + format: date-time + HealthComponent: + type: object + properties: + description: + type: string + status: + type: string + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT + basicAuth: + type: http + scheme: basic +tags: + - name: /rest/api/v1/owners + - name: /rest/api/v1/services + - name: /rest/api/v1/repositories + - name: management + - name: webhook diff --git a/static.go b/static.go new file mode 100644 index 0000000..e69a5f1 --- /dev/null +++ b/static.go @@ -0,0 +1,6 @@ +package openapi + +import "embed" + +//go:embed api/openapi.yaml +var APIFs embed.FS diff --git a/utils.go b/utils.go new file mode 100644 index 0000000..953e81a --- /dev/null +++ b/utils.go @@ -0,0 +1,362 @@ +/* +Metadata + +Obtain and manage metadata for owners, services, repositories. Please see [README](https://github.com/Interhyp/metadata-service/blob/main/README.md) for details. **CLIENTS MUST READ!** + +API version: v1 +Contact: somebody@some-organisation.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} \ No newline at end of file