From 8b8489310f70313223bc5020324312dcbb17d3fe Mon Sep 17 00:00:00 2001 From: David Debeau Date: Fri, 2 Aug 2024 09:50:55 -0500 Subject: [PATCH 1/4] Initial provider files --- .gitignore | 3 + code_generator/generator_config.yml | 19 + code_generator/provider_code_spec.json | 52 + code_generator/quay_api.json | 12113 ++++++++++++++++ .../quay_organization/data-source.tf | 3 + examples/main.tf | 16 + examples/provider/provider.tf | 3 + .../resources/quay_organization/import.sh | 2 + .../resources/quay_organization/resource.tf | 4 + generate_quay_api.sh | 6 + go.mod | 88 + go.sum | 277 + .../organization_data_source_gen.go | 32 + internal/provider/helpers.go | 8 + internal/provider/organization_data_source.go | 102 + .../provider/organization_data_source_test.go | 36 + internal/provider/organization_resource.go | 232 + .../provider/organization_resource_test.go | 75 + internal/provider/provider.go | 161 + internal/provider/provider_test.go | 18 + .../organization_resource_gen.go | 32 + main.go | 36 + quay_api/.gitignore | 24 + quay_api/.openapi-generator-ignore | 23 + quay_api/.openapi-generator/FILES | 139 + quay_api/.openapi-generator/VERSION | 1 + quay_api/.travis.yml | 8 + quay_api/README.md | 340 + quay_api/api/openapi.yaml | 9265 ++++++++++++ quay_api/api_appspecifictokens.go | 582 + quay_api/api_build.go | 888 ++ quay_api/api_discovery.go | 165 + quay_api/api_error.go | 172 + quay_api/api_globalmessages.go | 436 + quay_api/api_logs.go | 1522 ++ quay_api/api_manifest.go | 750 + quay_api/api_namespacequota.go | 1994 +++ quay_api/api_organization.go | 1994 +++ quay_api/api_permission.go | 1300 ++ quay_api/api_prototype.go | 600 + quay_api/api_repository.go | 958 ++ quay_api/api_repositorynotification.go | 866 ++ quay_api/api_repotoken.go | 740 + quay_api/api_robot.go | 1756 +++ quay_api/api_search.go | 494 + quay_api/api_superuser.go | 3170 ++++ quay_api/api_tag.go | 652 + quay_api/api_team.go | 1460 ++ quay_api/api_trigger.go | 1046 ++ quay_api/api_user.go | 726 + quay_api/client.go | 721 + quay_api/configuration.go | 218 + quay_api/docs/AddLabel.md | 72 + quay_api/docs/ApiError.md | 171 + quay_api/docs/ApiErrorDescription.md | 93 + quay_api/docs/ApproveServiceKey.md | 56 + quay_api/docs/AppspecifictokensAPI.md | 276 + quay_api/docs/BuildAPI.md | 440 + quay_api/docs/BuildTriggerActivateRequest.md | 77 + quay_api/docs/ChangeVisibility.md | 51 + quay_api/docs/CreateInstallUser.md | 77 + quay_api/docs/CreateMessage.md | 56 + quay_api/docs/CreateMessageMessage.md | 93 + quay_api/docs/CreateRobot.md | 82 + quay_api/docs/CreateServiceKey.md | 150 + quay_api/docs/DiscoveryAPI.md | 73 + quay_api/docs/ErrorAPI.md | 79 + quay_api/docs/ExportLogs.md | 82 + quay_api/docs/GlobalmessagesAPI.md | 202 + quay_api/docs/LogsAPI.md | 667 + quay_api/docs/ManifestAPI.md | 374 + quay_api/docs/NamespacequotaAPI.md | 983 ++ quay_api/docs/NewApp.md | 155 + quay_api/docs/NewNamespaceQuota.md | 51 + quay_api/docs/NewOrg.md | 98 + quay_api/docs/NewOrgQuota.md | 51 + quay_api/docs/NewOrgQuotaLimit.md | 72 + quay_api/docs/NewPrototype.md | 98 + quay_api/docs/NewPrototypeActivatingUser.md | 51 + quay_api/docs/NewPrototypeDelegate.md | 72 + quay_api/docs/NewRepo.md | 119 + quay_api/docs/NewStarredRepository.md | 72 + quay_api/docs/NewToken.md | 51 + quay_api/docs/NewUser.md | 150 + quay_api/docs/NotificationCreateRequest.md | 140 + quay_api/docs/OrganizationAPI.md | 991 ++ quay_api/docs/PermissionAPI.md | 654 + quay_api/docs/PrototypeAPI.md | 294 + quay_api/docs/PrototypeUpdate.md | 51 + quay_api/docs/PutServiceKey.md | 108 + quay_api/docs/RepoUpdate.md | 51 + quay_api/docs/RepositoryAPI.md | 434 + quay_api/docs/RepositoryBuildRequest.md | 212 + quay_api/docs/RepositorynotificationAPI.md | 434 + quay_api/docs/RepotokenAPI.md | 366 + quay_api/docs/RestoreTag.md | 56 + quay_api/docs/RobotAPI.md | 861 ++ quay_api/docs/RunParameters.md | 82 + quay_api/docs/SearchAPI.md | 217 + quay_api/docs/SuperuserAPI.md | 1515 ++ quay_api/docs/TagAPI.md | 305 + quay_api/docs/TeamAPI.md | 740 + quay_api/docs/TeamDescription.md | 77 + quay_api/docs/TeamPermission.md | 51 + quay_api/docs/TokenPermission.md | 51 + quay_api/docs/TriggerAPI.md | 517 + quay_api/docs/UpdateApp.md | 145 + quay_api/docs/UpdateNamespaceQuota.md | 56 + quay_api/docs/UpdateOrg.md | 82 + quay_api/docs/UpdateOrgQuota.md | 56 + quay_api/docs/UpdateOrgQuotaLimit.md | 82 + quay_api/docs/UpdateTrigger.md | 51 + quay_api/docs/UpdateUser.md | 160 + quay_api/docs/UserAPI.md | 338 + quay_api/docs/UserPermission.md | 51 + quay_api/docs/UserView.md | 228 + quay_api/git_push.sh | 57 + quay_api/go.mod | 18 + quay_api/go.sum | 369 + quay_api/model_add_label.go | 187 + quay_api/model_api_error.go | 327 + quay_api/model_api_error_description.go | 216 + quay_api/model_approve_service_key.go | 126 + .../model_build_trigger_activate_request.go | 195 + quay_api/model_change_visibility.go | 158 + quay_api/model_create_install_user.go | 195 + quay_api/model_create_message.go | 125 + quay_api/model_create_message_message.go | 216 + quay_api/model_create_robot.go | 163 + quay_api/model_create_service_key.go | 298 + quay_api/model_export_logs.go | 163 + quay_api/model_new_app.go | 306 + quay_api/model_new_namespace_quota.go | 158 + quay_api/model_new_org.go | 224 + quay_api/model_new_org_quota.go | 158 + quay_api/model_new_org_quota_limit.go | 187 + quay_api/model_new_prototype.go | 222 + .../model_new_prototype_activating_user.go | 158 + quay_api/model_new_prototype_delegate.go | 187 + quay_api/model_new_repo.go | 253 + quay_api/model_new_starred_repository.go | 187 + quay_api/model_new_token.go | 158 + quay_api/model_new_user.go | 298 + quay_api/model_notification_create_request.go | 282 + quay_api/model_prototype_update.go | 158 + quay_api/model_put_service_key.go | 200 + quay_api/model_repo_update.go | 158 + quay_api/model_repository_build_request.go | 348 + quay_api/model_restore_tag.go | 126 + quay_api/model_run_parameters.go | 163 + quay_api/model_team_description.go | 195 + quay_api/model_team_permission.go | 158 + quay_api/model_token_permission.go | 158 + quay_api/model_update_app.go | 290 + quay_api/model_update_namespace_quota.go | 126 + quay_api/model_update_org.go | 163 + quay_api/model_update_org_quota.go | 126 + quay_api/model_update_org_quota_limit.go | 163 + quay_api/model_update_trigger.go | 158 + quay_api/model_update_user.go | 274 + quay_api/model_user_permission.go | 158 + quay_api/model_user_view.go | 409 + quay_api/response.go | 48 + quay_api/test/api_appspecifictokens_test.go | 73 + quay_api/test/api_build_test.go | 107 + quay_api/test/api_discovery_test.go | 36 + quay_api/test/api_error_test.go | 39 + quay_api/test/api_globalmessages_test.go | 60 + quay_api/test/api_logs_test.go | 136 + quay_api/test/api_manifest_test.go | 97 + quay_api/test/api_namespacequota_test.go | 217 + quay_api/test/api_organization_test.go | 237 + quay_api/test/api_permission_test.go | 149 + quay_api/test/api_prototype_test.go | 79 + quay_api/test/api_repository_test.go | 99 + .../test/api_repositorynotification_test.go | 107 + quay_api/test/api_repotoken_test.go | 93 + quay_api/test/api_robot_test.go | 184 + quay_api/test/api_search_test.go | 60 + quay_api/test/api_superuser_test.go | 327 + quay_api/test/api_tag_test.go | 80 + quay_api/test/api_team_test.go | 169 + quay_api/test/api_trigger_test.go | 122 + quay_api/test/api_user_test.go | 85 + quay_api/test/test_helpers.go | 60 + quay_api/utils.go | 362 + templates/index.md.tmpl | 21 + 187 files changed, 73147 insertions(+) create mode 100644 .gitignore create mode 100644 code_generator/generator_config.yml create mode 100644 code_generator/provider_code_spec.json create mode 100644 code_generator/quay_api.json create mode 100644 examples/data-sources/quay_organization/data-source.tf create mode 100644 examples/main.tf create mode 100644 examples/provider/provider.tf create mode 100644 examples/resources/quay_organization/import.sh create mode 100644 examples/resources/quay_organization/resource.tf create mode 100644 generate_quay_api.sh create mode 100644 go.mod create mode 100644 go.sum create mode 100644 internal/datasource_organization/organization_data_source_gen.go create mode 100644 internal/provider/helpers.go create mode 100644 internal/provider/organization_data_source.go create mode 100644 internal/provider/organization_data_source_test.go create mode 100644 internal/provider/organization_resource.go create mode 100644 internal/provider/organization_resource_test.go create mode 100644 internal/provider/provider.go create mode 100644 internal/provider/provider_test.go create mode 100644 internal/resource_organization/organization_resource_gen.go create mode 100644 main.go create mode 100644 quay_api/.gitignore create mode 100644 quay_api/.openapi-generator-ignore create mode 100644 quay_api/.openapi-generator/FILES create mode 100644 quay_api/.openapi-generator/VERSION create mode 100644 quay_api/.travis.yml create mode 100644 quay_api/README.md create mode 100644 quay_api/api/openapi.yaml create mode 100644 quay_api/api_appspecifictokens.go create mode 100644 quay_api/api_build.go create mode 100644 quay_api/api_discovery.go create mode 100644 quay_api/api_error.go create mode 100644 quay_api/api_globalmessages.go create mode 100644 quay_api/api_logs.go create mode 100644 quay_api/api_manifest.go create mode 100644 quay_api/api_namespacequota.go create mode 100644 quay_api/api_organization.go create mode 100644 quay_api/api_permission.go create mode 100644 quay_api/api_prototype.go create mode 100644 quay_api/api_repository.go create mode 100644 quay_api/api_repositorynotification.go create mode 100644 quay_api/api_repotoken.go create mode 100644 quay_api/api_robot.go create mode 100644 quay_api/api_search.go create mode 100644 quay_api/api_superuser.go create mode 100644 quay_api/api_tag.go create mode 100644 quay_api/api_team.go create mode 100644 quay_api/api_trigger.go create mode 100644 quay_api/api_user.go create mode 100644 quay_api/client.go create mode 100644 quay_api/configuration.go create mode 100644 quay_api/docs/AddLabel.md create mode 100644 quay_api/docs/ApiError.md create mode 100644 quay_api/docs/ApiErrorDescription.md create mode 100644 quay_api/docs/ApproveServiceKey.md create mode 100644 quay_api/docs/AppspecifictokensAPI.md create mode 100644 quay_api/docs/BuildAPI.md create mode 100644 quay_api/docs/BuildTriggerActivateRequest.md create mode 100644 quay_api/docs/ChangeVisibility.md create mode 100644 quay_api/docs/CreateInstallUser.md create mode 100644 quay_api/docs/CreateMessage.md create mode 100644 quay_api/docs/CreateMessageMessage.md create mode 100644 quay_api/docs/CreateRobot.md create mode 100644 quay_api/docs/CreateServiceKey.md create mode 100644 quay_api/docs/DiscoveryAPI.md create mode 100644 quay_api/docs/ErrorAPI.md create mode 100644 quay_api/docs/ExportLogs.md create mode 100644 quay_api/docs/GlobalmessagesAPI.md create mode 100644 quay_api/docs/LogsAPI.md create mode 100644 quay_api/docs/ManifestAPI.md create mode 100644 quay_api/docs/NamespacequotaAPI.md create mode 100644 quay_api/docs/NewApp.md create mode 100644 quay_api/docs/NewNamespaceQuota.md create mode 100644 quay_api/docs/NewOrg.md create mode 100644 quay_api/docs/NewOrgQuota.md create mode 100644 quay_api/docs/NewOrgQuotaLimit.md create mode 100644 quay_api/docs/NewPrototype.md create mode 100644 quay_api/docs/NewPrototypeActivatingUser.md create mode 100644 quay_api/docs/NewPrototypeDelegate.md create mode 100644 quay_api/docs/NewRepo.md create mode 100644 quay_api/docs/NewStarredRepository.md create mode 100644 quay_api/docs/NewToken.md create mode 100644 quay_api/docs/NewUser.md create mode 100644 quay_api/docs/NotificationCreateRequest.md create mode 100644 quay_api/docs/OrganizationAPI.md create mode 100644 quay_api/docs/PermissionAPI.md create mode 100644 quay_api/docs/PrototypeAPI.md create mode 100644 quay_api/docs/PrototypeUpdate.md create mode 100644 quay_api/docs/PutServiceKey.md create mode 100644 quay_api/docs/RepoUpdate.md create mode 100644 quay_api/docs/RepositoryAPI.md create mode 100644 quay_api/docs/RepositoryBuildRequest.md create mode 100644 quay_api/docs/RepositorynotificationAPI.md create mode 100644 quay_api/docs/RepotokenAPI.md create mode 100644 quay_api/docs/RestoreTag.md create mode 100644 quay_api/docs/RobotAPI.md create mode 100644 quay_api/docs/RunParameters.md create mode 100644 quay_api/docs/SearchAPI.md create mode 100644 quay_api/docs/SuperuserAPI.md create mode 100644 quay_api/docs/TagAPI.md create mode 100644 quay_api/docs/TeamAPI.md create mode 100644 quay_api/docs/TeamDescription.md create mode 100644 quay_api/docs/TeamPermission.md create mode 100644 quay_api/docs/TokenPermission.md create mode 100644 quay_api/docs/TriggerAPI.md create mode 100644 quay_api/docs/UpdateApp.md create mode 100644 quay_api/docs/UpdateNamespaceQuota.md create mode 100644 quay_api/docs/UpdateOrg.md create mode 100644 quay_api/docs/UpdateOrgQuota.md create mode 100644 quay_api/docs/UpdateOrgQuotaLimit.md create mode 100644 quay_api/docs/UpdateTrigger.md create mode 100644 quay_api/docs/UpdateUser.md create mode 100644 quay_api/docs/UserAPI.md create mode 100644 quay_api/docs/UserPermission.md create mode 100644 quay_api/docs/UserView.md create mode 100644 quay_api/git_push.sh create mode 100644 quay_api/go.mod create mode 100644 quay_api/go.sum create mode 100644 quay_api/model_add_label.go create mode 100644 quay_api/model_api_error.go create mode 100644 quay_api/model_api_error_description.go create mode 100644 quay_api/model_approve_service_key.go create mode 100644 quay_api/model_build_trigger_activate_request.go create mode 100644 quay_api/model_change_visibility.go create mode 100644 quay_api/model_create_install_user.go create mode 100644 quay_api/model_create_message.go create mode 100644 quay_api/model_create_message_message.go create mode 100644 quay_api/model_create_robot.go create mode 100644 quay_api/model_create_service_key.go create mode 100644 quay_api/model_export_logs.go create mode 100644 quay_api/model_new_app.go create mode 100644 quay_api/model_new_namespace_quota.go create mode 100644 quay_api/model_new_org.go create mode 100644 quay_api/model_new_org_quota.go create mode 100644 quay_api/model_new_org_quota_limit.go create mode 100644 quay_api/model_new_prototype.go create mode 100644 quay_api/model_new_prototype_activating_user.go create mode 100644 quay_api/model_new_prototype_delegate.go create mode 100644 quay_api/model_new_repo.go create mode 100644 quay_api/model_new_starred_repository.go create mode 100644 quay_api/model_new_token.go create mode 100644 quay_api/model_new_user.go create mode 100644 quay_api/model_notification_create_request.go create mode 100644 quay_api/model_prototype_update.go create mode 100644 quay_api/model_put_service_key.go create mode 100644 quay_api/model_repo_update.go create mode 100644 quay_api/model_repository_build_request.go create mode 100644 quay_api/model_restore_tag.go create mode 100644 quay_api/model_run_parameters.go create mode 100644 quay_api/model_team_description.go create mode 100644 quay_api/model_team_permission.go create mode 100644 quay_api/model_token_permission.go create mode 100644 quay_api/model_update_app.go create mode 100644 quay_api/model_update_namespace_quota.go create mode 100644 quay_api/model_update_org.go create mode 100644 quay_api/model_update_org_quota.go create mode 100644 quay_api/model_update_org_quota_limit.go create mode 100644 quay_api/model_update_trigger.go create mode 100644 quay_api/model_update_user.go create mode 100644 quay_api/model_user_permission.go create mode 100644 quay_api/model_user_view.go create mode 100644 quay_api/response.go create mode 100644 quay_api/test/api_appspecifictokens_test.go create mode 100644 quay_api/test/api_build_test.go create mode 100644 quay_api/test/api_discovery_test.go create mode 100644 quay_api/test/api_error_test.go create mode 100644 quay_api/test/api_globalmessages_test.go create mode 100644 quay_api/test/api_logs_test.go create mode 100644 quay_api/test/api_manifest_test.go create mode 100644 quay_api/test/api_namespacequota_test.go create mode 100644 quay_api/test/api_organization_test.go create mode 100644 quay_api/test/api_permission_test.go create mode 100644 quay_api/test/api_prototype_test.go create mode 100644 quay_api/test/api_repository_test.go create mode 100644 quay_api/test/api_repositorynotification_test.go create mode 100644 quay_api/test/api_repotoken_test.go create mode 100644 quay_api/test/api_robot_test.go create mode 100644 quay_api/test/api_search_test.go create mode 100644 quay_api/test/api_superuser_test.go create mode 100644 quay_api/test/api_tag_test.go create mode 100644 quay_api/test/api_team_test.go create mode 100644 quay_api/test/api_trigger_test.go create mode 100644 quay_api/test/api_user_test.go create mode 100644 quay_api/test/test_helpers.go create mode 100644 quay_api/utils.go create mode 100644 templates/index.md.tmpl diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fe01f19 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.idea +**/terraform.tfstate +**/terraform.tfstate.* diff --git a/code_generator/generator_config.yml b/code_generator/generator_config.yml new file mode 100644 index 0000000..b1cfd1c --- /dev/null +++ b/code_generator/generator_config.yml @@ -0,0 +1,19 @@ +provider: + name: quay +resources: + organization: + create: + path: /api/v1/organization/ + method: POST + read: + path: /api/v1/organization/{orgname} + method: GET + schema: + attributes: + aliases: + orgname: name + overrides: + name: + description: Organization name + ignores: + - recaptcha_response diff --git a/code_generator/provider_code_spec.json b/code_generator/provider_code_spec.json new file mode 100644 index 0000000..0ee1026 --- /dev/null +++ b/code_generator/provider_code_spec.json @@ -0,0 +1,52 @@ +{ + "provider": { + "name": "quay" + }, + "resources": [ + { + "name": "organization", + "schema": { + "attributes": [ + { + "name": "email", + "string": { + "computed_optional_required": "required", + "description": "Organization contact email" + } + }, + { + "name": "name", + "string": { + "computed_optional_required": "required", + "description": "Organization name" + } + } + ] + } + } + ], + "datasources": [ + { + "name": "organization", + "schema": { + "attributes": [ + { + "name": "email", + "string": { + "computed_optional_required": "computed", + "description": "Organization contact email" + } + }, + { + "name": "name", + "string": { + "computed_optional_required": "required", + "description": "Organization name" + } + } + ] + } + } + ], + "version": "0.1" +} \ No newline at end of file diff --git a/code_generator/quay_api.json b/code_generator/quay_api.json new file mode 100644 index 0000000..a12f811 --- /dev/null +++ b/code_generator/quay_api.json @@ -0,0 +1,12113 @@ +{ + "openapi" : "3.0.1", + "info" : { + "contact" : { + "email" : "admin@example.com" + }, + "description" : "This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations.", + "termsOfService" : "", + "title" : "Quay Frontend", + "version" : "v1" + }, + "servers" : [ { + "url" : "https://quay.example.com/" + } ], + "tags" : [ { + "description" : "Manages app specific tokens for the current user.", + "name" : "appspecifictokens" + }, { + "description" : "Create, list, cancel and get status/logs of repository builds.", + "name" : "build" + }, { + "description" : "API discovery information.", + "name" : "discovery" + }, { + "description" : "Error details API.", + "name" : "error" + }, { + "description" : "Messages API.", + "name" : "globalmessages" + }, { + "description" : "Access usage logs for organizations or repositories.", + "name" : "logs" + }, { + "description" : "Manage the manifests of a repository.", + "name" : "manifest" + }, { + "description" : "", + "name" : "namespacequota" + }, { + "description" : "Manage organizations, members and OAuth applications.", + "name" : "organization" + }, { + "description" : "Manage repository permissions.", + "name" : "permission" + }, { + "description" : "Manage default permissions added to repositories.", + "name" : "prototype" + }, { + "description" : "List, create and manage repositories.", + "name" : "repository" + }, { + "description" : "List, create and manage repository events/notifications.", + "name" : "repositorynotification" + }, { + "description" : "Manage repository access tokens (DEPRECATED).", + "name" : "repotoken" + }, { + "description" : "Manage user and organization robot accounts.", + "name" : "robot" + }, { + "description" : "Conduct searches against all registry context.", + "name" : "search" + }, { + "description" : "Superuser API.", + "name" : "superuser" + }, { + "description" : "Manage the tags of a repository.", + "name" : "tag" + }, { + "description" : "Create, list and manage an organization's teams.", + "name" : "team" + }, { + "description" : "Create, list and manage build triggers.", + "name" : "trigger" + }, { + "description" : "Manage the current user.", + "name" : "user" + }, { + "description" : "", + "name" : "userfiles" + } ], + "paths" : { + "/api/v1/user/apptoken" : { + "get" : { + "description" : "Lists the app specific tokens for the user.", + "operationId" : "listAppTokens", + "parameters" : [ { + "description" : "If true, only returns those tokens expiring soon", + "in" : "query", + "name" : "expiring", + "schema" : { + "type" : "boolean" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "appspecifictokens" ] + }, + "post" : { + "description" : "Create a new app specific token for user.", + "operationId" : "createAppToken", + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/NewToken" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "appspecifictokens" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.appspecifictokens.AppTokens", + "x-path" : "/api/v1/user/apptoken", + "x-tag" : "appspecifictokens" + }, + "/api/v1/user/apptoken/{token_uuid}" : { + "delete" : { + "description" : "Revokes a specific app token for the user.", + "operationId" : "revokeAppToken", + "parameters" : [ { + "description" : "The uuid of the app specific token", + "in" : "path", + "name" : "token_uuid", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "appspecifictokens" ] + }, + "get" : { + "description" : "Returns a specific app token for the user.", + "operationId" : "getAppToken", + "parameters" : [ { + "description" : "The uuid of the app specific token", + "in" : "path", + "name" : "token_uuid", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "appspecifictokens" ] + }, + "x-name" : "endpoints.api.appspecifictokens.AppToken", + "x-path" : "/api/v1/user/apptoken/{token_uuid}", + "x-tag" : "appspecifictokens" + }, + "/api/v1/repository/{repository}/build/" : { + "get" : { + "description" : "Get the list of repository builds.", + "operationId" : "getRepoBuilds", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "Returns all builds since the given unix timecode", + "in" : "query", + "name" : "since", + "schema" : { + "type" : "integer" + } + }, { + "description" : "The maximum number of builds to return", + "in" : "query", + "name" : "limit", + "schema" : { + "type" : "integer" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:read" ] + } ], + "tags" : [ "build" ] + }, + "post" : { + "description" : "Request that a repository be built and pushed from the specified input.", + "operationId" : "requestRepoBuild", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/RepositoryBuildRequest" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:write" ] + } ], + "tags" : [ "build" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.build.RepositoryBuildList", + "x-path" : "/api/v1/repository/{repository}/build/", + "x-tag" : "build" + }, + "/api/v1/repository/{repository}/build/{build_uuid}" : { + "delete" : { + "description" : "Cancels a repository build.", + "operationId" : "cancelRepoBuild", + "parameters" : [ { + "description" : "The UUID of the build", + "in" : "path", + "name" : "build_uuid", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "build" ] + }, + "get" : { + "description" : "Returns information about a build.", + "operationId" : "getRepoBuild", + "parameters" : [ { + "description" : "The UUID of the build", + "in" : "path", + "name" : "build_uuid", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:read" ] + } ], + "tags" : [ "build" ] + }, + "x-name" : "endpoints.api.build.RepositoryBuildResource", + "x-path" : "/api/v1/repository/{repository}/build/{build_uuid}", + "x-tag" : "build" + }, + "/api/v1/repository/{repository}/build/{build_uuid}/status" : { + "get" : { + "description" : "Return the status for the builds specified by the build uuids.", + "operationId" : "getRepoBuildStatus", + "parameters" : [ { + "description" : "The UUID of the build", + "in" : "path", + "name" : "build_uuid", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:read" ] + } ], + "tags" : [ "build" ] + }, + "x-name" : "endpoints.api.build.RepositoryBuildStatus", + "x-path" : "/api/v1/repository/{repository}/build/{build_uuid}/status", + "x-tag" : "build" + }, + "/api/v1/repository/{repository}/build/{build_uuid}/logs" : { + "get" : { + "description" : "Return the build logs for the build specified by the build uuid.", + "operationId" : "getRepoBuildLogs", + "parameters" : [ { + "description" : "The UUID of the build", + "in" : "path", + "name" : "build_uuid", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:read" ] + } ], + "tags" : [ "build" ] + }, + "x-name" : "endpoints.api.build.RepositoryBuildLogs", + "x-path" : "/api/v1/repository/{repository}/build/{build_uuid}/logs", + "x-tag" : "build" + }, + "/api/v1/discovery" : { + "get" : { + "description" : "List all of the API endpoints available in the swagger API format.", + "operationId" : "discovery", + "parameters" : [ { + "description" : "Whether to include internal APIs.", + "in" : "query", + "name" : "internal", + "schema" : { + "type" : "boolean" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "tags" : [ "discovery" ] + }, + "x-name" : "endpoints.api.discovery.DiscoveryResource", + "x-path" : "/api/v1/discovery", + "x-tag" : "discovery" + }, + "/api/v1/error/{error_type}" : { + "get" : { + "description" : "Get a detailed description of the error.", + "operationId" : "getErrorDescription", + "parameters" : [ { + "description" : "The error code identifying the type of error.", + "in" : "path", + "name" : "error_type", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiErrorDescription" + } + } + }, + "description" : "Successful invocation" + } + }, + "tags" : [ "error" ] + }, + "x-name" : "endpoints.api.error.Error", + "x-path" : "/api/v1/error/{error_type}", + "x-tag" : "error" + }, + "/api/v1/messages" : { + "get" : { + "description" : "Return a super users messages.", + "operationId" : "getGlobalMessages", + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "tags" : [ "globalmessages" ] + }, + "post" : { + "description" : "Create a message.", + "operationId" : "createGlobalMessage", + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/CreateMessage" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "globalmessages" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.globalmessages.GlobalUserMessages", + "x-path" : "/api/v1/messages", + "x-tag" : "globalmessages" + }, + "/api/v1/message/{uuid}" : { + "delete" : { + "description" : "Delete a message.", + "operationId" : "deleteGlobalMessage", + "parameters" : [ { + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "globalmessages" ] + }, + "x-name" : "endpoints.api.globalmessages.GlobalUserMessage", + "x-path" : "/api/v1/message/{uuid}", + "x-tag" : "globalmessages" + }, + "/api/v1/repository/{repository}/logs" : { + "get" : { + "description" : "List the logs for the specified repository.", + "operationId" : "listRepoLogs", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The page token for the next page", + "in" : "query", + "name" : "next_page", + "schema" : { + "type" : "string" + } + }, { + "description" : "Latest time for logs. Format: \"%m/%d/%Y\" in UTC.", + "in" : "query", + "name" : "endtime", + "schema" : { + "type" : "string" + } + }, { + "description" : "Earliest time for logs. Format: \"%m/%d/%Y\" in UTC.", + "in" : "query", + "name" : "starttime", + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "logs" ] + }, + "x-name" : "endpoints.api.logs.RepositoryLogs", + "x-path" : "/api/v1/repository/{repository}/logs", + "x-tag" : "logs" + }, + "/api/v1/user/logs" : { + "get" : { + "description" : "List the logs for the current user.", + "operationId" : "listUserLogs", + "parameters" : [ { + "description" : "The page token for the next page", + "in" : "query", + "name" : "next_page", + "schema" : { + "type" : "string" + } + }, { + "description" : "Username for which to filter logs.", + "in" : "query", + "name" : "performer", + "schema" : { + "type" : "string" + } + }, { + "description" : "Latest time for logs. Format: \"%m/%d/%Y\" in UTC.", + "in" : "query", + "name" : "endtime", + "schema" : { + "type" : "string" + } + }, { + "description" : "Earliest time for logs. Format: \"%m/%d/%Y\" in UTC.", + "in" : "query", + "name" : "starttime", + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "logs" ] + }, + "x-name" : "endpoints.api.logs.UserLogs", + "x-path" : "/api/v1/user/logs", + "x-tag" : "logs" + }, + "/api/v1/organization/{orgname}/logs" : { + "get" : { + "description" : "List the logs for the specified organization.", + "operationId" : "listOrgLogs", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The page token for the next page", + "in" : "query", + "name" : "next_page", + "schema" : { + "type" : "string" + } + }, { + "description" : "Username for which to filter logs.", + "in" : "query", + "name" : "performer", + "schema" : { + "type" : "string" + } + }, { + "description" : "Latest time for logs. Format: \"%m/%d/%Y\" in UTC.", + "in" : "query", + "name" : "endtime", + "schema" : { + "type" : "string" + } + }, { + "description" : "Earliest time for logs. Format: \"%m/%d/%Y\" in UTC.", + "in" : "query", + "name" : "starttime", + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "logs" ] + }, + "x-name" : "endpoints.api.logs.OrgLogs", + "x-path" : "/api/v1/organization/{orgname}/logs", + "x-tag" : "logs" + }, + "/api/v1/repository/{repository}/aggregatelogs" : { + "get" : { + "description" : "Returns the aggregated logs for the specified repository.", + "operationId" : "getAggregateRepoLogs", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "Latest time for logs. Format: \"%m/%d/%Y\" in UTC.", + "in" : "query", + "name" : "endtime", + "schema" : { + "type" : "string" + } + }, { + "description" : "Earliest time for logs. Format: \"%m/%d/%Y\" in UTC.", + "in" : "query", + "name" : "starttime", + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "logs" ] + }, + "x-name" : "endpoints.api.logs.RepositoryAggregateLogs", + "x-path" : "/api/v1/repository/{repository}/aggregatelogs", + "x-tag" : "logs" + }, + "/api/v1/user/aggregatelogs" : { + "get" : { + "description" : "Returns the aggregated logs for the current user.", + "operationId" : "getAggregateUserLogs", + "parameters" : [ { + "description" : "Username for which to filter logs.", + "in" : "query", + "name" : "performer", + "schema" : { + "type" : "string" + } + }, { + "description" : "Latest time for logs. Format: \"%m/%d/%Y\" in UTC.", + "in" : "query", + "name" : "endtime", + "schema" : { + "type" : "string" + } + }, { + "description" : "Earliest time for logs. Format: \"%m/%d/%Y\" in UTC.", + "in" : "query", + "name" : "starttime", + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "logs" ] + }, + "x-name" : "endpoints.api.logs.UserAggregateLogs", + "x-path" : "/api/v1/user/aggregatelogs", + "x-tag" : "logs" + }, + "/api/v1/organization/{orgname}/aggregatelogs" : { + "get" : { + "description" : "Gets the aggregated logs for the specified organization.", + "operationId" : "getAggregateOrgLogs", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "Username for which to filter logs.", + "in" : "query", + "name" : "performer", + "schema" : { + "type" : "string" + } + }, { + "description" : "Latest time for logs. Format: \"%m/%d/%Y\" in UTC.", + "in" : "query", + "name" : "endtime", + "schema" : { + "type" : "string" + } + }, { + "description" : "Earliest time for logs. Format: \"%m/%d/%Y\" in UTC.", + "in" : "query", + "name" : "starttime", + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "logs" ] + }, + "x-name" : "endpoints.api.logs.OrgAggregateLogs", + "x-path" : "/api/v1/organization/{orgname}/aggregatelogs", + "x-tag" : "logs" + }, + "/api/v1/repository/{repository}/exportlogs" : { + "post" : { + "description" : "Queues an export of the logs for the specified repository.", + "operationId" : "exportRepoLogs", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "Latest time for logs. Format: \"%m/%d/%Y\" in UTC.", + "in" : "query", + "name" : "endtime", + "schema" : { + "type" : "string" + } + }, { + "description" : "Earliest time for logs. Format: \"%m/%d/%Y\" in UTC.", + "in" : "query", + "name" : "starttime", + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ExportLogs" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "logs" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.logs.ExportRepositoryLogs", + "x-path" : "/api/v1/repository/{repository}/exportlogs", + "x-tag" : "logs" + }, + "/api/v1/user/exportlogs" : { + "post" : { + "description" : "Returns the aggregated logs for the current user.", + "operationId" : "exportUserLogs", + "parameters" : [ { + "description" : "Latest time for logs. Format: \"%m/%d/%Y\" in UTC.", + "in" : "query", + "name" : "endtime", + "schema" : { + "type" : "string" + } + }, { + "description" : "Earliest time for logs. Format: \"%m/%d/%Y\" in UTC.", + "in" : "query", + "name" : "starttime", + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ExportLogs" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "logs" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.logs.ExportUserLogs", + "x-path" : "/api/v1/user/exportlogs", + "x-tag" : "logs" + }, + "/api/v1/organization/{orgname}/exportlogs" : { + "post" : { + "description" : "Exports the logs for the specified organization.", + "operationId" : "exportOrgLogs", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "Latest time for logs. Format: \"%m/%d/%Y\" in UTC.", + "in" : "query", + "name" : "endtime", + "schema" : { + "type" : "string" + } + }, { + "description" : "Earliest time for logs. Format: \"%m/%d/%Y\" in UTC.", + "in" : "query", + "name" : "starttime", + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ExportLogs" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "logs" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.logs.ExportOrgLogs", + "x-path" : "/api/v1/organization/{orgname}/exportlogs", + "x-tag" : "logs" + }, + "/api/v1/repository/{repository}/manifest/{manifestref}" : { + "get" : { + "operationId" : "getRepoManifest", + "parameters" : [ { + "description" : "The digest of the manifest", + "in" : "path", + "name" : "manifestref", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:read" ] + } ], + "tags" : [ "manifest" ] + }, + "x-name" : "endpoints.api.manifest.RepositoryManifest", + "x-path" : "/api/v1/repository/{repository}/manifest/{manifestref}", + "x-tag" : "manifest" + }, + "/api/v1/repository/{repository}/manifest/{manifestref}/labels" : { + "get" : { + "operationId" : "listManifestLabels", + "parameters" : [ { + "description" : "The digest of the manifest", + "in" : "path", + "name" : "manifestref", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "If specified, only labels matching the given prefix will be returned", + "in" : "query", + "name" : "filter", + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:read" ] + } ], + "tags" : [ "manifest" ] + }, + "post" : { + "description" : "Adds a new label into the tag manifest.", + "operationId" : "addManifestLabel", + "parameters" : [ { + "description" : "The digest of the manifest", + "in" : "path", + "name" : "manifestref", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/AddLabel" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:write" ] + } ], + "tags" : [ "manifest" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.manifest.RepositoryManifestLabels", + "x-path" : "/api/v1/repository/{repository}/manifest/{manifestref}/labels", + "x-tag" : "manifest" + }, + "/api/v1/repository/{repository}/manifest/{manifestref}/labels/{labelid}" : { + "delete" : { + "description" : "Deletes an existing label from a manifest.", + "operationId" : "deleteManifestLabel", + "parameters" : [ { + "description" : "The digest of the manifest", + "in" : "path", + "name" : "manifestref", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The ID of the label", + "in" : "path", + "name" : "labelid", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:write" ] + } ], + "tags" : [ "manifest" ] + }, + "get" : { + "description" : "Retrieves the label with the specific ID under the manifest.", + "operationId" : "getManifestLabel", + "parameters" : [ { + "description" : "The digest of the manifest", + "in" : "path", + "name" : "manifestref", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The ID of the label", + "in" : "path", + "name" : "labelid", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:read" ] + } ], + "tags" : [ "manifest" ] + }, + "x-name" : "endpoints.api.manifest.ManageRepositoryManifestLabel", + "x-path" : "/api/v1/repository/{repository}/manifest/{manifestref}/labels/{labelid}", + "x-tag" : "manifest" + }, + "/api/v1/organization/{orgname}/quota" : { + "get" : { + "operationId" : "listOrganizationQuota", + "parameters" : [ { + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "tags" : [ "namespacequota" ] + }, + "post" : { + "description" : "Create a new organization quota.", + "operationId" : "createOrganizationQuota", + "parameters" : [ { + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/NewOrgQuota" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "namespacequota" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.namespacequota.OrganizationQuotaList", + "x-path" : "/api/v1/organization/{orgname}/quota", + "x-tag" : "namespacequota" + }, + "/api/v1/organization/{orgname}/quota/{quota_id}" : { + "delete" : { + "operationId" : "deleteOrganizationQuota", + "parameters" : [ { + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "quota_id", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "namespacequota" ] + }, + "get" : { + "operationId" : "getOrganizationQuota", + "parameters" : [ { + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "quota_id", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "tags" : [ "namespacequota" ] + }, + "put" : { + "operationId" : "changeOrganizationQuota", + "parameters" : [ { + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "quota_id", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateOrgQuota" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "namespacequota" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.namespacequota.OrganizationQuota", + "x-path" : "/api/v1/organization/{orgname}/quota/{quota_id}", + "x-tag" : "namespacequota" + }, + "/api/v1/organization/{orgname}/quota/{quota_id}/limit" : { + "get" : { + "operationId" : "listOrganizationQuotaLimit", + "parameters" : [ { + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "quota_id", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "tags" : [ "namespacequota" ] + }, + "post" : { + "operationId" : "createOrganizationQuotaLimit", + "parameters" : [ { + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "quota_id", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/NewOrgQuotaLimit" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "namespacequota" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.namespacequota.OrganizationQuotaLimitList", + "x-path" : "/api/v1/organization/{orgname}/quota/{quota_id}/limit", + "x-tag" : "namespacequota" + }, + "/api/v1/organization/{orgname}/quota/{quota_id}/limit/{limit_id}" : { + "delete" : { + "operationId" : "deleteOrganizationQuotaLimit", + "parameters" : [ { + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "limit_id", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "quota_id", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "namespacequota" ] + }, + "get" : { + "operationId" : "getOrganizationQuotaLimit", + "parameters" : [ { + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "limit_id", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "quota_id", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "tags" : [ "namespacequota" ] + }, + "put" : { + "operationId" : "changeOrganizationQuotaLimit", + "parameters" : [ { + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "limit_id", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "quota_id", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateOrgQuotaLimit" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "namespacequota" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.namespacequota.OrganizationQuotaLimit", + "x-path" : "/api/v1/organization/{orgname}/quota/{quota_id}/limit/{limit_id}", + "x-tag" : "namespacequota" + }, + "/api/v1/user/quota" : { + "get" : { + "operationId" : "listUserQuota", + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "namespacequota" ] + }, + "x-name" : "endpoints.api.namespacequota.UserQuotaList", + "x-path" : "/api/v1/user/quota", + "x-tag" : "namespacequota" + }, + "/api/v1/user/quota/{quota_id}" : { + "get" : { + "operationId" : "getUserQuota", + "parameters" : [ { + "in" : "path", + "name" : "quota_id", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "namespacequota" ] + }, + "x-name" : "endpoints.api.namespacequota.UserQuota", + "x-path" : "/api/v1/user/quota/{quota_id}", + "x-tag" : "namespacequota" + }, + "/api/v1/user/quota/{quota_id}/limit" : { + "get" : { + "operationId" : "listUserQuotaLimit", + "parameters" : [ { + "in" : "path", + "name" : "quota_id", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "namespacequota" ] + }, + "x-name" : "endpoints.api.namespacequota.UserQuotaLimitList", + "x-path" : "/api/v1/user/quota/{quota_id}/limit", + "x-tag" : "namespacequota" + }, + "/api/v1/user/quota/{quota_id}/limit/{limit_id}" : { + "get" : { + "operationId" : "getUserQuotaLimit", + "parameters" : [ { + "in" : "path", + "name" : "limit_id", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "quota_id", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "namespacequota" ] + }, + "x-name" : "endpoints.api.namespacequota.UserQuotaLimit", + "x-path" : "/api/v1/user/quota/{quota_id}/limit/{limit_id}", + "x-tag" : "namespacequota" + }, + "/api/v1/organization/" : { + "post" : { + "description" : "Create a new organization.", + "operationId" : "createOrganization", + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/NewOrg" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "organization" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.organization.OrganizationList", + "x-path" : "/api/v1/organization/", + "x-tag" : "organization" + }, + "/api/v1/organization/{orgname}" : { + "delete" : { + "description" : "Deletes the specified organization.", + "operationId" : "deleteAdminedOrganization", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "organization" ] + }, + "get" : { + "description" : "Get the details for the specified organization.", + "operationId" : "getOrganization", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "tags" : [ "organization" ] + }, + "put" : { + "description" : "Change the details for the specified organization.", + "operationId" : "changeOrganizationDetails", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateOrg" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "organization" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.organization.Organization", + "x-path" : "/api/v1/organization/{orgname}", + "x-tag" : "organization" + }, + "/api/v1/organization/{orgname}/collaborators" : { + "get" : { + "description" : "List outside collaborators of the specified organization.", + "operationId" : "getOrganizationCollaborators", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "organization" ] + }, + "x-name" : "endpoints.api.organization.OrganizationCollaboratorList", + "x-path" : "/api/v1/organization/{orgname}/collaborators", + "x-tag" : "organization" + }, + "/api/v1/organization/{orgname}/members" : { + "get" : { + "description" : "List the human members of the specified organization.", + "operationId" : "getOrganizationMembers", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "organization" ] + }, + "x-name" : "endpoints.api.organization.OrganizationMemberList", + "x-path" : "/api/v1/organization/{orgname}/members", + "x-tag" : "organization" + }, + "/api/v1/organization/{orgname}/members/{membername}" : { + "delete" : { + "description" : "Removes a member from an organization, revoking all its repository priviledges and removing\n it from all teams in the organization.", + "operationId" : "removeOrganizationMember", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The username of the organization member", + "in" : "path", + "name" : "membername", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "organization" ] + }, + "get" : { + "description" : "Retrieves the details of a member of the organization.", + "operationId" : "getOrganizationMember", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The username of the organization member", + "in" : "path", + "name" : "membername", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "organization" ] + }, + "x-name" : "endpoints.api.organization.OrganizationMember", + "x-path" : "/api/v1/organization/{orgname}/members/{membername}", + "x-tag" : "organization" + }, + "/api/v1/app/{client_id}" : { + "get" : { + "description" : "Get information on the specified application.", + "operationId" : "getApplicationInformation", + "parameters" : [ { + "description" : "The OAuth client ID", + "in" : "path", + "name" : "client_id", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "tags" : [ "organization" ] + }, + "x-name" : "endpoints.api.organization.ApplicationInformation", + "x-path" : "/api/v1/app/{client_id}", + "x-tag" : "organization" + }, + "/api/v1/organization/{orgname}/applications" : { + "get" : { + "description" : "List the applications for the specified organization.", + "operationId" : "getOrganizationApplications", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "organization" ] + }, + "post" : { + "description" : "Creates a new application under this organization.", + "operationId" : "createOrganizationApplication", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/NewApp" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "organization" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.organization.OrganizationApplications", + "x-path" : "/api/v1/organization/{orgname}/applications", + "x-tag" : "organization" + }, + "/api/v1/organization/{orgname}/applications/{client_id}" : { + "delete" : { + "description" : "Deletes the application under this organization.", + "operationId" : "deleteOrganizationApplication", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The OAuth client ID", + "in" : "path", + "name" : "client_id", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "organization" ] + }, + "get" : { + "description" : "Retrieves the application with the specified client_id under the specified organization.", + "operationId" : "getOrganizationApplication", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The OAuth client ID", + "in" : "path", + "name" : "client_id", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "organization" ] + }, + "put" : { + "description" : "Updates an application under this organization.", + "operationId" : "updateOrganizationApplication", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The OAuth client ID", + "in" : "path", + "name" : "client_id", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateApp" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "organization" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.organization.OrganizationApplicationResource", + "x-path" : "/api/v1/organization/{orgname}/applications/{client_id}", + "x-tag" : "organization" + }, + "/api/v1/repository/{repository}/permissions/team/" : { + "get" : { + "description" : "List all team permission.", + "operationId" : "listRepoTeamPermissions", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "permission" ] + }, + "x-name" : "endpoints.api.permission.RepositoryTeamPermissionList", + "x-path" : "/api/v1/repository/{repository}/permissions/team/", + "x-tag" : "permission" + }, + "/api/v1/repository/{repository}/permissions/user/" : { + "get" : { + "description" : "List all user permissions.", + "operationId" : "listRepoUserPermissions", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "permission" ] + }, + "x-name" : "endpoints.api.permission.RepositoryUserPermissionList", + "x-path" : "/api/v1/repository/{repository}/permissions/user/", + "x-tag" : "permission" + }, + "/api/v1/repository/{repository}/permissions/user/{username}/transitive" : { + "get" : { + "description" : "Get the fetch the permission for the specified user.", + "operationId" : "getUserTransitivePermission", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The username of the user to which the permissions apply", + "in" : "path", + "name" : "username", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "permission" ] + }, + "x-name" : "endpoints.api.permission.RepositoryUserTransitivePermission", + "x-path" : "/api/v1/repository/{repository}/permissions/user/{username}/transitive", + "x-tag" : "permission" + }, + "/api/v1/repository/{repository}/permissions/user/{username}" : { + "delete" : { + "description" : "Delete the permission for the user.", + "operationId" : "deleteUserPermissions", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The username of the user to which the permission applies", + "in" : "path", + "name" : "username", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "permission" ] + }, + "get" : { + "description" : "Get the permission for the specified user.", + "operationId" : "getUserPermissions", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The username of the user to which the permission applies", + "in" : "path", + "name" : "username", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "permission" ] + }, + "put" : { + "description" : "Update the perimssions for an existing repository.", + "operationId" : "changeUserPermissions", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The username of the user to which the permission applies", + "in" : "path", + "name" : "username", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/UserPermission" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "permission" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.permission.RepositoryUserPermission", + "x-path" : "/api/v1/repository/{repository}/permissions/user/{username}", + "x-tag" : "permission" + }, + "/api/v1/repository/{repository}/permissions/team/{teamname}" : { + "delete" : { + "description" : "Delete the permission for the specified team.", + "operationId" : "deleteTeamPermissions", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The name of the team to which the permission applies", + "in" : "path", + "name" : "teamname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "permission" ] + }, + "get" : { + "description" : "Fetch the permission for the specified team.", + "operationId" : "getTeamPermissions", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The name of the team to which the permission applies", + "in" : "path", + "name" : "teamname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "permission" ] + }, + "put" : { + "description" : "Update the existing team permission.", + "operationId" : "changeTeamPermissions", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The name of the team to which the permission applies", + "in" : "path", + "name" : "teamname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/TeamPermission" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "permission" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.permission.RepositoryTeamPermission", + "x-path" : "/api/v1/repository/{repository}/permissions/team/{teamname}", + "x-tag" : "permission" + }, + "/api/v1/organization/{orgname}/prototypes" : { + "get" : { + "description" : "List the existing prototypes for this organization.", + "operationId" : "getOrganizationPrototypePermissions", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "prototype" ] + }, + "post" : { + "description" : "Create a new permission prototype.", + "operationId" : "createOrganizationPrototypePermission", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/NewPrototype" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "prototype" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.prototype.PermissionPrototypeList", + "x-path" : "/api/v1/organization/{orgname}/prototypes", + "x-tag" : "prototype" + }, + "/api/v1/organization/{orgname}/prototypes/{prototypeid}" : { + "delete" : { + "description" : "Delete an existing permission prototype.", + "operationId" : "deleteOrganizationPrototypePermission", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The ID of the prototype", + "in" : "path", + "name" : "prototypeid", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "prototype" ] + }, + "put" : { + "description" : "Update the role of an existing permission prototype.", + "operationId" : "updateOrganizationPrototypePermission", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The ID of the prototype", + "in" : "path", + "name" : "prototypeid", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/PrototypeUpdate" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "prototype" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.prototype.PermissionPrototype", + "x-path" : "/api/v1/organization/{orgname}/prototypes/{prototypeid}", + "x-tag" : "prototype" + }, + "/api/v1/repository" : { + "get" : { + "description" : "Fetch the list of repositories visible to the current user under a variety of situations.", + "operationId" : "listRepos", + "parameters" : [ { + "description" : "The page token for the next page", + "in" : "query", + "name" : "next_page", + "schema" : { + "type" : "string" + } + }, { + "description" : "The kind of repositories to return", + "in" : "query", + "name" : "repo_kind", + "schema" : { + "type" : "string" + } + }, { + "description" : "Whether to include the repository's popularity metric.", + "in" : "query", + "name" : "popularity", + "schema" : { + "type" : "boolean" + } + }, { + "description" : "Whether to include when the repository was last modified.", + "in" : "query", + "name" : "last_modified", + "schema" : { + "type" : "boolean" + } + }, { + "description" : "Adds any repositories visible to the user by virtue of being public", + "in" : "query", + "name" : "public", + "schema" : { + "type" : "boolean" + } + }, { + "description" : "Filters the repositories returned to those starred by the user", + "in" : "query", + "name" : "starred", + "schema" : { + "type" : "boolean" + } + }, { + "description" : "Filters the repositories returned to this namespace", + "in" : "query", + "name" : "namespace", + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:read" ] + } ], + "tags" : [ "repository" ] + }, + "post" : { + "description" : "Create a new repository.", + "operationId" : "createRepo", + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/NewRepo" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:create" ] + } ], + "tags" : [ "repository" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.repository.RepositoryList", + "x-path" : "/api/v1/repository", + "x-tag" : "repository" + }, + "/api/v1/repository/{repository}" : { + "delete" : { + "description" : "Delete a repository.", + "operationId" : "deleteRepository", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "repository" ] + }, + "get" : { + "description" : "Fetch the specified repository.", + "operationId" : "getRepo", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "Whether to include repository tags", + "in" : "query", + "name" : "includeTags", + "schema" : { + "type" : "boolean" + } + }, { + "description" : "Whether to include action statistics", + "in" : "query", + "name" : "includeStats", + "schema" : { + "type" : "boolean" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:read" ] + } ], + "tags" : [ "repository" ] + }, + "put" : { + "description" : "Update the description in the specified repository.", + "operationId" : "updateRepo", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/RepoUpdate" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:write" ] + } ], + "tags" : [ "repository" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.repository.Repository", + "x-path" : "/api/v1/repository/{repository}", + "x-tag" : "repository" + }, + "/api/v1/repository/{repository}/changevisibility" : { + "post" : { + "description" : "Change the visibility of a repository.", + "operationId" : "changeRepoVisibility", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ChangeVisibility" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "repository" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.repository.RepositoryVisibility", + "x-path" : "/api/v1/repository/{repository}/changevisibility", + "x-tag" : "repository" + }, + "/api/v1/repository/{repository}/changetrust" : { + "x-name" : "endpoints.api.repository.RepositoryTrust", + "x-path" : "/api/v1/repository/{repository}/changetrust", + "x-tag" : "repository" + }, + "/api/v1/repository/{repository}/notification/" : { + "get" : { + "description" : "List the notifications for the specified repository.", + "operationId" : "listRepoNotifications", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "repositorynotification" ] + }, + "post" : { + "operationId" : "createRepoNotification", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/NotificationCreateRequest" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "repositorynotification" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.repositorynotification.RepositoryNotificationList", + "x-path" : "/api/v1/repository/{repository}/notification/", + "x-tag" : "repositorynotification" + }, + "/api/v1/repository/{repository}/notification/{uuid}" : { + "delete" : { + "description" : "Deletes the specified notification.", + "operationId" : "deleteRepoNotification", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The UUID of the notification", + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "repositorynotification" ] + }, + "get" : { + "description" : "Get information for the specified notification.", + "operationId" : "getRepoNotification", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The UUID of the notification", + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "repositorynotification" ] + }, + "post" : { + "description" : "Resets repository notification to 0 failures.", + "operationId" : "resetRepositoryNotificationFailures", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The UUID of the notification", + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "repositorynotification" ] + }, + "x-name" : "endpoints.api.repositorynotification.RepositoryNotification", + "x-path" : "/api/v1/repository/{repository}/notification/{uuid}", + "x-tag" : "repositorynotification" + }, + "/api/v1/repository/{repository}/notification/{uuid}/test" : { + "post" : { + "description" : "Queues a test notification for this repository.", + "operationId" : "testRepoNotification", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The UUID of the notification", + "in" : "path", + "name" : "uuid", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "repositorynotification" ] + }, + "x-name" : "endpoints.api.repositorynotification.TestRepositoryNotification", + "x-path" : "/api/v1/repository/{repository}/notification/{uuid}/test", + "x-tag" : "repositorynotification" + }, + "/api/v1/repository/{repository}/tokens/" : { + "get" : { + "description" : "List the tokens for the specified repository.", + "operationId" : "listRepoTokens", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "repotoken" ] + }, + "post" : { + "description" : "Create a new repository token.", + "operationId" : "createToken", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/NewToken" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "repotoken" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.repotoken.RepositoryTokenList", + "x-path" : "/api/v1/repository/{repository}/tokens/", + "x-tag" : "repotoken" + }, + "/api/v1/repository/{repository}/tokens/{code}" : { + "delete" : { + "description" : "Delete the repository token.", + "operationId" : "deleteToken", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The token code", + "in" : "path", + "name" : "code", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "repotoken" ] + }, + "get" : { + "description" : "Fetch the specified repository token information.", + "operationId" : "getTokens", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The token code", + "in" : "path", + "name" : "code", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "repotoken" ] + }, + "put" : { + "description" : "Update the permissions for the specified repository token.", + "operationId" : "changeToken", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The token code", + "in" : "path", + "name" : "code", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/TokenPermission" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "repotoken" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.repotoken.RepositoryToken", + "x-path" : "/api/v1/repository/{repository}/tokens/{code}", + "x-tag" : "repotoken" + }, + "/api/v1/user/robots" : { + "get" : { + "description" : "List the available robots for the user.", + "operationId" : "getUserRobots", + "parameters" : [ { + "description" : "If specified, the number of robots to return.", + "in" : "query", + "name" : "limit", + "schema" : { + "type" : "integer" + } + }, { + "description" : "If false, the robot's token is not returned.", + "in" : "query", + "name" : "token", + "schema" : { + "type" : "boolean" + } + }, { + "description" : "Whether to include repositories and teams in which the robots have permission.", + "in" : "query", + "name" : "permissions", + "schema" : { + "type" : "boolean" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "robot" ] + }, + "x-name" : "endpoints.api.robot.UserRobotList", + "x-path" : "/api/v1/user/robots", + "x-tag" : "robot" + }, + "/api/v1/user/robots/{robot_shortname}" : { + "delete" : { + "description" : "Delete an existing robot.", + "operationId" : "deleteUserRobot", + "parameters" : [ { + "description" : "The short name for the robot, without any user or organization prefix", + "in" : "path", + "name" : "robot_shortname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "robot" ] + }, + "get" : { + "description" : "Returns the user's robot with the specified name.", + "operationId" : "getUserRobot", + "parameters" : [ { + "description" : "The short name for the robot, without any user or organization prefix", + "in" : "path", + "name" : "robot_shortname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "robot" ] + }, + "put" : { + "description" : "Create a new user robot with the specified name.", + "operationId" : "createUserRobot", + "parameters" : [ { + "description" : "The short name for the robot, without any user or organization prefix", + "in" : "path", + "name" : "robot_shortname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/CreateRobot" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "robot" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.robot.UserRobot", + "x-path" : "/api/v1/user/robots/{robot_shortname}", + "x-tag" : "robot" + }, + "/api/v1/organization/{orgname}/robots" : { + "get" : { + "description" : "List the organization's robots.", + "operationId" : "getOrgRobots", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "If specified, the number of robots to return.", + "in" : "query", + "name" : "limit", + "schema" : { + "type" : "integer" + } + }, { + "description" : "If false, the robot's token is not returned.", + "in" : "query", + "name" : "token", + "schema" : { + "type" : "boolean" + } + }, { + "description" : "Whether to include repostories and teams in which the robots have permission.", + "in" : "query", + "name" : "permissions", + "schema" : { + "type" : "boolean" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "robot" ] + }, + "x-name" : "endpoints.api.robot.OrgRobotList", + "x-path" : "/api/v1/organization/{orgname}/robots", + "x-tag" : "robot" + }, + "/api/v1/organization/{orgname}/robots/{robot_shortname}" : { + "delete" : { + "description" : "Delete an existing organization robot.", + "operationId" : "deleteOrgRobot", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The short name for the robot, without any user or organization prefix", + "in" : "path", + "name" : "robot_shortname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "robot" ] + }, + "get" : { + "description" : "Returns the organization's robot with the specified name.", + "operationId" : "getOrgRobot", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The short name for the robot, without any user or organization prefix", + "in" : "path", + "name" : "robot_shortname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "robot" ] + }, + "put" : { + "description" : "Create a new robot in the organization.", + "operationId" : "createOrgRobot", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The short name for the robot, without any user or organization prefix", + "in" : "path", + "name" : "robot_shortname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/CreateRobot" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "robot" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.robot.OrgRobot", + "x-path" : "/api/v1/organization/{orgname}/robots/{robot_shortname}", + "x-tag" : "robot" + }, + "/api/v1/user/robots/{robot_shortname}/permissions" : { + "get" : { + "description" : "Returns the list of repository permissions for the user's robot.", + "operationId" : "getUserRobotPermissions", + "parameters" : [ { + "description" : "The short name for the robot, without any user or organization prefix", + "in" : "path", + "name" : "robot_shortname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "robot" ] + }, + "x-name" : "endpoints.api.robot.UserRobotPermissions", + "x-path" : "/api/v1/user/robots/{robot_shortname}/permissions", + "x-tag" : "robot" + }, + "/api/v1/organization/{orgname}/robots/{robot_shortname}/permissions" : { + "get" : { + "description" : "Returns the list of repository permissions for the org's robot.", + "operationId" : "getOrgRobotPermissions", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The short name for the robot, without any user or organization prefix", + "in" : "path", + "name" : "robot_shortname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "robot" ] + }, + "x-name" : "endpoints.api.robot.OrgRobotPermissions", + "x-path" : "/api/v1/organization/{orgname}/robots/{robot_shortname}/permissions", + "x-tag" : "robot" + }, + "/api/v1/user/robots/{robot_shortname}/regenerate" : { + "post" : { + "description" : "Regenerates the token for a user's robot.", + "operationId" : "regenerateUserRobotToken", + "parameters" : [ { + "description" : "The short name for the robot, without any user or organization prefix", + "in" : "path", + "name" : "robot_shortname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "robot" ] + }, + "x-name" : "endpoints.api.robot.RegenerateUserRobot", + "x-path" : "/api/v1/user/robots/{robot_shortname}/regenerate", + "x-tag" : "robot" + }, + "/api/v1/organization/{orgname}/robots/{robot_shortname}/regenerate" : { + "post" : { + "description" : "Regenerates the token for an organization robot.", + "operationId" : "regenerateOrgRobotToken", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The short name for the robot, without any user or organization prefix", + "in" : "path", + "name" : "robot_shortname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "robot" ] + }, + "x-name" : "endpoints.api.robot.RegenerateOrgRobot", + "x-path" : "/api/v1/organization/{orgname}/robots/{robot_shortname}/regenerate", + "x-tag" : "robot" + }, + "/api/v1/entities/{prefix}" : { + "get" : { + "description" : "Get a list of entities that match the specified prefix.", + "operationId" : "getMatchingEntities", + "parameters" : [ { + "in" : "path", + "name" : "prefix", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "Whether to include orgs names.", + "in" : "query", + "name" : "includeOrgs", + "schema" : { + "type" : "boolean" + } + }, { + "description" : "Whether to include team names.", + "in" : "query", + "name" : "includeTeams", + "schema" : { + "type" : "boolean" + } + }, { + "description" : "Namespace to use when querying for org entities.", + "in" : "query", + "name" : "namespace", + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "tags" : [ "search" ] + }, + "x-name" : "endpoints.api.search.EntitySearch", + "x-path" : "/api/v1/entities/{prefix}", + "x-tag" : "search" + }, + "/api/v1/find/all" : { + "get" : { + "description" : "Get a list of entities and resources that match the specified query.", + "operationId" : "conductSearch", + "parameters" : [ { + "description" : "The search query.", + "in" : "query", + "name" : "query", + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:read" ] + } ], + "tags" : [ "search" ] + }, + "x-name" : "endpoints.api.search.ConductSearch", + "x-path" : "/api/v1/find/all", + "x-tag" : "search" + }, + "/api/v1/find/repositories" : { + "get" : { + "description" : "Get a list of apps and repositories that match the specified query.", + "operationId" : "conductRepoSearch", + "parameters" : [ { + "description" : "Whether to include usage metadata", + "in" : "query", + "name" : "includeUsage", + "schema" : { + "type" : "boolean" + } + }, { + "description" : "The page.", + "in" : "query", + "name" : "page", + "schema" : { + "type" : "integer" + } + }, { + "description" : "The search query.", + "in" : "query", + "name" : "query", + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "tags" : [ "search" ] + }, + "x-name" : "endpoints.api.search.ConductRepositorySearch", + "x-path" : "/api/v1/find/repositories", + "x-tag" : "search" + }, + "/api/v1/superuser/logs" : { + "get" : { + "description" : "List the usage logs for the current system.", + "operationId" : "listAllLogs", + "parameters" : [ { + "description" : "The page token for the next page", + "in" : "query", + "name" : "next_page", + "schema" : { + "type" : "string" + } + }, { + "description" : "The page number for the logs", + "in" : "query", + "name" : "page", + "schema" : { + "type" : "integer" + } + }, { + "description" : "Latest time to which to get logs (%m/%d/%Y %Z)", + "in" : "query", + "name" : "endtime", + "schema" : { + "type" : "string" + } + }, { + "description" : "Earliest time from which to get logs (%m/%d/%Y %Z)", + "in" : "query", + "name" : "starttime", + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ] + }, + "x-name" : "endpoints.api.superuser.SuperUserLogs", + "x-path" : "/api/v1/superuser/logs", + "x-tag" : "superuser" + }, + "/api/v1/superuser/users/{namespace}/quota" : { + "get" : { + "operationId" : "listUserQuotaSuperUser", + "parameters" : [ { + "in" : "path", + "name" : "namespace", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ] + }, + "post" : { + "operationId" : "createUserQuotaSuperUser", + "parameters" : [ { + "in" : "path", + "name" : "namespace", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/NewNamespaceQuota" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.superuser.SuperUserUserQuotaList", + "x-path" : "/api/v1/superuser/users/{namespace}/quota", + "x-tag" : "superuser" + }, + "/api/v1/superuser/organization/{namespace}/quota" : { + "get" : { + "operationId" : "listOrganizationQuotaSuperUser", + "parameters" : [ { + "in" : "path", + "name" : "namespace", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ] + }, + "post" : { + "operationId" : "createOrganizationQuotaSuperUser", + "parameters" : [ { + "in" : "path", + "name" : "namespace", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/NewNamespaceQuota" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.superuser.SuperUserUserQuotaList", + "x-path" : "/api/v1/superuser/organization/{namespace}/quota", + "x-tag" : "superuser" + }, + "/api/v1/superuser/users/{namespace}/quota/{quota_id}" : { + "delete" : { + "operationId" : "deleteUserQuotaSuperUser", + "parameters" : [ { + "in" : "path", + "name" : "quota_id", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "namespace", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ] + }, + "put" : { + "operationId" : "changeUserQuotaSuperUser", + "parameters" : [ { + "in" : "path", + "name" : "quota_id", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "namespace", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateNamespaceQuota" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.superuser.SuperUserUserQuota", + "x-path" : "/api/v1/superuser/users/{namespace}/quota/{quota_id}", + "x-tag" : "superuser" + }, + "/api/v1/superuser/organization/{namespace}/quota/{quota_id}" : { + "delete" : { + "operationId" : "deleteOrganizationQuotaSuperUser", + "parameters" : [ { + "in" : "path", + "name" : "quota_id", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "namespace", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ] + }, + "put" : { + "operationId" : "changeOrganizationQuotaSuperUser", + "parameters" : [ { + "in" : "path", + "name" : "quota_id", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "namespace", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateNamespaceQuota" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.superuser.SuperUserUserQuota", + "x-path" : "/api/v1/superuser/organization/{namespace}/quota/{quota_id}", + "x-tag" : "superuser" + }, + "/api/v1/superuser/users/" : { + "get" : { + "description" : "Returns a list of all users in the system.", + "operationId" : "listAllUsers", + "parameters" : [ { + "description" : "The page token for the next page", + "in" : "query", + "name" : "next_page", + "schema" : { + "type" : "string" + } + }, { + "description" : "Limit to the number of results to return per page. Max 100.", + "in" : "query", + "name" : "limit", + "schema" : { + "type" : "integer" + } + }, { + "description" : "If false, only enabled users will be returned.", + "in" : "query", + "name" : "disabled", + "schema" : { + "type" : "boolean" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ] + }, + "post" : { + "description" : "Creates a new user.", + "operationId" : "createInstallUser", + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/CreateInstallUser" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.superuser.SuperUserList", + "x-path" : "/api/v1/superuser/users/", + "x-tag" : "superuser" + }, + "/api/v1/superuser/organizations/{name}" : { + "delete" : { + "description" : "Deletes the specified organization.", + "operationId" : "deleteOrganization", + "parameters" : [ { + "description" : "The name of the organizaton being managed", + "in" : "path", + "name" : "name", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ] + }, + "put" : { + "description" : "Updates information about the specified user.", + "operationId" : "changeOrganization", + "parameters" : [ { + "description" : "The name of the organizaton being managed", + "in" : "path", + "name" : "name", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateOrg" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.superuser.SuperUserOrganizationManagement", + "x-path" : "/api/v1/superuser/organizations/{name}", + "x-tag" : "superuser" + }, + "/api/v1/superuser/keys" : { + "get" : { + "operationId" : "listServiceKeys", + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ] + }, + "post" : { + "operationId" : "createServiceKey", + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/CreateServiceKey" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.superuser.SuperUserServiceKeyManagement", + "x-path" : "/api/v1/superuser/keys", + "x-tag" : "superuser" + }, + "/api/v1/superuser/keys/{kid}" : { + "delete" : { + "operationId" : "deleteServiceKey", + "parameters" : [ { + "description" : "The unique identifier for a service key", + "in" : "path", + "name" : "kid", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ] + }, + "get" : { + "operationId" : "getServiceKey", + "parameters" : [ { + "description" : "The unique identifier for a service key", + "in" : "path", + "name" : "kid", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ] + }, + "put" : { + "operationId" : "updateServiceKey", + "parameters" : [ { + "description" : "The unique identifier for a service key", + "in" : "path", + "name" : "kid", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/PutServiceKey" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.superuser.SuperUserServiceKey", + "x-path" : "/api/v1/superuser/keys/{kid}", + "x-tag" : "superuser" + }, + "/api/v1/superuser/approvedkeys/{kid}" : { + "post" : { + "operationId" : "approveServiceKey", + "parameters" : [ { + "description" : "The unique identifier for a service key", + "in" : "path", + "name" : "kid", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApproveServiceKey" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.superuser.SuperUserServiceKeyApproval", + "x-path" : "/api/v1/superuser/approvedkeys/{kid}", + "x-tag" : "superuser" + }, + "/api/v1/superuser/{build_uuid}/logs" : { + "get" : { + "description" : "Return the build logs for the build specified by the build uuid.", + "operationId" : "getRepoBuildLogsSuperUser", + "parameters" : [ { + "description" : "The UUID of the build", + "in" : "path", + "name" : "build_uuid", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ] + }, + "x-name" : "endpoints.api.superuser.SuperUserRepositoryBuildLogs", + "x-path" : "/api/v1/superuser/{build_uuid}/logs", + "x-tag" : "superuser" + }, + "/api/v1/superuser/{build_uuid}/status" : { + "get" : { + "description" : "Return the status for the builds specified by the build uuids.", + "operationId" : "getRepoBuildStatusSuperUser", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The UUID of the build", + "in" : "path", + "name" : "build_uuid", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ] + }, + "x-name" : "endpoints.api.superuser.SuperUserRepositoryBuildStatus", + "x-path" : "/api/v1/superuser/{build_uuid}/status", + "x-tag" : "superuser" + }, + "/api/v1/superuser/{build_uuid}/build" : { + "get" : { + "description" : "Returns information about a build.", + "operationId" : "getRepoBuildSuperUser", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The UUID of the build", + "in" : "path", + "name" : "build_uuid", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "super:user" ] + } ], + "tags" : [ "superuser" ] + }, + "x-name" : "endpoints.api.superuser.SuperUserRepositoryBuildResource", + "x-path" : "/api/v1/superuser/{build_uuid}/build", + "x-tag" : "superuser" + }, + "/api/v1/repository/{repository}/tag/" : { + "get" : { + "operationId" : "listRepoTags", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "Filter to only active tags.", + "in" : "query", + "name" : "onlyActiveTags", + "schema" : { + "type" : "boolean" + } + }, { + "description" : "Page index for the results. Default 1.", + "in" : "query", + "name" : "page", + "schema" : { + "type" : "integer" + } + }, { + "description" : "Limit to the number of results to return per page. Max 100.", + "in" : "query", + "name" : "limit", + "schema" : { + "type" : "integer" + } + }, { + "description" : "Syntax: : Filters the tag names based on the operation. can be 'like' or 'eq'.", + "in" : "query", + "name" : "filter_tag_name", + "schema" : { + "type" : "string" + } + }, { + "description" : "Filters the tags to the specific tag.", + "in" : "query", + "name" : "specificTag", + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:read" ] + } ], + "tags" : [ "tag" ] + }, + "x-name" : "endpoints.api.tag.ListRepositoryTags", + "x-path" : "/api/v1/repository/{repository}/tag/", + "x-tag" : "tag" + }, + "/api/v1/repository/{repository}/tag/{tag}" : { + "delete" : { + "description" : "Delete the specified repository tag.", + "operationId" : "deleteFullTag", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The name of the tag", + "in" : "path", + "name" : "tag", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:write" ] + } ], + "tags" : [ "tag" ] + }, + "put" : { + "description" : "Change which image a tag points to or create a new tag.", + "operationId" : "changeTag", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The name of the tag", + "in" : "path", + "name" : "tag", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ChangeTag" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:write" ] + } ], + "tags" : [ "tag" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.tag.RepositoryTag", + "x-path" : "/api/v1/repository/{repository}/tag/{tag}", + "x-tag" : "tag" + }, + "/api/v1/repository/{repository}/tag/{tag}/restore" : { + "post" : { + "description" : "Restores a repository tag back to a previous image in the repository.", + "operationId" : "restoreTag", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The name of the tag", + "in" : "path", + "name" : "tag", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/RestoreTag" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:write" ] + } ], + "tags" : [ "tag" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.tag.RestoreTag", + "x-path" : "/api/v1/repository/{repository}/tag/{tag}/restore", + "x-tag" : "tag" + }, + "/api/v1/organization/{orgname}/team/{teamname}" : { + "delete" : { + "description" : "Delete the specified team.", + "operationId" : "deleteOrganizationTeam", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The name of the team", + "in" : "path", + "name" : "teamname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "team" ] + }, + "put" : { + "description" : "Update the org-wide permission for the specified team.", + "operationId" : "updateOrganizationTeam", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The name of the team", + "in" : "path", + "name" : "teamname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/TeamDescription" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "team" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.team.OrganizationTeam", + "x-path" : "/api/v1/organization/{orgname}/team/{teamname}", + "x-tag" : "team" + }, + "/api/v1/organization/{orgname}/team/{teamname}/syncing" : { + "delete" : { + "operationId" : "disableOrganizationTeamSync", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The name of the team", + "in" : "path", + "name" : "teamname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "team" ] + }, + "post" : { + "operationId" : "enableOrganizationTeamSync", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The name of the team", + "in" : "path", + "name" : "teamname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "team" ] + }, + "x-name" : "endpoints.api.team.OrganizationTeamSyncing", + "x-path" : "/api/v1/organization/{orgname}/team/{teamname}/syncing", + "x-tag" : "team" + }, + "/api/v1/organization/{orgname}/team/{teamname}/members" : { + "get" : { + "description" : "Retrieve the list of members for the specified team.", + "operationId" : "getOrganizationTeamMembers", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The name of the team", + "in" : "path", + "name" : "teamname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "Whether to include pending members", + "in" : "query", + "name" : "includePending", + "schema" : { + "type" : "boolean" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "team" ] + }, + "x-name" : "endpoints.api.team.TeamMemberList", + "x-path" : "/api/v1/organization/{orgname}/team/{teamname}/members", + "x-tag" : "team" + }, + "/api/v1/organization/{orgname}/team/{teamname}/members/{membername}" : { + "delete" : { + "description" : "Delete a member of a team.\n\n If the user is merely invited to join the team, then the invite is removed instead.", + "operationId" : "deleteOrganizationTeamMember", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The username of the team member", + "in" : "path", + "name" : "membername", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The name of the team", + "in" : "path", + "name" : "teamname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "team" ] + }, + "put" : { + "description" : "Adds or invites a member to an existing team.", + "operationId" : "updateOrganizationTeamMember", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The username of the team member", + "in" : "path", + "name" : "membername", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The name of the team", + "in" : "path", + "name" : "teamname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "team" ] + }, + "x-name" : "endpoints.api.team.TeamMember", + "x-path" : "/api/v1/organization/{orgname}/team/{teamname}/members/{membername}", + "x-tag" : "team" + }, + "/api/v1/organization/{orgname}/team/{teamname}/invite/{email}" : { + "delete" : { + "description" : "Delete an invite of an email address to join a team.", + "operationId" : "deleteTeamMemberEmailInvite", + "parameters" : [ { + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "email", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "teamname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "team" ] + }, + "put" : { + "description" : "Invites an email address to an existing team.", + "operationId" : "inviteTeamMemberEmail", + "parameters" : [ { + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "email", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "in" : "path", + "name" : "teamname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "org:admin" ] + } ], + "tags" : [ "team" ] + }, + "x-name" : "endpoints.api.team.InviteTeamMember", + "x-path" : "/api/v1/organization/{orgname}/team/{teamname}/invite/{email}", + "x-tag" : "team" + }, + "/api/v1/organization/{orgname}/team/{teamname}/permissions" : { + "get" : { + "description" : "Returns the list of repository permissions for the org's team.", + "operationId" : "getOrganizationTeamPermissions", + "parameters" : [ { + "description" : "The name of the organization", + "in" : "path", + "name" : "orgname", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The name of the team", + "in" : "path", + "name" : "teamname", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "tags" : [ "team" ] + }, + "x-name" : "endpoints.api.team.TeamPermissions", + "x-path" : "/api/v1/organization/{orgname}/team/{teamname}/permissions", + "x-tag" : "team" + }, + "/api/v1/repository/{repository}/trigger/" : { + "get" : { + "description" : "List the triggers for the specified repository.", + "operationId" : "listBuildTriggers", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "trigger" ] + }, + "x-name" : "endpoints.api.trigger.BuildTriggerList", + "x-path" : "/api/v1/repository/{repository}/trigger/", + "x-tag" : "trigger" + }, + "/api/v1/repository/{repository}/trigger/{trigger_uuid}" : { + "delete" : { + "description" : "Delete the specified build trigger.", + "operationId" : "deleteBuildTrigger", + "parameters" : [ { + "description" : "The UUID of the build trigger", + "in" : "path", + "name" : "trigger_uuid", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "trigger" ] + }, + "get" : { + "description" : "Get information for the specified build trigger.", + "operationId" : "getBuildTrigger", + "parameters" : [ { + "description" : "The UUID of the build trigger", + "in" : "path", + "name" : "trigger_uuid", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "trigger" ] + }, + "put" : { + "description" : "Updates the specified build trigger.", + "operationId" : "updateBuildTrigger", + "parameters" : [ { + "description" : "The UUID of the build trigger", + "in" : "path", + "name" : "trigger_uuid", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/UpdateTrigger" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "trigger" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.trigger.BuildTrigger", + "x-path" : "/api/v1/repository/{repository}/trigger/{trigger_uuid}", + "x-tag" : "trigger" + }, + "/api/v1/repository/{repository}/trigger/{trigger_uuid}/activate" : { + "post" : { + "description" : "Activate the specified build trigger.", + "operationId" : "activateBuildTrigger", + "parameters" : [ { + "description" : "The UUID of the build trigger", + "in" : "path", + "name" : "trigger_uuid", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/BuildTriggerActivateRequest" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "trigger" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.trigger.BuildTriggerActivate", + "x-path" : "/api/v1/repository/{repository}/trigger/{trigger_uuid}/activate", + "x-tag" : "trigger" + }, + "/api/v1/repository/{repository}/trigger/{trigger_uuid}/start" : { + "post" : { + "description" : "Manually start a build from the specified trigger.", + "operationId" : "manuallyStartBuildTrigger", + "parameters" : [ { + "description" : "The UUID of the build trigger", + "in" : "path", + "name" : "trigger_uuid", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/RunParameters" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "trigger" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.trigger.ActivateBuildTrigger", + "x-path" : "/api/v1/repository/{repository}/trigger/{trigger_uuid}/start", + "x-tag" : "trigger" + }, + "/api/v1/repository/{repository}/trigger/{trigger_uuid}/builds" : { + "get" : { + "description" : "List the builds started by the specified trigger.", + "operationId" : "listTriggerRecentBuilds", + "parameters" : [ { + "description" : "The UUID of the build trigger", + "in" : "path", + "name" : "trigger_uuid", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "description" : "The maximum number of builds to return", + "in" : "query", + "name" : "limit", + "schema" : { + "type" : "integer" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:admin" ] + } ], + "tags" : [ "trigger" ] + }, + "x-name" : "endpoints.api.trigger.TriggerBuildList", + "x-path" : "/api/v1/repository/{repository}/trigger/{trigger_uuid}/builds", + "x-tag" : "trigger" + }, + "/api/v1/user/" : { + "get" : { + "description" : "Get user information for the authenticated user.", + "operationId" : "getLoggedInUser", + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/UserView" + } + } + }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:read" ] + } ], + "tags" : [ "user" ] + }, + "x-name" : "endpoints.api.user.User", + "x-path" : "/api/v1/user/", + "x-tag" : "user" + }, + "/api/v1/user/starred" : { + "get" : { + "description" : "List all starred repositories.", + "operationId" : "listStarredRepos", + "parameters" : [ { + "description" : "The page token for the next page", + "in" : "query", + "name" : "next_page", + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "user" ] + }, + "post" : { + "description" : "Star a repository.", + "operationId" : "createStar", + "requestBody" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/NewStarredRepository" + } + } + }, + "description" : "Request body contents.", + "required" : true + }, + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "201" : { + "content" : { }, + "description" : "Successful creation" + } + }, + "security" : [ { + "oauth2_implicit" : [ "repo:read" ] + } ], + "tags" : [ "user" ], + "x-codegen-request-body-name" : "body" + }, + "x-name" : "endpoints.api.user.StarredRepositoryList", + "x-path" : "/api/v1/user/starred", + "x-tag" : "user" + }, + "/api/v1/user/starred/{repository}" : { + "delete" : { + "description" : "Removes a star from a repository.", + "operationId" : "deleteStar", + "parameters" : [ { + "description" : "The full path of the repository. e.g. namespace/name", + "in" : "path", + "name" : "repository", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "204" : { + "content" : { }, + "description" : "Deleted" + } + }, + "security" : [ { + "oauth2_implicit" : [ "user:admin" ] + } ], + "tags" : [ "user" ] + }, + "x-name" : "endpoints.api.user.StarredRepository", + "x-path" : "/api/v1/user/starred/{repository}", + "x-tag" : "user" + }, + "/api/v1/users/{username}" : { + "get" : { + "description" : "Get user information for the specified user.", + "operationId" : "getUserInformation", + "parameters" : [ { + "in" : "path", + "name" : "username", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Bad Request" + }, + "401" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Session required" + }, + "403" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Unauthorized access" + }, + "404" : { + "content" : { + "*/*" : { + "schema" : { + "$ref" : "#/components/schemas/ApiError" + } + } + }, + "description" : "Not found" + }, + "200" : { + "content" : { }, + "description" : "Successful invocation" + } + }, + "tags" : [ "user" ] + }, + "x-name" : "endpoints.api.user.Users", + "x-path" : "/api/v1/users/{username}", + "x-tag" : "user" + }, + "/userfiles/{file_id}" : { + "x-name" : "data.userfiles.UserfilesHandlers", + "x-path" : "/userfiles/{file_id}", + "x-tag" : "userfiles" + } + }, + "components" : { + "schemas" : { + "ApiError" : { + "properties" : { + "status" : { + "description" : "Status code of the response.", + "type" : "integer" + }, + "type" : { + "description" : "Reference to the type of the error.", + "type" : "string" + }, + "detail" : { + "description" : "Details about the specific instance of the error.", + "type" : "string" + }, + "title" : { + "description" : "Unique error code to identify the type of error.", + "type" : "string" + }, + "error_message" : { + "description" : "Deprecated; alias for detail", + "type" : "string" + }, + "error_type" : { + "description" : "Deprecated; alias for detail", + "type" : "string" + } + }, + "required" : [ "status", "title", "type" ], + "type" : "object" + }, + "NewToken" : { + "description" : "Description of a new token.", + "properties" : { + "friendlyName" : { + "description" : "Friendly name to help identify the token", + "type" : "string" + } + }, + "required" : [ "friendlyName" ], + "type" : "object" + }, + "RepositoryBuildRequest" : { + "description" : "Description of a new repository build.", + "properties" : { + "file_id" : { + "description" : "The file id that was generated when the build spec was uploaded", + "type" : "string" + }, + "archive_url" : { + "description" : "The URL of the .tar.gz to build. Must start with \"http\" or \"https\".", + "type" : "string" + }, + "subdirectory" : { + "description" : "Subdirectory in which the Dockerfile can be found. You can only specify this or dockerfile_path", + "type" : "string" + }, + "dockerfile_path" : { + "description" : "Path to a dockerfile. You can only specify this or subdirectory.", + "type" : "string" + }, + "context" : { + "description" : "Pass in the context for the dockerfile. This is optional.", + "type" : "string" + }, + "pull_robot" : { + "description" : "Username of a Quay robot account to use as pull credentials", + "type" : "string" + }, + "docker_tags" : { + "description" : "The tags to which the built images will be pushed. If none specified, \"latest\" is used.", + "items" : { + "type" : "string" + }, + "minItems" : 1, + "type" : "array", + "uniqueItems" : true + } + }, + "type" : "object" + }, + "ApiErrorDescription" : { + "description" : "Description of an error", + "properties" : { + "type" : { + "description" : "A reference to the error type resource", + "type" : "string" + }, + "title" : { + "description" : "The title of the error. Can be used to uniquely identify the kind of error.", + "enum" : [ "external_service_timeout", "invalid_request", "invalid_response", "invalid_token", "expired_token", "insufficient_scope", "fresh_login_required", "exceeds_license", "not_found", "downstream_issue" ], + "type" : "string" + }, + "description" : { + "description" : "A more detailed description of the error that may include help for fixing the issue.", + "type" : "string" + } + }, + "required" : [ "description", "title", "type" ], + "type" : "object" + }, + "CreateMessage" : { + "description" : "Create a new message", + "properties" : { + "message" : { + "$ref" : "#/components/schemas/CreateMessage_message" + } + }, + "type" : "object" + }, + "ExportLogs" : { + "description" : "Configuration for an export logs operation", + "properties" : { + "callback_url" : { + "description" : "The callback URL to invoke with a link to the exported logs", + "type" : "string" + }, + "callback_email" : { + "description" : "The e-mail address at which to e-mail a link to the exported logs", + "type" : "string" + } + }, + "type" : "object" + }, + "AddLabel" : { + "description" : "Adds a label to a manifest", + "properties" : { + "key" : { + "description" : "The key for the label", + "type" : "string" + }, + "value" : { + "description" : "The value for the label", + "type" : "string" + } + }, + "required" : [ "key", "value" ], + "type" : "object" + }, + "NewOrgQuota" : { + "description" : "Description of a new organization quota", + "properties" : { + "limit_bytes" : { + "description" : "Number of bytes the organization is allowed", + "type" : "integer" + } + }, + "required" : [ "limit_bytes" ], + "type" : "object" + }, + "UpdateOrgQuota" : { + "description" : "Description of a new organization quota", + "properties" : { + "limit_bytes" : { + "description" : "Number of bytes the organization is allowed", + "type" : "integer" + } + }, + "type" : "object" + }, + "NewOrgQuotaLimit" : { + "description" : "Description of a new organization quota limit", + "properties" : { + "type" : { + "description" : "Type of quota limit: \"Warning\" or \"Reject\"", + "type" : "string" + }, + "threshold_percent" : { + "description" : "Quota threshold, in percent of quota", + "type" : "integer" + } + }, + "required" : [ "threshold_percent", "type" ], + "type" : "object" + }, + "UpdateOrgQuotaLimit" : { + "description" : "Description of changing organization quota limit", + "properties" : { + "type" : { + "description" : "Type of quota limit: \"Warning\" or \"Reject\"", + "type" : "string" + }, + "threshold_percent" : { + "description" : "Quota threshold, in percent of quota", + "type" : "integer" + } + }, + "type" : "object" + }, + "NewUser" : { + "description" : "Fields which must be specified for a new user.", + "properties" : { + "username" : { + "description" : "The user's username", + "type" : "string" + }, + "password" : { + "description" : "The user's password", + "type" : "string" + }, + "email" : { + "description" : "The user's email address", + "type" : "string" + }, + "invite_code" : { + "description" : "The optional invite code", + "type" : "string" + }, + "recaptcha_response" : { + "description" : "The (may be disabled) recaptcha response code for verification", + "type" : "string" + } + }, + "required" : [ "password", "username" ], + "type" : "object" + }, + "UpdateUser" : { + "description" : "Fields which can be updated in a user.", + "properties" : { + "password" : { + "description" : "The user's password", + "type" : "string" + }, + "invoice_email" : { + "description" : "Whether the user desires to receive an invoice email.", + "type" : "boolean" + }, + "email" : { + "description" : "The user's email address", + "type" : "string" + }, + "tag_expiration_s" : { + "description" : "The number of seconds for tag expiration", + "minimum" : 0, + "type" : "integer" + }, + "username" : { + "description" : "The user's username", + "type" : "string" + } + }, + "type" : "object" + }, + "UserView" : { + "description" : "Describes a user", + "properties" : { + "verified" : { + "description" : "Whether the user's email address has been verified", + "type" : "boolean" + }, + "anonymous" : { + "description" : "true if this user data represents a guest user", + "type" : "boolean" + }, + "email" : { + "description" : "The user's email address", + "type" : "string" + }, + "avatar" : { + "description" : "Avatar data representing the user's icon", + "properties" : { }, + "type" : "object" + }, + "organizations" : { + "description" : "Information about the organizations in which the user is a member", + "items" : { + "properties" : { }, + "type" : "object" + }, + "type" : "array" + }, + "logins" : { + "description" : "The list of external login providers against which the user has authenticated", + "items" : { + "properties" : { }, + "type" : "object" + }, + "type" : "array" + }, + "can_create_repo" : { + "description" : "Whether the user has permission to create repositories", + "type" : "boolean" + }, + "preferred_namespace" : { + "description" : "If true, the user's namespace is the preferred namespace to display", + "type" : "boolean" + } + }, + "required" : [ "anonymous", "avatar" ], + "type" : "object" + }, + "NewStarredRepository" : { + "properties" : { + "namespace" : { + "description" : "Namespace in which the repository belongs", + "type" : "string" + }, + "repository" : { + "description" : "Repository name", + "type" : "string" + } + }, + "required" : [ "namespace", "repository" ], + "type" : "object" + }, + "NewOrg" : { + "description" : "Description of a new organization.", + "properties" : { + "name" : { + "description" : "Organization username", + "type" : "string" + }, + "email" : { + "description" : "Organization contact email", + "type" : "string" + }, + "recaptcha_response" : { + "description" : "The (may be disabled) recaptcha response code for verification", + "type" : "string" + } + }, + "required" : [ "name", "email" ], + "type" : "object" + }, + "UpdateOrg" : { + "description" : "Description of updates for an organization", + "properties" : { + "name" : { + "description" : "The new name for the organization", + "type" : "string" + }, + "email" : { + "description" : "Organization contact email", + "type" : "string" + } + }, + "type" : "object" + }, + "NewApp" : { + "description" : "Description of a new organization application.", + "properties" : { + "name" : { + "description" : "The name of the application", + "type" : "string" + }, + "redirect_uri" : { + "description" : "The URI for the application's OAuth redirect", + "type" : "string" + }, + "application_uri" : { + "description" : "The URI for the application's homepage", + "type" : "string" + }, + "description" : { + "description" : "The human-readable description for the application", + "type" : "string" + }, + "avatar_email" : { + "description" : "The e-mail address of the avatar to use for the application", + "type" : "string" + } + }, + "required" : [ "name" ], + "type" : "object" + }, + "UpdateApp" : { + "description" : "Description of an updated application.", + "properties" : { + "name" : { + "description" : "The name of the application", + "type" : "string" + }, + "redirect_uri" : { + "description" : "The URI for the application's OAuth redirect", + "type" : "string" + }, + "application_uri" : { + "description" : "The URI for the application's homepage", + "type" : "string" + }, + "description" : { + "description" : "The human-readable description for the application", + "type" : "string" + }, + "avatar_email" : { + "description" : "The e-mail address of the avatar to use for the application", + "type" : "string" + } + }, + "required" : [ "application_uri", "name", "redirect_uri" ], + "type" : "object" + }, + "UserPermission" : { + "description" : "Description of a user permission.", + "properties" : { + "role" : { + "description" : "Role to use for the user", + "enum" : [ "read", "write", "admin" ], + "type" : "string" + } + }, + "required" : [ "role" ], + "type" : "object" + }, + "TeamPermission" : { + "description" : "Description of a team permission.", + "properties" : { + "role" : { + "description" : "Role to use for the team", + "enum" : [ "read", "write", "admin" ], + "type" : "string" + } + }, + "required" : [ "role" ], + "type" : "object" + }, + "NewPrototype" : { + "description" : "Description of a new prototype", + "properties" : { + "role" : { + "description" : "Role that should be applied to the delegate", + "enum" : [ "read", "write", "admin" ], + "type" : "string" + }, + "activating_user" : { + "$ref" : "#/components/schemas/NewPrototype_activating_user" + }, + "delegate" : { + "$ref" : "#/components/schemas/NewPrototype_delegate" + } + }, + "required" : [ "delegate", "role" ], + "type" : "object" + }, + "PrototypeUpdate" : { + "description" : "Description of a the new prototype role", + "properties" : { + "role" : { + "description" : "Role that should be applied to the permission", + "enum" : [ "read", "write", "admin" ], + "type" : "string" + } + }, + "required" : [ "role" ], + "type" : "object" + }, + "NewRepo" : { + "description" : "Description of a new repository", + "properties" : { + "repository" : { + "description" : "Repository name", + "type" : "string" + }, + "visibility" : { + "description" : "Visibility which the repository will start with", + "enum" : [ "public", "private" ], + "type" : "string" + }, + "namespace" : { + "description" : "Namespace in which the repository should be created. If omitted, the username of the caller is used", + "type" : "string" + }, + "description" : { + "description" : "Markdown encoded description for the repository", + "type" : "string" + } + }, + "required" : [ "description", "repository", "visibility" ], + "type" : "object" + }, + "RepoUpdate" : { + "description" : "Fields which can be updated in a repository.", + "properties" : { + "description" : { + "description" : "Markdown encoded description for the repository", + "type" : "string" + } + }, + "required" : [ "description" ], + "type" : "object" + }, + "ChangeVisibility" : { + "description" : "Change the visibility for the repository.", + "properties" : { + "visibility" : { + "description" : "Visibility which the repository will start with", + "enum" : [ "public", "private" ], + "type" : "string" + } + }, + "required" : [ "visibility" ], + "type" : "object" + }, + "NotificationCreateRequest" : { + "description" : "Information for creating a notification on a repository", + "properties" : { + "event" : { + "description" : "The event on which the notification will respond", + "type" : "string" + }, + "method" : { + "description" : "The method of notification (such as email or web callback)", + "type" : "string" + }, + "config" : { + "description" : "JSON config information for the specific method of notification", + "properties" : { }, + "type" : "object" + }, + "eventConfig" : { + "description" : "JSON config information for the specific event of notification", + "properties" : { }, + "type" : "object" + }, + "title" : { + "description" : "The human-readable title of the notification", + "type" : "string" + } + }, + "required" : [ "config", "event", "eventConfig", "method" ], + "type" : "object" + }, + "TokenPermission" : { + "description" : "Description of a token permission", + "properties" : { + "role" : { + "description" : "Role to use for the token", + "enum" : [ "read", "write", "admin" ], + "type" : "string" + } + }, + "required" : [ "role" ], + "type" : "object" + }, + "CreateRobot" : { + "description" : "Optional data for creating a robot", + "properties" : { + "description" : { + "description" : "Optional text description for the robot", + "maxLength" : 255, + "type" : "string" + }, + "unstructured_metadata" : { + "description" : "Optional unstructured metadata for the robot", + "properties" : { }, + "type" : "object" + } + }, + "type" : "object" + }, + "NewNamespaceQuota" : { + "description" : "Description of a new organization quota", + "properties" : { + "limit_bytes" : { + "description" : "Number of bytes the organization is allowed", + "type" : "integer" + } + }, + "required" : [ "limit_bytes" ], + "type" : "object" + }, + "UpdateNamespaceQuota" : { + "description" : "Description of a new organization quota", + "properties" : { + "limit_bytes" : { + "description" : "Number of bytes the organization is allowed", + "type" : "integer" + } + }, + "type" : "object" + }, + "CreateInstallUser" : { + "description" : "Data for creating a user", + "properties" : { + "username" : { + "description" : "The username of the user being created", + "type" : "string" + }, + "email" : { + "description" : "The email address of the user being created", + "type" : "string" + } + }, + "required" : [ "username" ], + "type" : "object" + }, + "CreateServiceKey" : { + "description" : "Description of creation of a service key", + "properties" : { + "service" : { + "description" : "The service authenticating with this key", + "type" : "string" + }, + "name" : { + "description" : "The friendly name of a service key", + "type" : "string" + }, + "metadata" : { + "description" : "The key/value pairs of this key's metadata", + "properties" : { }, + "type" : "object" + }, + "notes" : { + "description" : "If specified, the extra notes for the key", + "type" : "string" + }, + "expiration" : { + "description" : "The expiration date as a unix timestamp", + "type" : "object" + } + }, + "required" : [ "expiration", "service" ], + "type" : "object" + }, + "PutServiceKey" : { + "description" : "Description of updates for a service key", + "properties" : { + "name" : { + "description" : "The friendly name of a service key", + "type" : "string" + }, + "metadata" : { + "description" : "The key/value pairs of this key's metadata", + "properties" : { }, + "type" : "object" + }, + "expiration" : { + "description" : "The expiration date as a unix timestamp", + "type" : "object" + } + }, + "type" : "object" + }, + "ApproveServiceKey" : { + "description" : "Information for approving service keys", + "properties" : { + "notes" : { + "description" : "Optional approval notes", + "type" : "string" + } + }, + "type" : "object" + }, + "ChangeTag" : { + "description" : "Makes changes to a specific tag", + "type" : "object" + }, + "RestoreTag" : { + "description" : "Restores a tag to a specific image", + "properties" : { + "manifest_digest" : { + "description" : "If specified, the manifest digest that should be used", + "type" : "string" + } + }, + "type" : "object" + }, + "TeamDescription" : { + "description" : "Description of a team", + "properties" : { + "role" : { + "description" : "Org wide permissions that should apply to the team", + "enum" : [ "member", "creator", "admin" ], + "type" : "string" + }, + "description" : { + "description" : "Markdown description for the team", + "type" : "string" + } + }, + "required" : [ "role" ], + "type" : "object" + }, + "UpdateTrigger" : { + "description" : "Options for updating a build trigger", + "properties" : { + "enabled" : { + "description" : "Whether the build trigger is enabled", + "type" : "boolean" + } + }, + "required" : [ "enabled" ], + "type" : "object" + }, + "BuildTriggerActivateRequest" : { + "properties" : { + "config" : { + "description" : "Arbitrary json.", + "properties" : { }, + "type" : "object" + }, + "pull_robot" : { + "description" : "The name of the robot that will be used to pull images.", + "type" : "string" + } + }, + "required" : [ "config" ], + "type" : "object" + }, + "RunParameters" : { + "additionalProperties" : false, + "description" : "Optional run parameters for activating the build trigger", + "properties" : { + "branch_name" : { + "description" : "(SCM only) If specified, the name of the branch to build.", + "type" : "string" + }, + "commit_sha" : { + "description" : "(Custom Only) If specified, the ref/SHA1 used to checkout a git repository.", + "type" : "string" + } + }, + "type" : "object" + }, + "CreateMessage_message" : { + "description" : "A single message", + "properties" : { + "content" : { + "description" : "The actual message", + "type" : "string" + }, + "media_type" : { + "description" : "The media type of the message", + "enum" : [ "text/plain", "text/markdown" ], + "type" : "string" + }, + "severity" : { + "description" : "The severity of the message", + "enum" : [ "info", "warning", "error" ], + "type" : "string" + } + }, + "required" : [ "content", "media_type", "severity" ], + "type" : "object" + }, + "NewPrototype_activating_user" : { + "description" : "Repository creating user to whom the rule should apply", + "properties" : { + "name" : { + "description" : "The username for the activating_user", + "type" : "string" + } + }, + "required" : [ "name" ], + "type" : "object" + }, + "NewPrototype_delegate" : { + "description" : "Information about the user or team to which the rule grants access", + "properties" : { + "name" : { + "description" : "The name for the delegate team or user", + "type" : "string" + }, + "kind" : { + "description" : "Whether the delegate is a user or a team", + "enum" : [ "user", "team" ], + "type" : "string" + } + }, + "required" : [ "kind", "name" ], + "type" : "object" + } + }, + "securitySchemes" : { + "oauth2_implicit" : { + "flows" : { + "implicit" : { + "authorizationUrl" : "https://quay.example.com/oauth/authorize", + "scopes" : { + "repo:read" : "This application will be able to view and pull all repositories visible to the granting user or robot account", + "repo:write" : "This application will be able to view, push and pull to all repositories to which the granting user or robot account has write access", + "repo:admin" : "This application will have administrator access to all repositories to which the granting user or robot account has access", + "repo:create" : "This application will be able to create repositories in to any namespaces that the granting user or robot account is allowed to create repositories", + "user:read" : "This application will be able to read user information such as username and email address.", + "org:admin" : "This application will be able to administer your organizations including creating robots, creating teams, adjusting team membership, and changing billing settings. You should have absolute trust in the requesting application before granting this permission.", + "super:user" : "This application will be able to administer your installation including managing users, managing organizations and other features found in the superuser panel. You should have absolute trust in the requesting application before granting this permission.", + "user:admin" : "This application will be able to administer your account including creating robots and granting them permissions to your repositories. You should have absolute trust in the requesting application before granting this permission." + } + } + }, + "type" : "oauth2" + } + } + }, + "x-original-swagger-version" : "2.0" +} \ No newline at end of file diff --git a/examples/data-sources/quay_organization/data-source.tf b/examples/data-sources/quay_organization/data-source.tf new file mode 100644 index 0000000..ddf02d5 --- /dev/null +++ b/examples/data-sources/quay_organization/data-source.tf @@ -0,0 +1,3 @@ +data "quay_organization" "main" { + name = "main" +} diff --git a/examples/main.tf b/examples/main.tf new file mode 100644 index 0000000..3ec6c40 --- /dev/null +++ b/examples/main.tf @@ -0,0 +1,16 @@ +terraform { + required_providers { + quay = { + source = "registry.terraform.io/enthought/quay" + } + } +} + +provider "quay" { + url = "https://quay.example.com" +} + +resource "quay_organization" "main" { + name = "main" + email = "quay+main@example.com" +} diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf new file mode 100644 index 0000000..1bdfa93 --- /dev/null +++ b/examples/provider/provider.tf @@ -0,0 +1,3 @@ +provider "quay" { + url = "https://quay.example.com" +} diff --git a/examples/resources/quay_organization/import.sh b/examples/resources/quay_organization/import.sh new file mode 100644 index 0000000..4c047fe --- /dev/null +++ b/examples/resources/quay_organization/import.sh @@ -0,0 +1,2 @@ +# An organization can be imported using its name. +terraform import quay_organization.main main diff --git a/examples/resources/quay_organization/resource.tf b/examples/resources/quay_organization/resource.tf new file mode 100644 index 0000000..c38e32e --- /dev/null +++ b/examples/resources/quay_organization/resource.tf @@ -0,0 +1,4 @@ +resource "quay_organization" "main" { + name = "main" + email = "quay+main@example.com" +} diff --git a/generate_quay_api.sh b/generate_quay_api.sh new file mode 100644 index 0000000..a64825f --- /dev/null +++ b/generate_quay_api.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +openapi-generator generate --generator-name go --git-user-id enthought --git-repo-id terraform-provider-quay --additional-properties=packageName=quay_api,isGoSubmodule=true --skip-validate-spec --input-spec code_generator/quay_api.json --output quay_api +gofmt -w quay_api +cd quay_api +go mod tidy diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..03fded0 --- /dev/null +++ b/go.mod @@ -0,0 +1,88 @@ +module terraform-provider-quay + +go 1.22 + +replace github.com/enthought/terraform-provider-quay/quay_api => ./quay_api + +require ( + github.com/enthought/terraform-provider-quay/quay_api v0.0.0-00010101000000-000000000000 + github.com/hashicorp/terraform-plugin-framework v1.10.0 + github.com/hashicorp/terraform-plugin-go v0.23.0 + github.com/hashicorp/terraform-plugin-log v0.9.0 + github.com/hashicorp/terraform-plugin-testing v1.9.0 +) + +require ( + github.com/BurntSushi/toml v1.2.1 // indirect + github.com/Kunde21/markdownfmt/v3 v3.1.0 // indirect + github.com/Masterminds/goutils v1.1.1 // indirect + github.com/Masterminds/semver/v3 v3.2.0 // indirect + github.com/Masterminds/sprig/v3 v3.2.3 // indirect + github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect + github.com/agext/levenshtein v1.2.2 // indirect + github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect + github.com/armon/go-radix v1.0.0 // indirect + github.com/bgentry/speakeasy v0.1.0 // indirect + github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect + github.com/cloudflare/circl v1.3.7 // indirect + github.com/fatih/color v1.16.0 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/hashicorp/cli v1.1.6 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-checkpoint v0.5.0 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect + github.com/hashicorp/go-hclog v1.6.3 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-plugin v1.6.0 // indirect + github.com/hashicorp/go-uuid v1.0.3 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect + github.com/hashicorp/hc-install v0.7.0 // indirect + github.com/hashicorp/hcl/v2 v2.21.0 // indirect + github.com/hashicorp/logutils v1.0.0 // indirect + github.com/hashicorp/terraform-exec v0.21.0 // indirect + github.com/hashicorp/terraform-json v0.22.1 // indirect + github.com/hashicorp/terraform-plugin-docs v0.19.4 // indirect + github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 // indirect + github.com/hashicorp/terraform-registry-address v0.2.3 // indirect + github.com/hashicorp/terraform-svchost v0.1.1 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect + github.com/huandu/xstrings v1.3.3 // indirect + github.com/imdario/mergo v0.3.15 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-runewidth v0.0.9 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/go-testing-interface v1.14.1 // indirect + github.com/mitchellh/go-wordwrap v1.0.0 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/oklog/run v1.0.0 // indirect + github.com/posener/complete v1.2.3 // indirect + github.com/shopspring/decimal v1.3.1 // indirect + github.com/spf13/cast v1.5.0 // indirect + github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect + github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + github.com/yuin/goldmark v1.7.1 // indirect + github.com/yuin/goldmark-meta v1.1.0 // indirect + github.com/zclconf/go-cty v1.14.4 // indirect + go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect + golang.org/x/crypto v0.25.0 // indirect + golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/text v0.16.0 // indirect + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/grpc v1.63.2 // indirect + google.golang.org/protobuf v1.34.0 // indirect + gopkg.in/yaml.v2 v2.3.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..3bf4981 --- /dev/null +++ b/go.sum @@ -0,0 +1,277 @@ +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= +github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/Kunde21/markdownfmt/v3 v3.1.0 h1:KiZu9LKs+wFFBQKhrZJrFZwtLnCCWJahL+S+E/3VnM0= +github.com/Kunde21/markdownfmt/v3 v3.1.0/go.mod h1:tPXN1RTyOzJwhfHoon9wUr4HGYmWgVxSQN6VBJDkrVc= +github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= +github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= +github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= +github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/ProtonMail/go-crypto v1.1.0-alpha.2 h1:bkyFVUP+ROOARdgCiJzNQo2V2kiB97LyUpzH9P6Hrlg= +github.com/ProtonMail/go-crypto v1.1.0-alpha.2/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= +github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= +github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= +github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= +github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= +github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= +github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= +github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= +github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= +github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= +github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= +github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= +github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= +github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= +github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= +github.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys= +github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY= +github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= +github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/cli v1.1.6 h1:CMOV+/LJfL1tXCOKrgAX0uRKnzjj/mpmqNXloRSy2K8= +github.com/hashicorp/cli v1.1.6/go.mod h1:MPon5QYlgjjo0BSoAiN0ESeT5fRzDjVRp+uioJ0piz4= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= +github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= +github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= +github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/hc-install v0.7.0 h1:Uu9edVqjKQxxuD28mR5TikkKDd/p55S8vzPC1659aBk= +github.com/hashicorp/hc-install v0.7.0/go.mod h1:ELmmzZlGnEcqoUMKUuykHaPCIR1sYLYX+KSggWSKZuA= +github.com/hashicorp/hcl/v2 v2.21.0 h1:lve4q/o/2rqwYOgUg3y3V2YPyD1/zkCLGjIV74Jit14= +github.com/hashicorp/hcl/v2 v2.21.0/go.mod h1:62ZYHrXgPoX8xBnzl8QzbWq4dyDsDtfCRgIq1rbJEvA= +github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/terraform-exec v0.21.0 h1:uNkLAe95ey5Uux6KJdua6+cv8asgILFVWkd/RG0D2XQ= +github.com/hashicorp/terraform-exec v0.21.0/go.mod h1:1PPeMYou+KDUSSeRE9szMZ/oHf4fYUmB923Wzbq1ICg= +github.com/hashicorp/terraform-json v0.22.1 h1:xft84GZR0QzjPVWs4lRUwvTcPnegqlyS7orfb5Ltvec= +github.com/hashicorp/terraform-json v0.22.1/go.mod h1:JbWSQCLFSXFFhg42T7l9iJwdGXBYV8fmmD6o/ML4p3A= +github.com/hashicorp/terraform-plugin-docs v0.19.4 h1:G3Bgo7J22OMtegIgn8Cd/CaSeyEljqjH3G39w28JK4c= +github.com/hashicorp/terraform-plugin-docs v0.19.4/go.mod h1:4pLASsatTmRynVzsjEhbXZ6s7xBlUw/2Kt0zfrq8HxA= +github.com/hashicorp/terraform-plugin-framework v1.10.0 h1:xXhICE2Fns1RYZxEQebwkB2+kXouLC932Li9qelozrc= +github.com/hashicorp/terraform-plugin-framework v1.10.0/go.mod h1:qBXLDn69kM97NNVi/MQ9qgd1uWWsVftGSnygYG1tImM= +github.com/hashicorp/terraform-plugin-go v0.23.0 h1:AALVuU1gD1kPb48aPQUjug9Ir/125t+AAurhqphJ2Co= +github.com/hashicorp/terraform-plugin-go v0.23.0/go.mod h1:1E3Cr9h2vMlahWMbsSEcNrOCxovCZhOOIXjFHbjc/lQ= +github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= +github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 h1:kJiWGx2kiQVo97Y5IOGR4EMcZ8DtMswHhUuFibsCQQE= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0/go.mod h1:sl/UoabMc37HA6ICVMmGO+/0wofkVIRxf+BMb/dnoIg= +github.com/hashicorp/terraform-plugin-testing v1.9.0 h1:xOsQRqqlHKXpFq6etTxih3ubdK3HVDtfE1IY7Rpd37o= +github.com/hashicorp/terraform-plugin-testing v1.9.0/go.mod h1:fhhVx/8+XNJZTD5o3b4stfZ6+q7z9+lIWigIYdT6/44= +github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI= +github.com/hashicorp/terraform-registry-address v0.2.3/go.mod h1:lFHA76T8jfQteVfT7caREqguFrW3c4MFSPhZB7HHgUM= +github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= +github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= +github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= +github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= +github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= +github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= +github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= +github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= +github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A= +github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= +github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= +github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= +github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= +github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yuin/goldmark v1.7.1 h1:3bajkSilaCbjdKVsKdZjZCLBNPL9pYzrCakKaf4U49U= +github.com/yuin/goldmark v1.7.1/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= +github.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUeiOUc= +github.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBvXi1lBb2VP0= +github.com/zclconf/go-cty v1.14.4 h1:uXXczd9QDGsgu0i/QFR/hzI5NYCHLf6NQw/atrbnhq8= +github.com/zclconf/go-cty v1.14.4/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo= +github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM= +go.abhg.dev/goldmark/frontmatter v0.2.0 h1:P8kPG0YkL12+aYk2yU3xHv4tcXzeVnN+gU0tJ5JnxRw= +go.abhg.dev/goldmark/frontmatter v0.2.0/go.mod h1:XqrEkZuM57djk7zrlRUB02x8I5J0px76YjkOzhB4YlU= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME= +golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= +golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= +google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/datasource_organization/organization_data_source_gen.go b/internal/datasource_organization/organization_data_source_gen.go new file mode 100644 index 0000000..b76e2be --- /dev/null +++ b/internal/datasource_organization/organization_data_source_gen.go @@ -0,0 +1,32 @@ +// Code generated by terraform-plugin-framework-generator DO NOT EDIT. + +package datasource_organization + +import ( + "context" + "github.com/hashicorp/terraform-plugin-framework/types" + + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" +) + +func OrganizationDataSourceSchema(ctx context.Context) schema.Schema { + return schema.Schema{ + Attributes: map[string]schema.Attribute{ + "email": schema.StringAttribute{ + Computed: true, + Description: "Organization contact email", + MarkdownDescription: "Organization contact email", + }, + "name": schema.StringAttribute{ + Required: true, + Description: "Organization name", + MarkdownDescription: "Organization name", + }, + }, + } +} + +type OrganizationModel struct { + Email types.String `tfsdk:"email"` + Name types.String `tfsdk:"name"` +} diff --git a/internal/provider/helpers.go b/internal/provider/helpers.go new file mode 100644 index 0000000..eacec48 --- /dev/null +++ b/internal/provider/helpers.go @@ -0,0 +1,8 @@ +package provider + +import "net/url" + +func isValidURL(u string) bool { + _, err := url.ParseRequestURI(u) + return err == nil +} diff --git a/internal/provider/organization_data_source.go b/internal/provider/organization_data_source.go new file mode 100644 index 0000000..8aa4f93 --- /dev/null +++ b/internal/provider/organization_data_source.go @@ -0,0 +1,102 @@ +package provider + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/types" + + "github.com/enthought/terraform-provider-quay/quay_api" + "terraform-provider-quay/internal/datasource_organization" +) + +var ( + _ datasource.DataSource = (*organizationDataSource)(nil) + _ datasource.DataSourceWithConfigure = (*organizationDataSource)(nil) +) + +func NewOrganizationDataSource() datasource.DataSource { + return &organizationDataSource{} +} + +type organizationDataSource struct { + client *quay_api.APIClient +} + +func (d *organizationDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) { + resp.TypeName = req.ProviderTypeName + "_organization" +} + +func (d *organizationDataSource) Schema(ctx context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) { + resp.Schema = datasource_organization.OrganizationDataSourceSchema(ctx) +} + +func (d *organizationDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) { + var data datasource_organization.OrganizationModel + var resData OrganizationModelJSON + var apiErr *quay_api.GenericOpenAPIError + + // Read Terraform configuration data into the model + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + // Get data from API + httpRes, err := d.client.OrganizationAPI.GetOrganization(context.Background(), data.Name.ValueString()).Execute() + if err != nil { + errDetail := "" + if errors.As(err, &apiErr) { + errDetail = string(apiErr.Body()) + } else { + errDetail = err.Error() + } + resp.Diagnostics.AddError( + "Error reading Quay org", + "Could not read Quay org, unexpected error: "+errDetail) + return + } + + body, err := io.ReadAll(httpRes.Body) + if err != nil { + resp.Diagnostics.AddError( + "Error reading Quay org", + "Could not read Quay org, unexpected error: "+err.Error()) + return + } + err = json.Unmarshal(body, &resData) + if err != nil { + resp.Diagnostics.AddError( + "Error reading Quay org", + "Could not read Quay org, unexpected error: "+err.Error()) + return + } + + // Set values from API + data.Name = types.StringValue(resData.Name) + data.Email = types.StringValue(resData.Email) + + // Save data into Terraform state + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (d *organizationDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse) { + if req.ProviderData == nil { + return + } + + client, ok := req.ProviderData.(*quay_api.APIClient) + if !ok { + resp.Diagnostics.AddError( + "Unexpected Data Source Configure Type", + fmt.Sprintf("Expected *quay_api.APIClient, got: %T. Please report this issue to the provider developers.", req.ProviderData), + ) + } + + d.client = client +} diff --git a/internal/provider/organization_data_source_test.go b/internal/provider/organization_data_source_test.go new file mode 100644 index 0000000..b2334a2 --- /dev/null +++ b/internal/provider/organization_data_source_test.go @@ -0,0 +1,36 @@ +package provider + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" +) + +func TestAccOrganizationDataSource(t *testing.T) { + resource.Test(t, resource.TestCase{ + ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, + Steps: []resource.TestStep{ + // Create and read resource + { + Config: providerConfig + ` +resource "quay_organization" "test" { + name = "test" + email = "quay+test@example.com" +} + +data "quay_organization" "test" { + name = "test" + + depends_on = [ + quay_organization.test + ] +} +`, + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("data.quay_organization.test", "name", "test"), + resource.TestCheckResourceAttr("data.quay_organization.test", "email", "quay+test@example.com"), + ), + }, + }, + }) +} diff --git a/internal/provider/organization_resource.go b/internal/provider/organization_resource.go new file mode 100644 index 0000000..2c60fe2 --- /dev/null +++ b/internal/provider/organization_resource.go @@ -0,0 +1,232 @@ +package provider + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/types" + + "github.com/enthought/terraform-provider-quay/quay_api" + "terraform-provider-quay/internal/resource_organization" +) + +var ( + _ resource.Resource = (*organizationResource)(nil) + _ resource.ResourceWithConfigure = (*organizationResource)(nil) + _ resource.ResourceWithImportState = (*organizationResource)(nil) +) + +func NewOrganizationResource() resource.Resource { + return &organizationResource{} +} + +type organizationResource struct { + client *quay_api.APIClient +} + +type OrganizationModelJSON struct { + Email string `json:"email"` + Name string `json:"name"` +} + +func (r *organizationResource) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) { + resp.TypeName = req.ProviderTypeName + "_organization" +} + +func (r *organizationResource) Schema(ctx context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { + resp.Schema = resource_organization.OrganizationResourceSchema(ctx) +} + +func (r *organizationResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) { + var data resource_organization.OrganizationModel + var apiErr *quay_api.GenericOpenAPIError + + // Read Terraform plan data into the model + resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + // Create API call logic + newOrg := quay_api.NewNewOrg(data.Name.ValueString(), data.Email.ValueString()) + _, err := r.client.OrganizationAPI.CreateOrganization(context.Background()).Body(*newOrg).Execute() + if err != nil { + errDetail := "" + if errors.As(err, &apiErr) { + errDetail = string(apiErr.Body()) + } else { + errDetail = err.Error() + } + resp.Diagnostics.AddError( + "Error creating Quay org", + "Could not create Quay org, unexpected error: "+errDetail) + return + } + + // Save data into Terraform state + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (r *organizationResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { + var data resource_organization.OrganizationModel + var resData OrganizationModelJSON + var apiErr *quay_api.GenericOpenAPIError + + // Read Terraform prior state data into the model + resp.Diagnostics.Append(req.State.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + + // Get data from API + httpRes, err := r.client.OrganizationAPI.GetOrganization(context.Background(), data.Name.ValueString()).Execute() + if err != nil { + errDetail := "" + if errors.As(err, &apiErr) { + errDetail = string(apiErr.Body()) + } else { + errDetail = err.Error() + } + resp.Diagnostics.AddError( + "Error reading Quay org", + "Could not read Quay org, unexpected error: "+errDetail) + return + } + + body, err := io.ReadAll(httpRes.Body) + if err != nil { + resp.Diagnostics.AddError( + "Error reading Quay org", + "Could not read Quay org, unexpected error: "+err.Error()) + return + } + err = json.Unmarshal(body, &resData) + if err != nil { + resp.Diagnostics.AddError( + "Error reading Quay org", + "Could not read Quay org, unexpected error: "+err.Error()) + return + } + + // Set values from API + data.Name = types.StringValue(resData.Name) + data.Email = types.StringValue(resData.Email) + + // Save updated data into Terraform state + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (r *organizationResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) { + var dataState resource_organization.OrganizationModel + var dataPlan resource_organization.OrganizationModel + var apiErr *quay_api.GenericOpenAPIError + + // Read Terraform prior state data into the model + resp.Diagnostics.Append(req.State.Get(ctx, &dataState)...) + + // Read Terraform plan data into the model + resp.Diagnostics.Append(req.Plan.Get(ctx, &dataPlan)...) + + if resp.Diagnostics.HasError() { + return + } + + // Update API call logic + // Update email first since the org path will change if the org name changes + if dataPlan.Email != dataState.Email { + updateOrg := quay_api.UpdateOrg{ + Name: dataState.Name.ValueStringPointer(), + Email: dataPlan.Email.ValueStringPointer(), + } + _, err := r.client.OrganizationAPI.ChangeOrganizationDetails(context.Background(), dataState.Name.ValueString()).Body(updateOrg).Execute() + if err != nil { + errDetail := "" + if errors.As(err, &apiErr) { + errDetail = string(apiErr.Body()) + } else { + errDetail = err.Error() + } + resp.Diagnostics.AddError( + "Error updating Quay org", + "Could not update Quay org, unexpected error: "+errDetail) + return + } + } + + if dataPlan.Name != dataState.Name { + updateOrg := quay_api.UpdateOrg{ + Name: dataPlan.Name.ValueStringPointer(), + Email: dataPlan.Email.ValueStringPointer(), + } + _, err := r.client.SuperuserAPI.ChangeOrganization(context.Background(), dataState.Name.ValueString()).Body(updateOrg).Execute() + if err != nil { + errDetail := "" + if errors.As(err, &apiErr) { + errDetail = string(apiErr.Body()) + } else { + errDetail = err.Error() + } + resp.Diagnostics.AddError( + "Error updating Quay org", + "Could not update Quay org, unexpected error: "+errDetail) + return + } + } + + // Save updated data into Terraform state + resp.Diagnostics.Append(resp.State.Set(ctx, &dataPlan)...) +} + +func (r *organizationResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { + var data resource_organization.OrganizationModel + var apiErr *quay_api.GenericOpenAPIError + + // Read Terraform prior state data into the model + resp.Diagnostics.Append(req.State.Get(ctx, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + // Delete API call logic + _, err := r.client.OrganizationAPI.DeleteAdminedOrganization(context.Background(), data.Name.ValueString()).Execute() + if err != nil { + errDetail := "" + if errors.As(err, &apiErr) { + errDetail = string(apiErr.Body()) + } else { + errDetail = err.Error() + } + resp.Diagnostics.AddError( + "Error deleting Quay org", + "Could not deleting Quay org, unexpected error: "+errDetail) + return + } +} + +func (r *organizationResource) Configure(_ context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { + if req.ProviderData == nil { + return + } + + client, ok := req.ProviderData.(*quay_api.APIClient) + if !ok { + resp.Diagnostics.AddError( + "Unexpected Resource Configure Type", + fmt.Sprintf("Expected *quay_api.APIClient, got: %T. Please report this issue to the provider developers.", req.ProviderData), + ) + } + + r.client = client +} + +func (r *organizationResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) { + // Retrieve import ID and save to name attribute + resource.ImportStatePassthroughID(ctx, path.Root("name"), req, resp) +} diff --git a/internal/provider/organization_resource_test.go b/internal/provider/organization_resource_test.go new file mode 100644 index 0000000..44f8471 --- /dev/null +++ b/internal/provider/organization_resource_test.go @@ -0,0 +1,75 @@ +package provider + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" +) + +func TestAccOrganizationResource(t *testing.T) { + resource.Test(t, resource.TestCase{ + ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, + Steps: []resource.TestStep{ + // Create and Read + { + Config: providerConfig + ` +resource "quay_organization" "test" { + name = "test" + email = "quay+test@example.com" +} +`, + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("quay_organization.test", "name", "test"), + resource.TestCheckResourceAttr("quay_organization.test", "email", "quay+test@example.com"), + ), + }, + // Import + { + ResourceName: "quay_organization.test", + ImportState: true, + ImportStateId: "test", + ImportStateVerify: true, + ImportStateVerifyIdentifierAttribute: "name", + }, + // Update name + { + Config: providerConfig + ` +resource "quay_organization" "test" { + name = "test2" + email = "quay+test@example.com" +} +`, + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("quay_organization.test", "name", "test2"), + resource.TestCheckResourceAttr("quay_organization.test", "email", "quay+test@example.com"), + ), + }, + // Update email + { + Config: providerConfig + ` +resource "quay_organization" "test" { + name = "test2" + email = "quay+test2@example.com" +} +`, + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("quay_organization.test", "name", "test2"), + resource.TestCheckResourceAttr("quay_organization.test", "email", "quay+test2@example.com"), + ), + }, + // Update name and email + { + Config: providerConfig + ` +resource "quay_organization" "test" { + name = "test3" + email = "quay+test3@example.com" +} +`, + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("quay_organization.test", "name", "test3"), + resource.TestCheckResourceAttr("quay_organization.test", "email", "quay+test3@example.com"), + ), + }, + }, + }) +} diff --git a/internal/provider/provider.go b/internal/provider/provider.go new file mode 100644 index 0000000..7d276fe --- /dev/null +++ b/internal/provider/provider.go @@ -0,0 +1,161 @@ +package provider + +import ( + "context" + "os" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/provider" + "github.com/hashicorp/terraform-plugin-framework/provider/schema" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-log/tflog" + + "github.com/enthought/terraform-provider-quay/quay_api" +) + +var _ provider.Provider = (*quayProvider)(nil) + +func New() func() provider.Provider { + return func() provider.Provider { + return &quayProvider{} + } +} + +type quayProvider struct{} + +type quayProviderModel struct { + Url types.String `tfsdk:"url"` + Token types.String `tfsdk:"token"` +} + +func (p *quayProvider) Schema(_ context.Context, _ provider.SchemaRequest, resp *provider.SchemaResponse) { + resp.Schema = schema.Schema{Attributes: map[string]schema.Attribute{ + "url": schema.StringAttribute{ + Description: "Quay URL. May also be provided via the QUAY_URL environment variable. Example: https://quay.example.com", + Optional: true, + }, + "token": schema.StringAttribute{ + Description: "Quay token. May also be provided via the QUAY_TOKEN environment variable.", + Optional: true, + Sensitive: true, + }, + }} +} + +func (p *quayProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse) { + tflog.Info(ctx, "Configuring Quay client") + + var config quayProviderModel + diags := req.Config.Get(ctx, &config) + resp.Diagnostics.Append(diags...) + if resp.Diagnostics.HasError() { + return + } + + if config.Url.IsUnknown() { + resp.Diagnostics.AddAttributeError( + path.Root("url"), + "Unknown Quay URL", + "The provider cannot create the Quay client as the URL value is unknown. "+ + "Either target apply the source of the value first, set the value statically in the configuration, or use the QUAY_URL environment variable", + ) + } + + if config.Token.IsUnknown() { + resp.Diagnostics.AddAttributeError( + path.Root("token"), + "Unknown Quay token", + "The provider cannot create the Quay client as the token value is unknown. "+ + "Either target apply the source of the value first, set the value statically in the configuration, or use the QUAY_TOKEN environment variable", + ) + } + + if resp.Diagnostics.HasError() { + return + } + + quayURL := os.Getenv("QUAY_URL") + quayToken := os.Getenv("QUAY_TOKEN") + + if !config.Url.IsNull() { + quayURL = config.Url.ValueString() + } + + if !config.Token.IsNull() { + quayToken = config.Token.ValueString() + } + + if quayURL == "" { + resp.Diagnostics.AddAttributeError( + path.Root("url"), + "Missing Quay URL", + "The provider cannot create the Quay client as there is a missing or empty value for the Quay URL. "+ + "Set the URL in the configuration or use the QUAY_URL environment variable. ", + ) + } + + if !isValidURL(quayURL) { + resp.Diagnostics.AddAttributeError( + path.Root("url"), + "Quay URL is not a valid URL", + "The provider cannot create the Quay client as the URL provided is not valid.", + ) + } + + if quayToken == "" { + resp.Diagnostics.AddAttributeError( + path.Root("token"), + "Missing Quay token", + "The provider cannot create the Quay client as there is a missing or empty value for the Quay token. "+ + "Set the token in the configuration or use the QUAY_TOKEN environment variable. ", + ) + } + + if resp.Diagnostics.HasError() { + return + } + + ctx = tflog.SetField(ctx, "quay_url", quayURL) + ctx = tflog.SetField(ctx, "quay_token", quayToken) + ctx = tflog.MaskFieldValuesWithFieldKeys(ctx, "quay_token") + + tflog.Debug(ctx, "Creating Quay client") + + configuration := &quay_api.Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Servers: quay_api.ServerConfigurations{ + { + URL: quayURL, + Description: "No description provided", + }, + }, + OperationServers: map[string]quay_api.ServerConfigurations{}, + } + configuration.AddDefaultHeader("Authorization", "Bearer "+quayToken) + client := quay_api.NewAPIClient(configuration) + + resp.DataSourceData = client + resp.ResourceData = client + + tflog.Info(ctx, "Configured Quay client", map[string]any{"success": true}) +} + +func (p *quayProvider) Metadata(_ context.Context, _ provider.MetadataRequest, resp *provider.MetadataResponse) { + resp.TypeName = "quay" +} + +func (p *quayProvider) DataSources(_ context.Context) []func() datasource.DataSource { + return []func() datasource.DataSource{ + NewOrganizationDataSource, + } +} + +func (p *quayProvider) Resources(_ context.Context) []func() resource.Resource { + return []func() resource.Resource{ + NewOrganizationResource, + } +} diff --git a/internal/provider/provider_test.go b/internal/provider/provider_test.go new file mode 100644 index 0000000..4fc1ea7 --- /dev/null +++ b/internal/provider/provider_test.go @@ -0,0 +1,18 @@ +package provider + +import ( + "github.com/hashicorp/terraform-plugin-framework/providerserver" + "github.com/hashicorp/terraform-plugin-go/tfprotov6" +) + +const ( + providerConfig = ` +provider "quay" {} +` +) + +var ( + testAccProtoV6ProviderFactories = map[string]func() (tfprotov6.ProviderServer, error){ + "quay": providerserver.NewProtocol6WithError(New()()), + } +) diff --git a/internal/resource_organization/organization_resource_gen.go b/internal/resource_organization/organization_resource_gen.go new file mode 100644 index 0000000..d348d2f --- /dev/null +++ b/internal/resource_organization/organization_resource_gen.go @@ -0,0 +1,32 @@ +// Code generated by terraform-plugin-framework-generator DO NOT EDIT. + +package resource_organization + +import ( + "context" + "github.com/hashicorp/terraform-plugin-framework/types" + + "github.com/hashicorp/terraform-plugin-framework/resource/schema" +) + +func OrganizationResourceSchema(ctx context.Context) schema.Schema { + return schema.Schema{ + Attributes: map[string]schema.Attribute{ + "email": schema.StringAttribute{ + Required: true, + Description: "Organization contact email", + MarkdownDescription: "Organization contact email", + }, + "name": schema.StringAttribute{ + Required: true, + Description: "Organization name", + MarkdownDescription: "Organization name", + }, + }, + } +} + +type OrganizationModel struct { + Email types.String `tfsdk:"email"` + Name types.String `tfsdk:"name"` +} diff --git a/main.go b/main.go new file mode 100644 index 0000000..b84cbf0 --- /dev/null +++ b/main.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Modifications copyright (c) Enthought, Inc. +// SPDX-License-Identifier: BSD-3-Clause + +package main + +import ( + "context" + "flag" + "log" + + "github.com/hashicorp/terraform-plugin-framework/providerserver" + "terraform-provider-quay/internal/provider" +) + +//go:generate terraform fmt -recursive ./examples/ +//go:generate go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs generate --provider-name quay --rendered-provider-name Quay + +func main() { + var debug bool + + flag.BoolVar(&debug, "debug", false, "set to true to run the provider with support for debuggers like delve") + flag.Parse() + + opts := providerserver.ServeOpts{ + Address: "registry.terraform.io/enthought/quay", + Debug: debug, + } + + err := providerserver.Serve(context.Background(), provider.New(), opts) + if err != nil { + log.Fatal(err.Error()) + } +} diff --git a/quay_api/.gitignore b/quay_api/.gitignore new file mode 100644 index 0000000..daf913b --- /dev/null +++ b/quay_api/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/quay_api/.openapi-generator-ignore b/quay_api/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/quay_api/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# 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 diff --git a/quay_api/.openapi-generator/FILES b/quay_api/.openapi-generator/FILES new file mode 100644 index 0000000..4972d85 --- /dev/null +++ b/quay_api/.openapi-generator/FILES @@ -0,0 +1,139 @@ +.gitignore +.travis.yml +README.md +api/openapi.yaml +api_appspecifictokens.go +api_build.go +api_discovery.go +api_error.go +api_globalmessages.go +api_logs.go +api_manifest.go +api_namespacequota.go +api_organization.go +api_permission.go +api_prototype.go +api_repository.go +api_repositorynotification.go +api_repotoken.go +api_robot.go +api_search.go +api_superuser.go +api_tag.go +api_team.go +api_trigger.go +api_user.go +client.go +configuration.go +docs/AddLabel.md +docs/ApiError.md +docs/ApiErrorDescription.md +docs/ApproveServiceKey.md +docs/AppspecifictokensAPI.md +docs/BuildAPI.md +docs/BuildTriggerActivateRequest.md +docs/ChangeVisibility.md +docs/CreateInstallUser.md +docs/CreateMessage.md +docs/CreateMessageMessage.md +docs/CreateRobot.md +docs/CreateServiceKey.md +docs/DiscoveryAPI.md +docs/ErrorAPI.md +docs/ExportLogs.md +docs/GlobalmessagesAPI.md +docs/LogsAPI.md +docs/ManifestAPI.md +docs/NamespacequotaAPI.md +docs/NewApp.md +docs/NewNamespaceQuota.md +docs/NewOrg.md +docs/NewOrgQuota.md +docs/NewOrgQuotaLimit.md +docs/NewPrototype.md +docs/NewPrototypeActivatingUser.md +docs/NewPrototypeDelegate.md +docs/NewRepo.md +docs/NewStarredRepository.md +docs/NewToken.md +docs/NewUser.md +docs/NotificationCreateRequest.md +docs/OrganizationAPI.md +docs/PermissionAPI.md +docs/PrototypeAPI.md +docs/PrototypeUpdate.md +docs/PutServiceKey.md +docs/RepoUpdate.md +docs/RepositoryAPI.md +docs/RepositoryBuildRequest.md +docs/RepositorynotificationAPI.md +docs/RepotokenAPI.md +docs/RestoreTag.md +docs/RobotAPI.md +docs/RunParameters.md +docs/SearchAPI.md +docs/SuperuserAPI.md +docs/TagAPI.md +docs/TeamAPI.md +docs/TeamDescription.md +docs/TeamPermission.md +docs/TokenPermission.md +docs/TriggerAPI.md +docs/UpdateApp.md +docs/UpdateNamespaceQuota.md +docs/UpdateOrg.md +docs/UpdateOrgQuota.md +docs/UpdateOrgQuotaLimit.md +docs/UpdateTrigger.md +docs/UpdateUser.md +docs/UserAPI.md +docs/UserPermission.md +docs/UserView.md +git_push.sh +go.mod +go.sum +model_add_label.go +model_api_error.go +model_api_error_description.go +model_approve_service_key.go +model_build_trigger_activate_request.go +model_change_visibility.go +model_create_install_user.go +model_create_message.go +model_create_message_message.go +model_create_robot.go +model_create_service_key.go +model_export_logs.go +model_new_app.go +model_new_namespace_quota.go +model_new_org.go +model_new_org_quota.go +model_new_org_quota_limit.go +model_new_prototype.go +model_new_prototype_activating_user.go +model_new_prototype_delegate.go +model_new_repo.go +model_new_starred_repository.go +model_new_token.go +model_new_user.go +model_notification_create_request.go +model_prototype_update.go +model_put_service_key.go +model_repo_update.go +model_repository_build_request.go +model_restore_tag.go +model_run_parameters.go +model_team_description.go +model_team_permission.go +model_token_permission.go +model_update_app.go +model_update_namespace_quota.go +model_update_org.go +model_update_org_quota.go +model_update_org_quota_limit.go +model_update_trigger.go +model_update_user.go +model_user_permission.go +model_user_view.go +response.go +utils.go diff --git a/quay_api/.openapi-generator/VERSION b/quay_api/.openapi-generator/VERSION new file mode 100644 index 0000000..1985849 --- /dev/null +++ b/quay_api/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.7.0 diff --git a/quay_api/.travis.yml b/quay_api/.travis.yml new file mode 100644 index 0000000..f5cb2ce --- /dev/null +++ b/quay_api/.travis.yml @@ -0,0 +1,8 @@ +language: go + +install: + - go get -d -v . + +script: + - go build -v ./ + diff --git a/quay_api/README.md b/quay_api/README.md new file mode 100644 index 0000000..b14da30 --- /dev/null +++ b/quay_api/README.md @@ -0,0 +1,340 @@ +# Go API client for quay_api + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +## 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.7.0 +- Build package: org.openapitools.codegen.languages.GoClientCodegen + +## Installation + +Install the following dependencies: + +```sh +go get github.com/stretchr/testify/assert +go get golang.org/x/oauth2 +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```go +import quay_api "github.com/enthought/terraform-provider-quay/quay_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 `quay_api.ContextServerIndex` of type `int`. + +```go +ctx := context.WithValue(context.Background(), quay_api.ContextServerIndex, 1) +``` + +### Templated Server URL + +Templated server URL is formatted using default variables from configuration or from context value `quay_api.ContextServerVariables` of type `map[string]string`. + +```go +ctx := context.WithValue(context.Background(), quay_api.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 `quay_api.ContextOperationServerIndices` and `quay_api.ContextOperationServerVariables` context maps. + +```go +ctx := context.WithValue(context.Background(), quay_api.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), quay_api.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://quay.example.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AppspecifictokensAPI* | [**CreateAppToken**](docs/AppspecifictokensAPI.md#createapptoken) | **Post** /api/v1/user/apptoken | +*AppspecifictokensAPI* | [**GetAppToken**](docs/AppspecifictokensAPI.md#getapptoken) | **Get** /api/v1/user/apptoken/{token_uuid} | +*AppspecifictokensAPI* | [**ListAppTokens**](docs/AppspecifictokensAPI.md#listapptokens) | **Get** /api/v1/user/apptoken | +*AppspecifictokensAPI* | [**RevokeAppToken**](docs/AppspecifictokensAPI.md#revokeapptoken) | **Delete** /api/v1/user/apptoken/{token_uuid} | +*BuildAPI* | [**CancelRepoBuild**](docs/BuildAPI.md#cancelrepobuild) | **Delete** /api/v1/repository/{repository}/build/{build_uuid} | +*BuildAPI* | [**GetRepoBuild**](docs/BuildAPI.md#getrepobuild) | **Get** /api/v1/repository/{repository}/build/{build_uuid} | +*BuildAPI* | [**GetRepoBuildLogs**](docs/BuildAPI.md#getrepobuildlogs) | **Get** /api/v1/repository/{repository}/build/{build_uuid}/logs | +*BuildAPI* | [**GetRepoBuildStatus**](docs/BuildAPI.md#getrepobuildstatus) | **Get** /api/v1/repository/{repository}/build/{build_uuid}/status | +*BuildAPI* | [**GetRepoBuilds**](docs/BuildAPI.md#getrepobuilds) | **Get** /api/v1/repository/{repository}/build/ | +*BuildAPI* | [**RequestRepoBuild**](docs/BuildAPI.md#requestrepobuild) | **Post** /api/v1/repository/{repository}/build/ | +*DiscoveryAPI* | [**Discovery**](docs/DiscoveryAPI.md#discovery) | **Get** /api/v1/discovery | +*ErrorAPI* | [**GetErrorDescription**](docs/ErrorAPI.md#geterrordescription) | **Get** /api/v1/error/{error_type} | +*GlobalmessagesAPI* | [**CreateGlobalMessage**](docs/GlobalmessagesAPI.md#createglobalmessage) | **Post** /api/v1/messages | +*GlobalmessagesAPI* | [**DeleteGlobalMessage**](docs/GlobalmessagesAPI.md#deleteglobalmessage) | **Delete** /api/v1/message/{uuid} | +*GlobalmessagesAPI* | [**GetGlobalMessages**](docs/GlobalmessagesAPI.md#getglobalmessages) | **Get** /api/v1/messages | +*LogsAPI* | [**ExportOrgLogs**](docs/LogsAPI.md#exportorglogs) | **Post** /api/v1/organization/{orgname}/exportlogs | +*LogsAPI* | [**ExportRepoLogs**](docs/LogsAPI.md#exportrepologs) | **Post** /api/v1/repository/{repository}/exportlogs | +*LogsAPI* | [**ExportUserLogs**](docs/LogsAPI.md#exportuserlogs) | **Post** /api/v1/user/exportlogs | +*LogsAPI* | [**GetAggregateOrgLogs**](docs/LogsAPI.md#getaggregateorglogs) | **Get** /api/v1/organization/{orgname}/aggregatelogs | +*LogsAPI* | [**GetAggregateRepoLogs**](docs/LogsAPI.md#getaggregaterepologs) | **Get** /api/v1/repository/{repository}/aggregatelogs | +*LogsAPI* | [**GetAggregateUserLogs**](docs/LogsAPI.md#getaggregateuserlogs) | **Get** /api/v1/user/aggregatelogs | +*LogsAPI* | [**ListOrgLogs**](docs/LogsAPI.md#listorglogs) | **Get** /api/v1/organization/{orgname}/logs | +*LogsAPI* | [**ListRepoLogs**](docs/LogsAPI.md#listrepologs) | **Get** /api/v1/repository/{repository}/logs | +*LogsAPI* | [**ListUserLogs**](docs/LogsAPI.md#listuserlogs) | **Get** /api/v1/user/logs | +*ManifestAPI* | [**AddManifestLabel**](docs/ManifestAPI.md#addmanifestlabel) | **Post** /api/v1/repository/{repository}/manifest/{manifestref}/labels | +*ManifestAPI* | [**DeleteManifestLabel**](docs/ManifestAPI.md#deletemanifestlabel) | **Delete** /api/v1/repository/{repository}/manifest/{manifestref}/labels/{labelid} | +*ManifestAPI* | [**GetManifestLabel**](docs/ManifestAPI.md#getmanifestlabel) | **Get** /api/v1/repository/{repository}/manifest/{manifestref}/labels/{labelid} | +*ManifestAPI* | [**GetRepoManifest**](docs/ManifestAPI.md#getrepomanifest) | **Get** /api/v1/repository/{repository}/manifest/{manifestref} | +*ManifestAPI* | [**ListManifestLabels**](docs/ManifestAPI.md#listmanifestlabels) | **Get** /api/v1/repository/{repository}/manifest/{manifestref}/labels | +*NamespacequotaAPI* | [**ChangeOrganizationQuota**](docs/NamespacequotaAPI.md#changeorganizationquota) | **Put** /api/v1/organization/{orgname}/quota/{quota_id} | +*NamespacequotaAPI* | [**ChangeOrganizationQuotaLimit**](docs/NamespacequotaAPI.md#changeorganizationquotalimit) | **Put** /api/v1/organization/{orgname}/quota/{quota_id}/limit/{limit_id} | +*NamespacequotaAPI* | [**CreateOrganizationQuota**](docs/NamespacequotaAPI.md#createorganizationquota) | **Post** /api/v1/organization/{orgname}/quota | +*NamespacequotaAPI* | [**CreateOrganizationQuotaLimit**](docs/NamespacequotaAPI.md#createorganizationquotalimit) | **Post** /api/v1/organization/{orgname}/quota/{quota_id}/limit | +*NamespacequotaAPI* | [**DeleteOrganizationQuota**](docs/NamespacequotaAPI.md#deleteorganizationquota) | **Delete** /api/v1/organization/{orgname}/quota/{quota_id} | +*NamespacequotaAPI* | [**DeleteOrganizationQuotaLimit**](docs/NamespacequotaAPI.md#deleteorganizationquotalimit) | **Delete** /api/v1/organization/{orgname}/quota/{quota_id}/limit/{limit_id} | +*NamespacequotaAPI* | [**GetOrganizationQuota**](docs/NamespacequotaAPI.md#getorganizationquota) | **Get** /api/v1/organization/{orgname}/quota/{quota_id} | +*NamespacequotaAPI* | [**GetOrganizationQuotaLimit**](docs/NamespacequotaAPI.md#getorganizationquotalimit) | **Get** /api/v1/organization/{orgname}/quota/{quota_id}/limit/{limit_id} | +*NamespacequotaAPI* | [**GetUserQuota**](docs/NamespacequotaAPI.md#getuserquota) | **Get** /api/v1/user/quota/{quota_id} | +*NamespacequotaAPI* | [**GetUserQuotaLimit**](docs/NamespacequotaAPI.md#getuserquotalimit) | **Get** /api/v1/user/quota/{quota_id}/limit/{limit_id} | +*NamespacequotaAPI* | [**ListOrganizationQuota**](docs/NamespacequotaAPI.md#listorganizationquota) | **Get** /api/v1/organization/{orgname}/quota | +*NamespacequotaAPI* | [**ListOrganizationQuotaLimit**](docs/NamespacequotaAPI.md#listorganizationquotalimit) | **Get** /api/v1/organization/{orgname}/quota/{quota_id}/limit | +*NamespacequotaAPI* | [**ListUserQuota**](docs/NamespacequotaAPI.md#listuserquota) | **Get** /api/v1/user/quota | +*NamespacequotaAPI* | [**ListUserQuotaLimit**](docs/NamespacequotaAPI.md#listuserquotalimit) | **Get** /api/v1/user/quota/{quota_id}/limit | +*OrganizationAPI* | [**ChangeOrganizationDetails**](docs/OrganizationAPI.md#changeorganizationdetails) | **Put** /api/v1/organization/{orgname} | +*OrganizationAPI* | [**CreateOrganization**](docs/OrganizationAPI.md#createorganization) | **Post** /api/v1/organization/ | +*OrganizationAPI* | [**CreateOrganizationApplication**](docs/OrganizationAPI.md#createorganizationapplication) | **Post** /api/v1/organization/{orgname}/applications | +*OrganizationAPI* | [**DeleteAdminedOrganization**](docs/OrganizationAPI.md#deleteadminedorganization) | **Delete** /api/v1/organization/{orgname} | +*OrganizationAPI* | [**DeleteOrganizationApplication**](docs/OrganizationAPI.md#deleteorganizationapplication) | **Delete** /api/v1/organization/{orgname}/applications/{client_id} | +*OrganizationAPI* | [**GetApplicationInformation**](docs/OrganizationAPI.md#getapplicationinformation) | **Get** /api/v1/app/{client_id} | +*OrganizationAPI* | [**GetOrganization**](docs/OrganizationAPI.md#getorganization) | **Get** /api/v1/organization/{orgname} | +*OrganizationAPI* | [**GetOrganizationApplication**](docs/OrganizationAPI.md#getorganizationapplication) | **Get** /api/v1/organization/{orgname}/applications/{client_id} | +*OrganizationAPI* | [**GetOrganizationApplications**](docs/OrganizationAPI.md#getorganizationapplications) | **Get** /api/v1/organization/{orgname}/applications | +*OrganizationAPI* | [**GetOrganizationCollaborators**](docs/OrganizationAPI.md#getorganizationcollaborators) | **Get** /api/v1/organization/{orgname}/collaborators | +*OrganizationAPI* | [**GetOrganizationMember**](docs/OrganizationAPI.md#getorganizationmember) | **Get** /api/v1/organization/{orgname}/members/{membername} | +*OrganizationAPI* | [**GetOrganizationMembers**](docs/OrganizationAPI.md#getorganizationmembers) | **Get** /api/v1/organization/{orgname}/members | +*OrganizationAPI* | [**RemoveOrganizationMember**](docs/OrganizationAPI.md#removeorganizationmember) | **Delete** /api/v1/organization/{orgname}/members/{membername} | +*OrganizationAPI* | [**UpdateOrganizationApplication**](docs/OrganizationAPI.md#updateorganizationapplication) | **Put** /api/v1/organization/{orgname}/applications/{client_id} | +*PermissionAPI* | [**ChangeTeamPermissions**](docs/PermissionAPI.md#changeteampermissions) | **Put** /api/v1/repository/{repository}/permissions/team/{teamname} | +*PermissionAPI* | [**ChangeUserPermissions**](docs/PermissionAPI.md#changeuserpermissions) | **Put** /api/v1/repository/{repository}/permissions/user/{username} | +*PermissionAPI* | [**DeleteTeamPermissions**](docs/PermissionAPI.md#deleteteampermissions) | **Delete** /api/v1/repository/{repository}/permissions/team/{teamname} | +*PermissionAPI* | [**DeleteUserPermissions**](docs/PermissionAPI.md#deleteuserpermissions) | **Delete** /api/v1/repository/{repository}/permissions/user/{username} | +*PermissionAPI* | [**GetTeamPermissions**](docs/PermissionAPI.md#getteampermissions) | **Get** /api/v1/repository/{repository}/permissions/team/{teamname} | +*PermissionAPI* | [**GetUserPermissions**](docs/PermissionAPI.md#getuserpermissions) | **Get** /api/v1/repository/{repository}/permissions/user/{username} | +*PermissionAPI* | [**GetUserTransitivePermission**](docs/PermissionAPI.md#getusertransitivepermission) | **Get** /api/v1/repository/{repository}/permissions/user/{username}/transitive | +*PermissionAPI* | [**ListRepoTeamPermissions**](docs/PermissionAPI.md#listrepoteampermissions) | **Get** /api/v1/repository/{repository}/permissions/team/ | +*PermissionAPI* | [**ListRepoUserPermissions**](docs/PermissionAPI.md#listrepouserpermissions) | **Get** /api/v1/repository/{repository}/permissions/user/ | +*PrototypeAPI* | [**CreateOrganizationPrototypePermission**](docs/PrototypeAPI.md#createorganizationprototypepermission) | **Post** /api/v1/organization/{orgname}/prototypes | +*PrototypeAPI* | [**DeleteOrganizationPrototypePermission**](docs/PrototypeAPI.md#deleteorganizationprototypepermission) | **Delete** /api/v1/organization/{orgname}/prototypes/{prototypeid} | +*PrototypeAPI* | [**GetOrganizationPrototypePermissions**](docs/PrototypeAPI.md#getorganizationprototypepermissions) | **Get** /api/v1/organization/{orgname}/prototypes | +*PrototypeAPI* | [**UpdateOrganizationPrototypePermission**](docs/PrototypeAPI.md#updateorganizationprototypepermission) | **Put** /api/v1/organization/{orgname}/prototypes/{prototypeid} | +*RepositoryAPI* | [**ChangeRepoVisibility**](docs/RepositoryAPI.md#changerepovisibility) | **Post** /api/v1/repository/{repository}/changevisibility | +*RepositoryAPI* | [**CreateRepo**](docs/RepositoryAPI.md#createrepo) | **Post** /api/v1/repository | +*RepositoryAPI* | [**DeleteRepository**](docs/RepositoryAPI.md#deleterepository) | **Delete** /api/v1/repository/{repository} | +*RepositoryAPI* | [**GetRepo**](docs/RepositoryAPI.md#getrepo) | **Get** /api/v1/repository/{repository} | +*RepositoryAPI* | [**ListRepos**](docs/RepositoryAPI.md#listrepos) | **Get** /api/v1/repository | +*RepositoryAPI* | [**UpdateRepo**](docs/RepositoryAPI.md#updaterepo) | **Put** /api/v1/repository/{repository} | +*RepositorynotificationAPI* | [**CreateRepoNotification**](docs/RepositorynotificationAPI.md#createreponotification) | **Post** /api/v1/repository/{repository}/notification/ | +*RepositorynotificationAPI* | [**DeleteRepoNotification**](docs/RepositorynotificationAPI.md#deletereponotification) | **Delete** /api/v1/repository/{repository}/notification/{uuid} | +*RepositorynotificationAPI* | [**GetRepoNotification**](docs/RepositorynotificationAPI.md#getreponotification) | **Get** /api/v1/repository/{repository}/notification/{uuid} | +*RepositorynotificationAPI* | [**ListRepoNotifications**](docs/RepositorynotificationAPI.md#listreponotifications) | **Get** /api/v1/repository/{repository}/notification/ | +*RepositorynotificationAPI* | [**ResetRepositoryNotificationFailures**](docs/RepositorynotificationAPI.md#resetrepositorynotificationfailures) | **Post** /api/v1/repository/{repository}/notification/{uuid} | +*RepositorynotificationAPI* | [**TestRepoNotification**](docs/RepositorynotificationAPI.md#testreponotification) | **Post** /api/v1/repository/{repository}/notification/{uuid}/test | +*RepotokenAPI* | [**ChangeToken**](docs/RepotokenAPI.md#changetoken) | **Put** /api/v1/repository/{repository}/tokens/{code} | +*RepotokenAPI* | [**CreateToken**](docs/RepotokenAPI.md#createtoken) | **Post** /api/v1/repository/{repository}/tokens/ | +*RepotokenAPI* | [**DeleteToken**](docs/RepotokenAPI.md#deletetoken) | **Delete** /api/v1/repository/{repository}/tokens/{code} | +*RepotokenAPI* | [**GetTokens**](docs/RepotokenAPI.md#gettokens) | **Get** /api/v1/repository/{repository}/tokens/{code} | +*RepotokenAPI* | [**ListRepoTokens**](docs/RepotokenAPI.md#listrepotokens) | **Get** /api/v1/repository/{repository}/tokens/ | +*RobotAPI* | [**CreateOrgRobot**](docs/RobotAPI.md#createorgrobot) | **Put** /api/v1/organization/{orgname}/robots/{robot_shortname} | +*RobotAPI* | [**CreateUserRobot**](docs/RobotAPI.md#createuserrobot) | **Put** /api/v1/user/robots/{robot_shortname} | +*RobotAPI* | [**DeleteOrgRobot**](docs/RobotAPI.md#deleteorgrobot) | **Delete** /api/v1/organization/{orgname}/robots/{robot_shortname} | +*RobotAPI* | [**DeleteUserRobot**](docs/RobotAPI.md#deleteuserrobot) | **Delete** /api/v1/user/robots/{robot_shortname} | +*RobotAPI* | [**GetOrgRobot**](docs/RobotAPI.md#getorgrobot) | **Get** /api/v1/organization/{orgname}/robots/{robot_shortname} | +*RobotAPI* | [**GetOrgRobotPermissions**](docs/RobotAPI.md#getorgrobotpermissions) | **Get** /api/v1/organization/{orgname}/robots/{robot_shortname}/permissions | +*RobotAPI* | [**GetOrgRobots**](docs/RobotAPI.md#getorgrobots) | **Get** /api/v1/organization/{orgname}/robots | +*RobotAPI* | [**GetUserRobot**](docs/RobotAPI.md#getuserrobot) | **Get** /api/v1/user/robots/{robot_shortname} | +*RobotAPI* | [**GetUserRobotPermissions**](docs/RobotAPI.md#getuserrobotpermissions) | **Get** /api/v1/user/robots/{robot_shortname}/permissions | +*RobotAPI* | [**GetUserRobots**](docs/RobotAPI.md#getuserrobots) | **Get** /api/v1/user/robots | +*RobotAPI* | [**RegenerateOrgRobotToken**](docs/RobotAPI.md#regenerateorgrobottoken) | **Post** /api/v1/organization/{orgname}/robots/{robot_shortname}/regenerate | +*RobotAPI* | [**RegenerateUserRobotToken**](docs/RobotAPI.md#regenerateuserrobottoken) | **Post** /api/v1/user/robots/{robot_shortname}/regenerate | +*SearchAPI* | [**ConductRepoSearch**](docs/SearchAPI.md#conductreposearch) | **Get** /api/v1/find/repositories | +*SearchAPI* | [**ConductSearch**](docs/SearchAPI.md#conductsearch) | **Get** /api/v1/find/all | +*SearchAPI* | [**GetMatchingEntities**](docs/SearchAPI.md#getmatchingentities) | **Get** /api/v1/entities/{prefix} | +*SuperuserAPI* | [**ApproveServiceKey**](docs/SuperuserAPI.md#approveservicekey) | **Post** /api/v1/superuser/approvedkeys/{kid} | +*SuperuserAPI* | [**ChangeOrganization**](docs/SuperuserAPI.md#changeorganization) | **Put** /api/v1/superuser/organizations/{name} | +*SuperuserAPI* | [**ChangeOrganizationQuotaSuperUser**](docs/SuperuserAPI.md#changeorganizationquotasuperuser) | **Put** /api/v1/superuser/organization/{namespace}/quota/{quota_id} | +*SuperuserAPI* | [**ChangeUserQuotaSuperUser**](docs/SuperuserAPI.md#changeuserquotasuperuser) | **Put** /api/v1/superuser/users/{namespace}/quota/{quota_id} | +*SuperuserAPI* | [**CreateInstallUser**](docs/SuperuserAPI.md#createinstalluser) | **Post** /api/v1/superuser/users/ | +*SuperuserAPI* | [**CreateOrganizationQuotaSuperUser**](docs/SuperuserAPI.md#createorganizationquotasuperuser) | **Post** /api/v1/superuser/organization/{namespace}/quota | +*SuperuserAPI* | [**CreateServiceKey**](docs/SuperuserAPI.md#createservicekey) | **Post** /api/v1/superuser/keys | +*SuperuserAPI* | [**CreateUserQuotaSuperUser**](docs/SuperuserAPI.md#createuserquotasuperuser) | **Post** /api/v1/superuser/users/{namespace}/quota | +*SuperuserAPI* | [**DeleteOrganization**](docs/SuperuserAPI.md#deleteorganization) | **Delete** /api/v1/superuser/organizations/{name} | +*SuperuserAPI* | [**DeleteOrganizationQuotaSuperUser**](docs/SuperuserAPI.md#deleteorganizationquotasuperuser) | **Delete** /api/v1/superuser/organization/{namespace}/quota/{quota_id} | +*SuperuserAPI* | [**DeleteServiceKey**](docs/SuperuserAPI.md#deleteservicekey) | **Delete** /api/v1/superuser/keys/{kid} | +*SuperuserAPI* | [**DeleteUserQuotaSuperUser**](docs/SuperuserAPI.md#deleteuserquotasuperuser) | **Delete** /api/v1/superuser/users/{namespace}/quota/{quota_id} | +*SuperuserAPI* | [**GetRepoBuildLogsSuperUser**](docs/SuperuserAPI.md#getrepobuildlogssuperuser) | **Get** /api/v1/superuser/{build_uuid}/logs | +*SuperuserAPI* | [**GetRepoBuildStatusSuperUser**](docs/SuperuserAPI.md#getrepobuildstatussuperuser) | **Get** /api/v1/superuser/{build_uuid}/status | +*SuperuserAPI* | [**GetRepoBuildSuperUser**](docs/SuperuserAPI.md#getrepobuildsuperuser) | **Get** /api/v1/superuser/{build_uuid}/build | +*SuperuserAPI* | [**GetServiceKey**](docs/SuperuserAPI.md#getservicekey) | **Get** /api/v1/superuser/keys/{kid} | +*SuperuserAPI* | [**ListAllLogs**](docs/SuperuserAPI.md#listalllogs) | **Get** /api/v1/superuser/logs | +*SuperuserAPI* | [**ListAllUsers**](docs/SuperuserAPI.md#listallusers) | **Get** /api/v1/superuser/users/ | +*SuperuserAPI* | [**ListOrganizationQuotaSuperUser**](docs/SuperuserAPI.md#listorganizationquotasuperuser) | **Get** /api/v1/superuser/organization/{namespace}/quota | +*SuperuserAPI* | [**ListServiceKeys**](docs/SuperuserAPI.md#listservicekeys) | **Get** /api/v1/superuser/keys | +*SuperuserAPI* | [**ListUserQuotaSuperUser**](docs/SuperuserAPI.md#listuserquotasuperuser) | **Get** /api/v1/superuser/users/{namespace}/quota | +*SuperuserAPI* | [**UpdateServiceKey**](docs/SuperuserAPI.md#updateservicekey) | **Put** /api/v1/superuser/keys/{kid} | +*TagAPI* | [**ChangeTag**](docs/TagAPI.md#changetag) | **Put** /api/v1/repository/{repository}/tag/{tag} | +*TagAPI* | [**DeleteFullTag**](docs/TagAPI.md#deletefulltag) | **Delete** /api/v1/repository/{repository}/tag/{tag} | +*TagAPI* | [**ListRepoTags**](docs/TagAPI.md#listrepotags) | **Get** /api/v1/repository/{repository}/tag/ | +*TagAPI* | [**RestoreTag**](docs/TagAPI.md#restoretag) | **Post** /api/v1/repository/{repository}/tag/{tag}/restore | +*TeamAPI* | [**DeleteOrganizationTeam**](docs/TeamAPI.md#deleteorganizationteam) | **Delete** /api/v1/organization/{orgname}/team/{teamname} | +*TeamAPI* | [**DeleteOrganizationTeamMember**](docs/TeamAPI.md#deleteorganizationteammember) | **Delete** /api/v1/organization/{orgname}/team/{teamname}/members/{membername} | +*TeamAPI* | [**DeleteTeamMemberEmailInvite**](docs/TeamAPI.md#deleteteammemberemailinvite) | **Delete** /api/v1/organization/{orgname}/team/{teamname}/invite/{email} | +*TeamAPI* | [**DisableOrganizationTeamSync**](docs/TeamAPI.md#disableorganizationteamsync) | **Delete** /api/v1/organization/{orgname}/team/{teamname}/syncing | +*TeamAPI* | [**EnableOrganizationTeamSync**](docs/TeamAPI.md#enableorganizationteamsync) | **Post** /api/v1/organization/{orgname}/team/{teamname}/syncing | +*TeamAPI* | [**GetOrganizationTeamMembers**](docs/TeamAPI.md#getorganizationteammembers) | **Get** /api/v1/organization/{orgname}/team/{teamname}/members | +*TeamAPI* | [**GetOrganizationTeamPermissions**](docs/TeamAPI.md#getorganizationteampermissions) | **Get** /api/v1/organization/{orgname}/team/{teamname}/permissions | +*TeamAPI* | [**InviteTeamMemberEmail**](docs/TeamAPI.md#inviteteammemberemail) | **Put** /api/v1/organization/{orgname}/team/{teamname}/invite/{email} | +*TeamAPI* | [**UpdateOrganizationTeam**](docs/TeamAPI.md#updateorganizationteam) | **Put** /api/v1/organization/{orgname}/team/{teamname} | +*TeamAPI* | [**UpdateOrganizationTeamMember**](docs/TeamAPI.md#updateorganizationteammember) | **Put** /api/v1/organization/{orgname}/team/{teamname}/members/{membername} | +*TriggerAPI* | [**ActivateBuildTrigger**](docs/TriggerAPI.md#activatebuildtrigger) | **Post** /api/v1/repository/{repository}/trigger/{trigger_uuid}/activate | +*TriggerAPI* | [**DeleteBuildTrigger**](docs/TriggerAPI.md#deletebuildtrigger) | **Delete** /api/v1/repository/{repository}/trigger/{trigger_uuid} | +*TriggerAPI* | [**GetBuildTrigger**](docs/TriggerAPI.md#getbuildtrigger) | **Get** /api/v1/repository/{repository}/trigger/{trigger_uuid} | +*TriggerAPI* | [**ListBuildTriggers**](docs/TriggerAPI.md#listbuildtriggers) | **Get** /api/v1/repository/{repository}/trigger/ | +*TriggerAPI* | [**ListTriggerRecentBuilds**](docs/TriggerAPI.md#listtriggerrecentbuilds) | **Get** /api/v1/repository/{repository}/trigger/{trigger_uuid}/builds | +*TriggerAPI* | [**ManuallyStartBuildTrigger**](docs/TriggerAPI.md#manuallystartbuildtrigger) | **Post** /api/v1/repository/{repository}/trigger/{trigger_uuid}/start | +*TriggerAPI* | [**UpdateBuildTrigger**](docs/TriggerAPI.md#updatebuildtrigger) | **Put** /api/v1/repository/{repository}/trigger/{trigger_uuid} | +*UserAPI* | [**CreateStar**](docs/UserAPI.md#createstar) | **Post** /api/v1/user/starred | +*UserAPI* | [**DeleteStar**](docs/UserAPI.md#deletestar) | **Delete** /api/v1/user/starred/{repository} | +*UserAPI* | [**GetLoggedInUser**](docs/UserAPI.md#getloggedinuser) | **Get** /api/v1/user/ | +*UserAPI* | [**GetUserInformation**](docs/UserAPI.md#getuserinformation) | **Get** /api/v1/users/{username} | +*UserAPI* | [**ListStarredRepos**](docs/UserAPI.md#liststarredrepos) | **Get** /api/v1/user/starred | + + +## Documentation For Models + + - [AddLabel](docs/AddLabel.md) + - [ApiError](docs/ApiError.md) + - [ApiErrorDescription](docs/ApiErrorDescription.md) + - [ApproveServiceKey](docs/ApproveServiceKey.md) + - [BuildTriggerActivateRequest](docs/BuildTriggerActivateRequest.md) + - [ChangeVisibility](docs/ChangeVisibility.md) + - [CreateInstallUser](docs/CreateInstallUser.md) + - [CreateMessage](docs/CreateMessage.md) + - [CreateMessageMessage](docs/CreateMessageMessage.md) + - [CreateRobot](docs/CreateRobot.md) + - [CreateServiceKey](docs/CreateServiceKey.md) + - [ExportLogs](docs/ExportLogs.md) + - [NewApp](docs/NewApp.md) + - [NewNamespaceQuota](docs/NewNamespaceQuota.md) + - [NewOrg](docs/NewOrg.md) + - [NewOrgQuota](docs/NewOrgQuota.md) + - [NewOrgQuotaLimit](docs/NewOrgQuotaLimit.md) + - [NewPrototype](docs/NewPrototype.md) + - [NewPrototypeActivatingUser](docs/NewPrototypeActivatingUser.md) + - [NewPrototypeDelegate](docs/NewPrototypeDelegate.md) + - [NewRepo](docs/NewRepo.md) + - [NewStarredRepository](docs/NewStarredRepository.md) + - [NewToken](docs/NewToken.md) + - [NewUser](docs/NewUser.md) + - [NotificationCreateRequest](docs/NotificationCreateRequest.md) + - [PrototypeUpdate](docs/PrototypeUpdate.md) + - [PutServiceKey](docs/PutServiceKey.md) + - [RepoUpdate](docs/RepoUpdate.md) + - [RepositoryBuildRequest](docs/RepositoryBuildRequest.md) + - [RestoreTag](docs/RestoreTag.md) + - [RunParameters](docs/RunParameters.md) + - [TeamDescription](docs/TeamDescription.md) + - [TeamPermission](docs/TeamPermission.md) + - [TokenPermission](docs/TokenPermission.md) + - [UpdateApp](docs/UpdateApp.md) + - [UpdateNamespaceQuota](docs/UpdateNamespaceQuota.md) + - [UpdateOrg](docs/UpdateOrg.md) + - [UpdateOrgQuota](docs/UpdateOrgQuota.md) + - [UpdateOrgQuotaLimit](docs/UpdateOrgQuotaLimit.md) + - [UpdateTrigger](docs/UpdateTrigger.md) + - [UpdateUser](docs/UpdateUser.md) + - [UserPermission](docs/UserPermission.md) + - [UserView](docs/UserView.md) + + +## Documentation For Authorization + + +Authentication schemes defined for the API: +### oauth2_implicit + + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: https://quay.example.com/oauth/authorize +- **Scopes**: + - **repo:read**: This application will be able to view and pull all repositories visible to the granting user or robot account + - **repo:write**: This application will be able to view, push and pull to all repositories to which the granting user or robot account has write access + - **repo:admin**: This application will have administrator access to all repositories to which the granting user or robot account has access + - **repo:create**: This application will be able to create repositories in to any namespaces that the granting user or robot account is allowed to create repositories + - **user:read**: This application will be able to read user information such as username and email address. + - **org:admin**: This application will be able to administer your organizations including creating robots, creating teams, adjusting team membership, and changing billing settings. You should have absolute trust in the requesting application before granting this permission. + - **super:user**: This application will be able to administer your installation including managing users, managing organizations and other features found in the superuser panel. You should have absolute trust in the requesting application before granting this permission. + - **user:admin**: This application will be able to administer your account including creating robots and granting them permissions to your repositories. You should have absolute trust in the requesting application before granting this permission. + +Example + +```go +auth := context.WithValue(context.Background(), quay_api.ContextAccessToken, "ACCESSTOKENSTRING") +r, err := client.Service.Operation(auth, args) +``` + +Or via OAuth2 module to automatically refresh tokens and perform user authentication. + +```go +import "golang.org/x/oauth2" + +/* Perform OAuth2 round trip request and obtain a token */ + +tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token) +auth := context.WithValue(oauth2.NoContext, quay_api.ContextOAuth2, tokenSource) +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 + +admin@example.com + diff --git a/quay_api/api/openapi.yaml b/quay_api/api/openapi.yaml new file mode 100644 index 0000000..20cb8bf --- /dev/null +++ b/quay_api/api/openapi.yaml @@ -0,0 +1,9265 @@ +openapi: 3.0.1 +info: + contact: + email: admin@example.com + description: "This API allows you to perform many of the operations required to\ + \ work with Quay repositories, users, and organizations." + termsOfService: "" + title: Quay Frontend + version: v1 +servers: +- url: https://quay.example.com/ +tags: +- description: Manages app specific tokens for the current user. + name: appspecifictokens +- description: "Create, list, cancel and get status/logs of repository builds." + name: build +- description: API discovery information. + name: discovery +- description: Error details API. + name: error +- description: Messages API. + name: globalmessages +- description: Access usage logs for organizations or repositories. + name: logs +- description: Manage the manifests of a repository. + name: manifest +- description: "" + name: namespacequota +- description: "Manage organizations, members and OAuth applications." + name: organization +- description: Manage repository permissions. + name: permission +- description: Manage default permissions added to repositories. + name: prototype +- description: "List, create and manage repositories." + name: repository +- description: "List, create and manage repository events/notifications." + name: repositorynotification +- description: Manage repository access tokens (DEPRECATED). + name: repotoken +- description: Manage user and organization robot accounts. + name: robot +- description: Conduct searches against all registry context. + name: search +- description: Superuser API. + name: superuser +- description: Manage the tags of a repository. + name: tag +- description: "Create, list and manage an organization's teams." + name: team +- description: "Create, list and manage build triggers." + name: trigger +- description: Manage the current user. + name: user +- description: "" + name: userfiles +paths: + /api/v1/user/apptoken: + get: + description: Lists the app specific tokens for the user. + operationId: listAppTokens + parameters: + - description: "If true, only returns those tokens expiring soon" + explode: true + in: query + name: expiring + required: false + schema: + type: boolean + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - user:admin + tags: + - appspecifictokens + post: + description: Create a new app specific token for user. + operationId: createAppToken + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/NewToken' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - user:admin + tags: + - appspecifictokens + x-codegen-request-body-name: body + x-name: endpoints.api.appspecifictokens.AppTokens + x-path: /api/v1/user/apptoken + x-tag: appspecifictokens + /api/v1/user/apptoken/{token_uuid}: + delete: + description: Revokes a specific app token for the user. + operationId: revokeAppToken + parameters: + - description: The uuid of the app specific token + explode: false + in: path + name: token_uuid + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - user:admin + tags: + - appspecifictokens + get: + description: Returns a specific app token for the user. + operationId: getAppToken + parameters: + - description: The uuid of the app specific token + explode: false + in: path + name: token_uuid + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - user:admin + tags: + - appspecifictokens + x-name: endpoints.api.appspecifictokens.AppToken + x-path: "/api/v1/user/apptoken/{token_uuid}" + x-tag: appspecifictokens + /api/v1/repository/{repository}/build/: + get: + description: Get the list of repository builds. + operationId: getRepoBuilds + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: Returns all builds since the given unix timecode + explode: true + in: query + name: since + required: false + schema: + type: integer + style: form + - description: The maximum number of builds to return + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:read + tags: + - build + post: + description: Request that a repository be built and pushed from the specified + input. + operationId: requestRepoBuild + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/RepositoryBuildRequest' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - repo:write + tags: + - build + x-codegen-request-body-name: body + x-name: endpoints.api.build.RepositoryBuildList + x-path: "/api/v1/repository/{repository}/build/" + x-tag: build + /api/v1/repository/{repository}/build/{build_uuid}: + delete: + description: Cancels a repository build. + operationId: cancelRepoBuild + parameters: + - description: The UUID of the build + explode: false + in: path + name: build_uuid + required: true + schema: + type: string + style: simple + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - repo:admin + tags: + - build + get: + description: Returns information about a build. + operationId: getRepoBuild + parameters: + - description: The UUID of the build + explode: false + in: path + name: build_uuid + required: true + schema: + type: string + style: simple + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:read + tags: + - build + x-name: endpoints.api.build.RepositoryBuildResource + x-path: "/api/v1/repository/{repository}/build/{build_uuid}" + x-tag: build + /api/v1/repository/{repository}/build/{build_uuid}/status: + get: + description: Return the status for the builds specified by the build uuids. + operationId: getRepoBuildStatus + parameters: + - description: The UUID of the build + explode: false + in: path + name: build_uuid + required: true + schema: + type: string + style: simple + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:read + tags: + - build + x-name: endpoints.api.build.RepositoryBuildStatus + x-path: "/api/v1/repository/{repository}/build/{build_uuid}/status" + x-tag: build + /api/v1/repository/{repository}/build/{build_uuid}/logs: + get: + description: Return the build logs for the build specified by the build uuid. + operationId: getRepoBuildLogs + parameters: + - description: The UUID of the build + explode: false + in: path + name: build_uuid + required: true + schema: + type: string + style: simple + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:read + tags: + - build + x-name: endpoints.api.build.RepositoryBuildLogs + x-path: "/api/v1/repository/{repository}/build/{build_uuid}/logs" + x-tag: build + /api/v1/discovery: + get: + description: List all of the API endpoints available in the swagger API format. + operationId: discovery + parameters: + - description: Whether to include internal APIs. + explode: true + in: query + name: internal + required: false + schema: + type: boolean + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + tags: + - discovery + x-name: endpoints.api.discovery.DiscoveryResource + x-path: /api/v1/discovery + x-tag: discovery + /api/v1/error/{error_type}: + get: + description: Get a detailed description of the error. + operationId: getErrorDescription + parameters: + - description: The error code identifying the type of error. + explode: false + in: path + name: error_type + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDescription' + description: Successful invocation + tags: + - error + x-name: endpoints.api.error.Error + x-path: "/api/v1/error/{error_type}" + x-tag: error + /api/v1/messages: + get: + description: Return a super users messages. + operationId: getGlobalMessages + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + tags: + - globalmessages + post: + description: Create a message. + operationId: createGlobalMessage + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/CreateMessage' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - super:user + tags: + - globalmessages + x-codegen-request-body-name: body + x-name: endpoints.api.globalmessages.GlobalUserMessages + x-path: /api/v1/messages + x-tag: globalmessages + /api/v1/message/{uuid}: + delete: + description: Delete a message. + operationId: deleteGlobalMessage + parameters: + - explode: false + in: path + name: uuid + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - super:user + tags: + - globalmessages + x-name: endpoints.api.globalmessages.GlobalUserMessage + x-path: "/api/v1/message/{uuid}" + x-tag: globalmessages + /api/v1/repository/{repository}/logs: + get: + description: List the logs for the specified repository. + operationId: listRepoLogs + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The page token for the next page + explode: true + in: query + name: next_page + required: false + schema: + type: string + style: form + - description: "Latest time for logs. Format: \"%m/%d/%Y\" in UTC." + explode: true + in: query + name: endtime + required: false + schema: + type: string + style: form + - description: "Earliest time for logs. Format: \"%m/%d/%Y\" in UTC." + explode: true + in: query + name: starttime + required: false + schema: + type: string + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:admin + tags: + - logs + x-name: endpoints.api.logs.RepositoryLogs + x-path: "/api/v1/repository/{repository}/logs" + x-tag: logs + /api/v1/user/logs: + get: + description: List the logs for the current user. + operationId: listUserLogs + parameters: + - description: The page token for the next page + explode: true + in: query + name: next_page + required: false + schema: + type: string + style: form + - description: Username for which to filter logs. + explode: true + in: query + name: performer + required: false + schema: + type: string + style: form + - description: "Latest time for logs. Format: \"%m/%d/%Y\" in UTC." + explode: true + in: query + name: endtime + required: false + schema: + type: string + style: form + - description: "Earliest time for logs. Format: \"%m/%d/%Y\" in UTC." + explode: true + in: query + name: starttime + required: false + schema: + type: string + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - user:admin + tags: + - logs + x-name: endpoints.api.logs.UserLogs + x-path: /api/v1/user/logs + x-tag: logs + /api/v1/organization/{orgname}/logs: + get: + description: List the logs for the specified organization. + operationId: listOrgLogs + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: The page token for the next page + explode: true + in: query + name: next_page + required: false + schema: + type: string + style: form + - description: Username for which to filter logs. + explode: true + in: query + name: performer + required: false + schema: + type: string + style: form + - description: "Latest time for logs. Format: \"%m/%d/%Y\" in UTC." + explode: true + in: query + name: endtime + required: false + schema: + type: string + style: form + - description: "Earliest time for logs. Format: \"%m/%d/%Y\" in UTC." + explode: true + in: query + name: starttime + required: false + schema: + type: string + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - org:admin + tags: + - logs + x-name: endpoints.api.logs.OrgLogs + x-path: "/api/v1/organization/{orgname}/logs" + x-tag: logs + /api/v1/repository/{repository}/aggregatelogs: + get: + description: Returns the aggregated logs for the specified repository. + operationId: getAggregateRepoLogs + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: "Latest time for logs. Format: \"%m/%d/%Y\" in UTC." + explode: true + in: query + name: endtime + required: false + schema: + type: string + style: form + - description: "Earliest time for logs. Format: \"%m/%d/%Y\" in UTC." + explode: true + in: query + name: starttime + required: false + schema: + type: string + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:admin + tags: + - logs + x-name: endpoints.api.logs.RepositoryAggregateLogs + x-path: "/api/v1/repository/{repository}/aggregatelogs" + x-tag: logs + /api/v1/user/aggregatelogs: + get: + description: Returns the aggregated logs for the current user. + operationId: getAggregateUserLogs + parameters: + - description: Username for which to filter logs. + explode: true + in: query + name: performer + required: false + schema: + type: string + style: form + - description: "Latest time for logs. Format: \"%m/%d/%Y\" in UTC." + explode: true + in: query + name: endtime + required: false + schema: + type: string + style: form + - description: "Earliest time for logs. Format: \"%m/%d/%Y\" in UTC." + explode: true + in: query + name: starttime + required: false + schema: + type: string + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - user:admin + tags: + - logs + x-name: endpoints.api.logs.UserAggregateLogs + x-path: /api/v1/user/aggregatelogs + x-tag: logs + /api/v1/organization/{orgname}/aggregatelogs: + get: + description: Gets the aggregated logs for the specified organization. + operationId: getAggregateOrgLogs + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: Username for which to filter logs. + explode: true + in: query + name: performer + required: false + schema: + type: string + style: form + - description: "Latest time for logs. Format: \"%m/%d/%Y\" in UTC." + explode: true + in: query + name: endtime + required: false + schema: + type: string + style: form + - description: "Earliest time for logs. Format: \"%m/%d/%Y\" in UTC." + explode: true + in: query + name: starttime + required: false + schema: + type: string + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - org:admin + tags: + - logs + x-name: endpoints.api.logs.OrgAggregateLogs + x-path: "/api/v1/organization/{orgname}/aggregatelogs" + x-tag: logs + /api/v1/repository/{repository}/exportlogs: + post: + description: Queues an export of the logs for the specified repository. + operationId: exportRepoLogs + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: "Latest time for logs. Format: \"%m/%d/%Y\" in UTC." + explode: true + in: query + name: endtime + required: false + schema: + type: string + style: form + - description: "Earliest time for logs. Format: \"%m/%d/%Y\" in UTC." + explode: true + in: query + name: starttime + required: false + schema: + type: string + style: form + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/ExportLogs' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - repo:admin + tags: + - logs + x-codegen-request-body-name: body + x-name: endpoints.api.logs.ExportRepositoryLogs + x-path: "/api/v1/repository/{repository}/exportlogs" + x-tag: logs + /api/v1/user/exportlogs: + post: + description: Returns the aggregated logs for the current user. + operationId: exportUserLogs + parameters: + - description: "Latest time for logs. Format: \"%m/%d/%Y\" in UTC." + explode: true + in: query + name: endtime + required: false + schema: + type: string + style: form + - description: "Earliest time for logs. Format: \"%m/%d/%Y\" in UTC." + explode: true + in: query + name: starttime + required: false + schema: + type: string + style: form + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/ExportLogs' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - user:admin + tags: + - logs + x-codegen-request-body-name: body + x-name: endpoints.api.logs.ExportUserLogs + x-path: /api/v1/user/exportlogs + x-tag: logs + /api/v1/organization/{orgname}/exportlogs: + post: + description: Exports the logs for the specified organization. + operationId: exportOrgLogs + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: "Latest time for logs. Format: \"%m/%d/%Y\" in UTC." + explode: true + in: query + name: endtime + required: false + schema: + type: string + style: form + - description: "Earliest time for logs. Format: \"%m/%d/%Y\" in UTC." + explode: true + in: query + name: starttime + required: false + schema: + type: string + style: form + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/ExportLogs' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - org:admin + tags: + - logs + x-codegen-request-body-name: body + x-name: endpoints.api.logs.ExportOrgLogs + x-path: "/api/v1/organization/{orgname}/exportlogs" + x-tag: logs + /api/v1/repository/{repository}/manifest/{manifestref}: + get: + operationId: getRepoManifest + parameters: + - description: The digest of the manifest + explode: false + in: path + name: manifestref + required: true + schema: + type: string + style: simple + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:read + tags: + - manifest + x-name: endpoints.api.manifest.RepositoryManifest + x-path: "/api/v1/repository/{repository}/manifest/{manifestref}" + x-tag: manifest + /api/v1/repository/{repository}/manifest/{manifestref}/labels: + get: + operationId: listManifestLabels + parameters: + - description: The digest of the manifest + explode: false + in: path + name: manifestref + required: true + schema: + type: string + style: simple + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: "If specified, only labels matching the given prefix will be\ + \ returned" + explode: true + in: query + name: filter + required: false + schema: + type: string + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:read + tags: + - manifest + post: + description: Adds a new label into the tag manifest. + operationId: addManifestLabel + parameters: + - description: The digest of the manifest + explode: false + in: path + name: manifestref + required: true + schema: + type: string + style: simple + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/AddLabel' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - repo:write + tags: + - manifest + x-codegen-request-body-name: body + x-name: endpoints.api.manifest.RepositoryManifestLabels + x-path: "/api/v1/repository/{repository}/manifest/{manifestref}/labels" + x-tag: manifest + /api/v1/repository/{repository}/manifest/{manifestref}/labels/{labelid}: + delete: + description: Deletes an existing label from a manifest. + operationId: deleteManifestLabel + parameters: + - description: The digest of the manifest + explode: false + in: path + name: manifestref + required: true + schema: + type: string + style: simple + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The ID of the label + explode: false + in: path + name: labelid + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - repo:write + tags: + - manifest + get: + description: Retrieves the label with the specific ID under the manifest. + operationId: getManifestLabel + parameters: + - description: The digest of the manifest + explode: false + in: path + name: manifestref + required: true + schema: + type: string + style: simple + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The ID of the label + explode: false + in: path + name: labelid + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:read + tags: + - manifest + x-name: endpoints.api.manifest.ManageRepositoryManifestLabel + x-path: "/api/v1/repository/{repository}/manifest/{manifestref}/labels/{labelid}" + x-tag: manifest + /api/v1/organization/{orgname}/quota: + get: + operationId: listOrganizationQuota + parameters: + - explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + tags: + - namespacequota + post: + description: Create a new organization quota. + operationId: createOrganizationQuota + parameters: + - explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/NewOrgQuota' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - super:user + tags: + - namespacequota + x-codegen-request-body-name: body + x-name: endpoints.api.namespacequota.OrganizationQuotaList + x-path: "/api/v1/organization/{orgname}/quota" + x-tag: namespacequota + /api/v1/organization/{orgname}/quota/{quota_id}: + delete: + operationId: deleteOrganizationQuota + parameters: + - explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: quota_id + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - super:user + tags: + - namespacequota + get: + operationId: getOrganizationQuota + parameters: + - explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: quota_id + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + tags: + - namespacequota + put: + operationId: changeOrganizationQuota + parameters: + - explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: quota_id + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/UpdateOrgQuota' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - super:user + tags: + - namespacequota + x-codegen-request-body-name: body + x-name: endpoints.api.namespacequota.OrganizationQuota + x-path: "/api/v1/organization/{orgname}/quota/{quota_id}" + x-tag: namespacequota + /api/v1/organization/{orgname}/quota/{quota_id}/limit: + get: + operationId: listOrganizationQuotaLimit + parameters: + - explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: quota_id + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + tags: + - namespacequota + post: + operationId: createOrganizationQuotaLimit + parameters: + - explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: quota_id + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/NewOrgQuotaLimit' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - super:user + tags: + - namespacequota + x-codegen-request-body-name: body + x-name: endpoints.api.namespacequota.OrganizationQuotaLimitList + x-path: "/api/v1/organization/{orgname}/quota/{quota_id}/limit" + x-tag: namespacequota + /api/v1/organization/{orgname}/quota/{quota_id}/limit/{limit_id}: + delete: + operationId: deleteOrganizationQuotaLimit + parameters: + - explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: limit_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: quota_id + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - super:user + tags: + - namespacequota + get: + operationId: getOrganizationQuotaLimit + parameters: + - explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: limit_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: quota_id + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + tags: + - namespacequota + put: + operationId: changeOrganizationQuotaLimit + parameters: + - explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: limit_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: quota_id + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/UpdateOrgQuotaLimit' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - super:user + tags: + - namespacequota + x-codegen-request-body-name: body + x-name: endpoints.api.namespacequota.OrganizationQuotaLimit + x-path: "/api/v1/organization/{orgname}/quota/{quota_id}/limit/{limit_id}" + x-tag: namespacequota + /api/v1/user/quota: + get: + operationId: listUserQuota + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - user:admin + tags: + - namespacequota + x-name: endpoints.api.namespacequota.UserQuotaList + x-path: /api/v1/user/quota + x-tag: namespacequota + /api/v1/user/quota/{quota_id}: + get: + operationId: getUserQuota + parameters: + - explode: false + in: path + name: quota_id + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - user:admin + tags: + - namespacequota + x-name: endpoints.api.namespacequota.UserQuota + x-path: "/api/v1/user/quota/{quota_id}" + x-tag: namespacequota + /api/v1/user/quota/{quota_id}/limit: + get: + operationId: listUserQuotaLimit + parameters: + - explode: false + in: path + name: quota_id + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - user:admin + tags: + - namespacequota + x-name: endpoints.api.namespacequota.UserQuotaLimitList + x-path: "/api/v1/user/quota/{quota_id}/limit" + x-tag: namespacequota + /api/v1/user/quota/{quota_id}/limit/{limit_id}: + get: + operationId: getUserQuotaLimit + parameters: + - explode: false + in: path + name: limit_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: quota_id + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - user:admin + tags: + - namespacequota + x-name: endpoints.api.namespacequota.UserQuotaLimit + x-path: "/api/v1/user/quota/{quota_id}/limit/{limit_id}" + x-tag: namespacequota + /api/v1/organization/: + post: + description: Create a new organization. + operationId: createOrganization + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/NewOrg' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - user:admin + tags: + - organization + x-codegen-request-body-name: body + x-name: endpoints.api.organization.OrganizationList + x-path: /api/v1/organization/ + x-tag: organization + /api/v1/organization/{orgname}: + delete: + description: Deletes the specified organization. + operationId: deleteAdminedOrganization + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - org:admin + tags: + - organization + get: + description: Get the details for the specified organization. + operationId: getOrganization + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + tags: + - organization + put: + description: Change the details for the specified organization. + operationId: changeOrganizationDetails + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/UpdateOrg' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - org:admin + tags: + - organization + x-codegen-request-body-name: body + x-name: endpoints.api.organization.Organization + x-path: "/api/v1/organization/{orgname}" + x-tag: organization + /api/v1/organization/{orgname}/collaborators: + get: + description: List outside collaborators of the specified organization. + operationId: getOrganizationCollaborators + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - org:admin + tags: + - organization + x-name: endpoints.api.organization.OrganizationCollaboratorList + x-path: "/api/v1/organization/{orgname}/collaborators" + x-tag: organization + /api/v1/organization/{orgname}/members: + get: + description: List the human members of the specified organization. + operationId: getOrganizationMembers + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - org:admin + tags: + - organization + x-name: endpoints.api.organization.OrganizationMemberList + x-path: "/api/v1/organization/{orgname}/members" + x-tag: organization + /api/v1/organization/{orgname}/members/{membername}: + delete: + description: |- + Removes a member from an organization, revoking all its repository priviledges and removing + it from all teams in the organization. + operationId: removeOrganizationMember + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: The username of the organization member + explode: false + in: path + name: membername + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - org:admin + tags: + - organization + get: + description: Retrieves the details of a member of the organization. + operationId: getOrganizationMember + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: The username of the organization member + explode: false + in: path + name: membername + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - org:admin + tags: + - organization + x-name: endpoints.api.organization.OrganizationMember + x-path: "/api/v1/organization/{orgname}/members/{membername}" + x-tag: organization + /api/v1/app/{client_id}: + get: + description: Get information on the specified application. + operationId: getApplicationInformation + parameters: + - description: The OAuth client ID + explode: false + in: path + name: client_id + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + tags: + - organization + x-name: endpoints.api.organization.ApplicationInformation + x-path: "/api/v1/app/{client_id}" + x-tag: organization + /api/v1/organization/{orgname}/applications: + get: + description: List the applications for the specified organization. + operationId: getOrganizationApplications + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - org:admin + tags: + - organization + post: + description: Creates a new application under this organization. + operationId: createOrganizationApplication + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/NewApp' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - org:admin + tags: + - organization + x-codegen-request-body-name: body + x-name: endpoints.api.organization.OrganizationApplications + x-path: "/api/v1/organization/{orgname}/applications" + x-tag: organization + /api/v1/organization/{orgname}/applications/{client_id}: + delete: + description: Deletes the application under this organization. + operationId: deleteOrganizationApplication + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: The OAuth client ID + explode: false + in: path + name: client_id + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - org:admin + tags: + - organization + get: + description: Retrieves the application with the specified client_id under the + specified organization. + operationId: getOrganizationApplication + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: The OAuth client ID + explode: false + in: path + name: client_id + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - org:admin + tags: + - organization + put: + description: Updates an application under this organization. + operationId: updateOrganizationApplication + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: The OAuth client ID + explode: false + in: path + name: client_id + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/UpdateApp' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - org:admin + tags: + - organization + x-codegen-request-body-name: body + x-name: endpoints.api.organization.OrganizationApplicationResource + x-path: "/api/v1/organization/{orgname}/applications/{client_id}" + x-tag: organization + /api/v1/repository/{repository}/permissions/team/: + get: + description: List all team permission. + operationId: listRepoTeamPermissions + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:admin + tags: + - permission + x-name: endpoints.api.permission.RepositoryTeamPermissionList + x-path: "/api/v1/repository/{repository}/permissions/team/" + x-tag: permission + /api/v1/repository/{repository}/permissions/user/: + get: + description: List all user permissions. + operationId: listRepoUserPermissions + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:admin + tags: + - permission + x-name: endpoints.api.permission.RepositoryUserPermissionList + x-path: "/api/v1/repository/{repository}/permissions/user/" + x-tag: permission + /api/v1/repository/{repository}/permissions/user/{username}/transitive: + get: + description: Get the fetch the permission for the specified user. + operationId: getUserTransitivePermission + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The username of the user to which the permissions apply + explode: false + in: path + name: username + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:admin + tags: + - permission + x-name: endpoints.api.permission.RepositoryUserTransitivePermission + x-path: "/api/v1/repository/{repository}/permissions/user/{username}/transitive" + x-tag: permission + /api/v1/repository/{repository}/permissions/user/{username}: + delete: + description: Delete the permission for the user. + operationId: deleteUserPermissions + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The username of the user to which the permission applies + explode: false + in: path + name: username + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - repo:admin + tags: + - permission + get: + description: Get the permission for the specified user. + operationId: getUserPermissions + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The username of the user to which the permission applies + explode: false + in: path + name: username + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:admin + tags: + - permission + put: + description: Update the perimssions for an existing repository. + operationId: changeUserPermissions + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The username of the user to which the permission applies + explode: false + in: path + name: username + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/UserPermission' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:admin + tags: + - permission + x-codegen-request-body-name: body + x-name: endpoints.api.permission.RepositoryUserPermission + x-path: "/api/v1/repository/{repository}/permissions/user/{username}" + x-tag: permission + /api/v1/repository/{repository}/permissions/team/{teamname}: + delete: + description: Delete the permission for the specified team. + operationId: deleteTeamPermissions + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The name of the team to which the permission applies + explode: false + in: path + name: teamname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - repo:admin + tags: + - permission + get: + description: Fetch the permission for the specified team. + operationId: getTeamPermissions + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The name of the team to which the permission applies + explode: false + in: path + name: teamname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:admin + tags: + - permission + put: + description: Update the existing team permission. + operationId: changeTeamPermissions + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The name of the team to which the permission applies + explode: false + in: path + name: teamname + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/TeamPermission' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:admin + tags: + - permission + x-codegen-request-body-name: body + x-name: endpoints.api.permission.RepositoryTeamPermission + x-path: "/api/v1/repository/{repository}/permissions/team/{teamname}" + x-tag: permission + /api/v1/organization/{orgname}/prototypes: + get: + description: List the existing prototypes for this organization. + operationId: getOrganizationPrototypePermissions + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - org:admin + tags: + - prototype + post: + description: Create a new permission prototype. + operationId: createOrganizationPrototypePermission + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/NewPrototype' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - org:admin + tags: + - prototype + x-codegen-request-body-name: body + x-name: endpoints.api.prototype.PermissionPrototypeList + x-path: "/api/v1/organization/{orgname}/prototypes" + x-tag: prototype + /api/v1/organization/{orgname}/prototypes/{prototypeid}: + delete: + description: Delete an existing permission prototype. + operationId: deleteOrganizationPrototypePermission + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: The ID of the prototype + explode: false + in: path + name: prototypeid + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - org:admin + tags: + - prototype + put: + description: Update the role of an existing permission prototype. + operationId: updateOrganizationPrototypePermission + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: The ID of the prototype + explode: false + in: path + name: prototypeid + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/PrototypeUpdate' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - org:admin + tags: + - prototype + x-codegen-request-body-name: body + x-name: endpoints.api.prototype.PermissionPrototype + x-path: "/api/v1/organization/{orgname}/prototypes/{prototypeid}" + x-tag: prototype + /api/v1/repository: + get: + description: Fetch the list of repositories visible to the current user under + a variety of situations. + operationId: listRepos + parameters: + - description: The page token for the next page + explode: true + in: query + name: next_page + required: false + schema: + type: string + style: form + - description: The kind of repositories to return + explode: true + in: query + name: repo_kind + required: false + schema: + type: string + style: form + - description: Whether to include the repository's popularity metric. + explode: true + in: query + name: popularity + required: false + schema: + type: boolean + style: form + - description: Whether to include when the repository was last modified. + explode: true + in: query + name: last_modified + required: false + schema: + type: boolean + style: form + - description: Adds any repositories visible to the user by virtue of being + public + explode: true + in: query + name: public + required: false + schema: + type: boolean + style: form + - description: Filters the repositories returned to those starred by the user + explode: true + in: query + name: starred + required: false + schema: + type: boolean + style: form + - description: Filters the repositories returned to this namespace + explode: true + in: query + name: namespace + required: false + schema: + type: string + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:read + tags: + - repository + post: + description: Create a new repository. + operationId: createRepo + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/NewRepo' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - repo:create + tags: + - repository + x-codegen-request-body-name: body + x-name: endpoints.api.repository.RepositoryList + x-path: /api/v1/repository + x-tag: repository + /api/v1/repository/{repository}: + delete: + description: Delete a repository. + operationId: deleteRepository + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - repo:admin + tags: + - repository + get: + description: Fetch the specified repository. + operationId: getRepo + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: Whether to include repository tags + explode: true + in: query + name: includeTags + required: false + schema: + type: boolean + style: form + - description: Whether to include action statistics + explode: true + in: query + name: includeStats + required: false + schema: + type: boolean + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:read + tags: + - repository + put: + description: Update the description in the specified repository. + operationId: updateRepo + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/RepoUpdate' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:write + tags: + - repository + x-codegen-request-body-name: body + x-name: endpoints.api.repository.Repository + x-path: "/api/v1/repository/{repository}" + x-tag: repository + /api/v1/repository/{repository}/changevisibility: + post: + description: Change the visibility of a repository. + operationId: changeRepoVisibility + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/ChangeVisibility' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - repo:admin + tags: + - repository + x-codegen-request-body-name: body + x-name: endpoints.api.repository.RepositoryVisibility + x-path: "/api/v1/repository/{repository}/changevisibility" + x-tag: repository + /api/v1/repository/{repository}/changetrust: + x-name: endpoints.api.repository.RepositoryTrust + x-path: "/api/v1/repository/{repository}/changetrust" + x-tag: repository + /api/v1/repository/{repository}/notification/: + get: + description: List the notifications for the specified repository. + operationId: listRepoNotifications + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:admin + tags: + - repositorynotification + post: + operationId: createRepoNotification + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/NotificationCreateRequest' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - repo:admin + tags: + - repositorynotification + x-codegen-request-body-name: body + x-name: endpoints.api.repositorynotification.RepositoryNotificationList + x-path: "/api/v1/repository/{repository}/notification/" + x-tag: repositorynotification + /api/v1/repository/{repository}/notification/{uuid}: + delete: + description: Deletes the specified notification. + operationId: deleteRepoNotification + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The UUID of the notification + explode: false + in: path + name: uuid + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - repo:admin + tags: + - repositorynotification + get: + description: Get information for the specified notification. + operationId: getRepoNotification + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The UUID of the notification + explode: false + in: path + name: uuid + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:admin + tags: + - repositorynotification + post: + description: Resets repository notification to 0 failures. + operationId: resetRepositoryNotificationFailures + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The UUID of the notification + explode: false + in: path + name: uuid + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - repo:admin + tags: + - repositorynotification + x-name: endpoints.api.repositorynotification.RepositoryNotification + x-path: "/api/v1/repository/{repository}/notification/{uuid}" + x-tag: repositorynotification + /api/v1/repository/{repository}/notification/{uuid}/test: + post: + description: Queues a test notification for this repository. + operationId: testRepoNotification + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The UUID of the notification + explode: false + in: path + name: uuid + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - repo:admin + tags: + - repositorynotification + x-name: endpoints.api.repositorynotification.TestRepositoryNotification + x-path: "/api/v1/repository/{repository}/notification/{uuid}/test" + x-tag: repositorynotification + /api/v1/repository/{repository}/tokens/: + get: + description: List the tokens for the specified repository. + operationId: listRepoTokens + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:admin + tags: + - repotoken + post: + description: Create a new repository token. + operationId: createToken + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/NewToken' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - repo:admin + tags: + - repotoken + x-codegen-request-body-name: body + x-name: endpoints.api.repotoken.RepositoryTokenList + x-path: "/api/v1/repository/{repository}/tokens/" + x-tag: repotoken + /api/v1/repository/{repository}/tokens/{code}: + delete: + description: Delete the repository token. + operationId: deleteToken + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The token code + explode: false + in: path + name: code + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - repo:admin + tags: + - repotoken + get: + description: Fetch the specified repository token information. + operationId: getTokens + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The token code + explode: false + in: path + name: code + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:admin + tags: + - repotoken + put: + description: Update the permissions for the specified repository token. + operationId: changeToken + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The token code + explode: false + in: path + name: code + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/TokenPermission' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:admin + tags: + - repotoken + x-codegen-request-body-name: body + x-name: endpoints.api.repotoken.RepositoryToken + x-path: "/api/v1/repository/{repository}/tokens/{code}" + x-tag: repotoken + /api/v1/user/robots: + get: + description: List the available robots for the user. + operationId: getUserRobots + parameters: + - description: "If specified, the number of robots to return." + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: "If false, the robot's token is not returned." + explode: true + in: query + name: token + required: false + schema: + type: boolean + style: form + - description: Whether to include repositories and teams in which the robots + have permission. + explode: true + in: query + name: permissions + required: false + schema: + type: boolean + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - user:admin + tags: + - robot + x-name: endpoints.api.robot.UserRobotList + x-path: /api/v1/user/robots + x-tag: robot + /api/v1/user/robots/{robot_shortname}: + delete: + description: Delete an existing robot. + operationId: deleteUserRobot + parameters: + - description: "The short name for the robot, without any user or organization\ + \ prefix" + explode: false + in: path + name: robot_shortname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - user:admin + tags: + - robot + get: + description: Returns the user's robot with the specified name. + operationId: getUserRobot + parameters: + - description: "The short name for the robot, without any user or organization\ + \ prefix" + explode: false + in: path + name: robot_shortname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - user:admin + tags: + - robot + put: + description: Create a new user robot with the specified name. + operationId: createUserRobot + parameters: + - description: "The short name for the robot, without any user or organization\ + \ prefix" + explode: false + in: path + name: robot_shortname + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/CreateRobot' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - user:admin + tags: + - robot + x-codegen-request-body-name: body + x-name: endpoints.api.robot.UserRobot + x-path: "/api/v1/user/robots/{robot_shortname}" + x-tag: robot + /api/v1/organization/{orgname}/robots: + get: + description: List the organization's robots. + operationId: getOrgRobots + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: "If specified, the number of robots to return." + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: "If false, the robot's token is not returned." + explode: true + in: query + name: token + required: false + schema: + type: boolean + style: form + - description: Whether to include repostories and teams in which the robots + have permission. + explode: true + in: query + name: permissions + required: false + schema: + type: boolean + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - org:admin + tags: + - robot + x-name: endpoints.api.robot.OrgRobotList + x-path: "/api/v1/organization/{orgname}/robots" + x-tag: robot + /api/v1/organization/{orgname}/robots/{robot_shortname}: + delete: + description: Delete an existing organization robot. + operationId: deleteOrgRobot + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: "The short name for the robot, without any user or organization\ + \ prefix" + explode: false + in: path + name: robot_shortname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - org:admin + tags: + - robot + get: + description: Returns the organization's robot with the specified name. + operationId: getOrgRobot + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: "The short name for the robot, without any user or organization\ + \ prefix" + explode: false + in: path + name: robot_shortname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - org:admin + tags: + - robot + put: + description: Create a new robot in the organization. + operationId: createOrgRobot + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: "The short name for the robot, without any user or organization\ + \ prefix" + explode: false + in: path + name: robot_shortname + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/CreateRobot' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - org:admin + tags: + - robot + x-codegen-request-body-name: body + x-name: endpoints.api.robot.OrgRobot + x-path: "/api/v1/organization/{orgname}/robots/{robot_shortname}" + x-tag: robot + /api/v1/user/robots/{robot_shortname}/permissions: + get: + description: Returns the list of repository permissions for the user's robot. + operationId: getUserRobotPermissions + parameters: + - description: "The short name for the robot, without any user or organization\ + \ prefix" + explode: false + in: path + name: robot_shortname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - user:admin + tags: + - robot + x-name: endpoints.api.robot.UserRobotPermissions + x-path: "/api/v1/user/robots/{robot_shortname}/permissions" + x-tag: robot + /api/v1/organization/{orgname}/robots/{robot_shortname}/permissions: + get: + description: Returns the list of repository permissions for the org's robot. + operationId: getOrgRobotPermissions + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: "The short name for the robot, without any user or organization\ + \ prefix" + explode: false + in: path + name: robot_shortname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - user:admin + tags: + - robot + x-name: endpoints.api.robot.OrgRobotPermissions + x-path: "/api/v1/organization/{orgname}/robots/{robot_shortname}/permissions" + x-tag: robot + /api/v1/user/robots/{robot_shortname}/regenerate: + post: + description: Regenerates the token for a user's robot. + operationId: regenerateUserRobotToken + parameters: + - description: "The short name for the robot, without any user or organization\ + \ prefix" + explode: false + in: path + name: robot_shortname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - user:admin + tags: + - robot + x-name: endpoints.api.robot.RegenerateUserRobot + x-path: "/api/v1/user/robots/{robot_shortname}/regenerate" + x-tag: robot + /api/v1/organization/{orgname}/robots/{robot_shortname}/regenerate: + post: + description: Regenerates the token for an organization robot. + operationId: regenerateOrgRobotToken + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: "The short name for the robot, without any user or organization\ + \ prefix" + explode: false + in: path + name: robot_shortname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - org:admin + tags: + - robot + x-name: endpoints.api.robot.RegenerateOrgRobot + x-path: "/api/v1/organization/{orgname}/robots/{robot_shortname}/regenerate" + x-tag: robot + /api/v1/entities/{prefix}: + get: + description: Get a list of entities that match the specified prefix. + operationId: getMatchingEntities + parameters: + - explode: false + in: path + name: prefix + required: true + schema: + type: string + style: simple + - description: Whether to include orgs names. + explode: true + in: query + name: includeOrgs + required: false + schema: + type: boolean + style: form + - description: Whether to include team names. + explode: true + in: query + name: includeTeams + required: false + schema: + type: boolean + style: form + - description: Namespace to use when querying for org entities. + explode: true + in: query + name: namespace + required: false + schema: + type: string + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + tags: + - search + x-name: endpoints.api.search.EntitySearch + x-path: "/api/v1/entities/{prefix}" + x-tag: search + /api/v1/find/all: + get: + description: Get a list of entities and resources that match the specified query. + operationId: conductSearch + parameters: + - description: The search query. + explode: true + in: query + name: query + required: false + schema: + type: string + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:read + tags: + - search + x-name: endpoints.api.search.ConductSearch + x-path: /api/v1/find/all + x-tag: search + /api/v1/find/repositories: + get: + description: Get a list of apps and repositories that match the specified query. + operationId: conductRepoSearch + parameters: + - description: Whether to include usage metadata + explode: true + in: query + name: includeUsage + required: false + schema: + type: boolean + style: form + - description: The page. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: The search query. + explode: true + in: query + name: query + required: false + schema: + type: string + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + tags: + - search + x-name: endpoints.api.search.ConductRepositorySearch + x-path: /api/v1/find/repositories + x-tag: search + /api/v1/superuser/logs: + get: + description: List the usage logs for the current system. + operationId: listAllLogs + parameters: + - description: The page token for the next page + explode: true + in: query + name: next_page + required: false + schema: + type: string + style: form + - description: The page number for the logs + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Latest time to which to get logs (%m/%d/%Y %Z) + explode: true + in: query + name: endtime + required: false + schema: + type: string + style: form + - description: Earliest time from which to get logs (%m/%d/%Y %Z) + explode: true + in: query + name: starttime + required: false + schema: + type: string + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - super:user + tags: + - superuser + x-name: endpoints.api.superuser.SuperUserLogs + x-path: /api/v1/superuser/logs + x-tag: superuser + /api/v1/superuser/users/{namespace}/quota: + get: + operationId: listUserQuotaSuperUser + parameters: + - explode: false + in: path + name: namespace + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - super:user + tags: + - superuser + post: + operationId: createUserQuotaSuperUser + parameters: + - explode: false + in: path + name: namespace + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/NewNamespaceQuota' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - super:user + tags: + - superuser + x-codegen-request-body-name: body + x-name: endpoints.api.superuser.SuperUserUserQuotaList + x-path: "/api/v1/superuser/users/{namespace}/quota" + x-tag: superuser + /api/v1/superuser/organization/{namespace}/quota: + get: + operationId: listOrganizationQuotaSuperUser + parameters: + - explode: false + in: path + name: namespace + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - super:user + tags: + - superuser + post: + operationId: createOrganizationQuotaSuperUser + parameters: + - explode: false + in: path + name: namespace + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/NewNamespaceQuota' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - super:user + tags: + - superuser + x-codegen-request-body-name: body + x-name: endpoints.api.superuser.SuperUserUserQuotaList + x-path: "/api/v1/superuser/organization/{namespace}/quota" + x-tag: superuser + /api/v1/superuser/users/{namespace}/quota/{quota_id}: + delete: + operationId: deleteUserQuotaSuperUser + parameters: + - explode: false + in: path + name: quota_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: namespace + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - super:user + tags: + - superuser + put: + operationId: changeUserQuotaSuperUser + parameters: + - explode: false + in: path + name: quota_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: namespace + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/UpdateNamespaceQuota' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - super:user + tags: + - superuser + x-codegen-request-body-name: body + x-name: endpoints.api.superuser.SuperUserUserQuota + x-path: "/api/v1/superuser/users/{namespace}/quota/{quota_id}" + x-tag: superuser + /api/v1/superuser/organization/{namespace}/quota/{quota_id}: + delete: + operationId: deleteOrganizationQuotaSuperUser + parameters: + - explode: false + in: path + name: quota_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: namespace + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - super:user + tags: + - superuser + put: + operationId: changeOrganizationQuotaSuperUser + parameters: + - explode: false + in: path + name: quota_id + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: namespace + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/UpdateNamespaceQuota' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - super:user + tags: + - superuser + x-codegen-request-body-name: body + x-name: endpoints.api.superuser.SuperUserUserQuota + x-path: "/api/v1/superuser/organization/{namespace}/quota/{quota_id}" + x-tag: superuser + /api/v1/superuser/users/: + get: + description: Returns a list of all users in the system. + operationId: listAllUsers + parameters: + - description: The page token for the next page + explode: true + in: query + name: next_page + required: false + schema: + type: string + style: form + - description: Limit to the number of results to return per page. Max 100. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: "If false, only enabled users will be returned." + explode: true + in: query + name: disabled + required: false + schema: + type: boolean + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - super:user + tags: + - superuser + post: + description: Creates a new user. + operationId: createInstallUser + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/CreateInstallUser' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - super:user + tags: + - superuser + x-codegen-request-body-name: body + x-name: endpoints.api.superuser.SuperUserList + x-path: /api/v1/superuser/users/ + x-tag: superuser + /api/v1/superuser/organizations/{name}: + delete: + description: Deletes the specified organization. + operationId: deleteOrganization + parameters: + - description: The name of the organizaton being managed + explode: false + in: path + name: name + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - super:user + tags: + - superuser + put: + description: Updates information about the specified user. + operationId: changeOrganization + parameters: + - description: The name of the organizaton being managed + explode: false + in: path + name: name + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/UpdateOrg' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - super:user + tags: + - superuser + x-codegen-request-body-name: body + x-name: endpoints.api.superuser.SuperUserOrganizationManagement + x-path: "/api/v1/superuser/organizations/{name}" + x-tag: superuser + /api/v1/superuser/keys: + get: + operationId: listServiceKeys + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - super:user + tags: + - superuser + post: + operationId: createServiceKey + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/CreateServiceKey' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - super:user + tags: + - superuser + x-codegen-request-body-name: body + x-name: endpoints.api.superuser.SuperUserServiceKeyManagement + x-path: /api/v1/superuser/keys + x-tag: superuser + /api/v1/superuser/keys/{kid}: + delete: + operationId: deleteServiceKey + parameters: + - description: The unique identifier for a service key + explode: false + in: path + name: kid + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - super:user + tags: + - superuser + get: + operationId: getServiceKey + parameters: + - description: The unique identifier for a service key + explode: false + in: path + name: kid + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - super:user + tags: + - superuser + put: + operationId: updateServiceKey + parameters: + - description: The unique identifier for a service key + explode: false + in: path + name: kid + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/PutServiceKey' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - super:user + tags: + - superuser + x-codegen-request-body-name: body + x-name: endpoints.api.superuser.SuperUserServiceKey + x-path: "/api/v1/superuser/keys/{kid}" + x-tag: superuser + /api/v1/superuser/approvedkeys/{kid}: + post: + operationId: approveServiceKey + parameters: + - description: The unique identifier for a service key + explode: false + in: path + name: kid + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/ApproveServiceKey' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - super:user + tags: + - superuser + x-codegen-request-body-name: body + x-name: endpoints.api.superuser.SuperUserServiceKeyApproval + x-path: "/api/v1/superuser/approvedkeys/{kid}" + x-tag: superuser + /api/v1/superuser/{build_uuid}/logs: + get: + description: Return the build logs for the build specified by the build uuid. + operationId: getRepoBuildLogsSuperUser + parameters: + - description: The UUID of the build + explode: false + in: path + name: build_uuid + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - super:user + tags: + - superuser + x-name: endpoints.api.superuser.SuperUserRepositoryBuildLogs + x-path: "/api/v1/superuser/{build_uuid}/logs" + x-tag: superuser + /api/v1/superuser/{build_uuid}/status: + get: + description: Return the status for the builds specified by the build uuids. + operationId: getRepoBuildStatusSuperUser + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The UUID of the build + explode: false + in: path + name: build_uuid + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - super:user + tags: + - superuser + x-name: endpoints.api.superuser.SuperUserRepositoryBuildStatus + x-path: "/api/v1/superuser/{build_uuid}/status" + x-tag: superuser + /api/v1/superuser/{build_uuid}/build: + get: + description: Returns information about a build. + operationId: getRepoBuildSuperUser + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The UUID of the build + explode: false + in: path + name: build_uuid + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - super:user + tags: + - superuser + x-name: endpoints.api.superuser.SuperUserRepositoryBuildResource + x-path: "/api/v1/superuser/{build_uuid}/build" + x-tag: superuser + /api/v1/repository/{repository}/tag/: + get: + operationId: listRepoTags + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: Filter to only active tags. + explode: true + in: query + name: onlyActiveTags + required: false + schema: + type: boolean + style: form + - description: Page index for the results. Default 1. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: Limit to the number of results to return per page. Max 100. + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: "Syntax: : Filters the tag names based on the operation.\ + \ can be 'like' or 'eq'." + explode: true + in: query + name: filter_tag_name + required: false + schema: + type: string + style: form + - description: Filters the tags to the specific tag. + explode: true + in: query + name: specificTag + required: false + schema: + type: string + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:read + tags: + - tag + x-name: endpoints.api.tag.ListRepositoryTags + x-path: "/api/v1/repository/{repository}/tag/" + x-tag: tag + /api/v1/repository/{repository}/tag/{tag}: + delete: + description: Delete the specified repository tag. + operationId: deleteFullTag + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The name of the tag + explode: false + in: path + name: tag + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - repo:write + tags: + - tag + put: + description: Change which image a tag points to or create a new tag. + operationId: changeTag + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The name of the tag + explode: false + in: path + name: tag + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/ChangeTag' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:write + tags: + - tag + x-codegen-request-body-name: body + x-name: endpoints.api.tag.RepositoryTag + x-path: "/api/v1/repository/{repository}/tag/{tag}" + x-tag: tag + /api/v1/repository/{repository}/tag/{tag}/restore: + post: + description: Restores a repository tag back to a previous image in the repository. + operationId: restoreTag + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The name of the tag + explode: false + in: path + name: tag + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/RestoreTag' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - repo:write + tags: + - tag + x-codegen-request-body-name: body + x-name: endpoints.api.tag.RestoreTag + x-path: "/api/v1/repository/{repository}/tag/{tag}/restore" + x-tag: tag + /api/v1/organization/{orgname}/team/{teamname}: + delete: + description: Delete the specified team. + operationId: deleteOrganizationTeam + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: The name of the team + explode: false + in: path + name: teamname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - org:admin + tags: + - team + put: + description: Update the org-wide permission for the specified team. + operationId: updateOrganizationTeam + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: The name of the team + explode: false + in: path + name: teamname + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/TeamDescription' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - org:admin + tags: + - team + x-codegen-request-body-name: body + x-name: endpoints.api.team.OrganizationTeam + x-path: "/api/v1/organization/{orgname}/team/{teamname}" + x-tag: team + /api/v1/organization/{orgname}/team/{teamname}/syncing: + delete: + operationId: disableOrganizationTeamSync + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: The name of the team + explode: false + in: path + name: teamname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - org:admin + tags: + - team + post: + operationId: enableOrganizationTeamSync + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: The name of the team + explode: false + in: path + name: teamname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - org:admin + tags: + - team + x-name: endpoints.api.team.OrganizationTeamSyncing + x-path: "/api/v1/organization/{orgname}/team/{teamname}/syncing" + x-tag: team + /api/v1/organization/{orgname}/team/{teamname}/members: + get: + description: Retrieve the list of members for the specified team. + operationId: getOrganizationTeamMembers + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: The name of the team + explode: false + in: path + name: teamname + required: true + schema: + type: string + style: simple + - description: Whether to include pending members + explode: true + in: query + name: includePending + required: false + schema: + type: boolean + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - org:admin + tags: + - team + x-name: endpoints.api.team.TeamMemberList + x-path: "/api/v1/organization/{orgname}/team/{teamname}/members" + x-tag: team + /api/v1/organization/{orgname}/team/{teamname}/members/{membername}: + delete: + description: |- + Delete a member of a team. + + If the user is merely invited to join the team, then the invite is removed instead. + operationId: deleteOrganizationTeamMember + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: The username of the team member + explode: false + in: path + name: membername + required: true + schema: + type: string + style: simple + - description: The name of the team + explode: false + in: path + name: teamname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - org:admin + tags: + - team + put: + description: Adds or invites a member to an existing team. + operationId: updateOrganizationTeamMember + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: The username of the team member + explode: false + in: path + name: membername + required: true + schema: + type: string + style: simple + - description: The name of the team + explode: false + in: path + name: teamname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - org:admin + tags: + - team + x-name: endpoints.api.team.TeamMember + x-path: "/api/v1/organization/{orgname}/team/{teamname}/members/{membername}" + x-tag: team + /api/v1/organization/{orgname}/team/{teamname}/invite/{email}: + delete: + description: Delete an invite of an email address to join a team. + operationId: deleteTeamMemberEmailInvite + parameters: + - explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: email + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: teamname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - org:admin + tags: + - team + put: + description: Invites an email address to an existing team. + operationId: inviteTeamMemberEmail + parameters: + - explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: email + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: teamname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - org:admin + tags: + - team + x-name: endpoints.api.team.InviteTeamMember + x-path: "/api/v1/organization/{orgname}/team/{teamname}/invite/{email}" + x-tag: team + /api/v1/organization/{orgname}/team/{teamname}/permissions: + get: + description: Returns the list of repository permissions for the org's team. + operationId: getOrganizationTeamPermissions + parameters: + - description: The name of the organization + explode: false + in: path + name: orgname + required: true + schema: + type: string + style: simple + - description: The name of the team + explode: false + in: path + name: teamname + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + tags: + - team + x-name: endpoints.api.team.TeamPermissions + x-path: "/api/v1/organization/{orgname}/team/{teamname}/permissions" + x-tag: team + /api/v1/repository/{repository}/trigger/: + get: + description: List the triggers for the specified repository. + operationId: listBuildTriggers + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:admin + tags: + - trigger + x-name: endpoints.api.trigger.BuildTriggerList + x-path: "/api/v1/repository/{repository}/trigger/" + x-tag: trigger + /api/v1/repository/{repository}/trigger/{trigger_uuid}: + delete: + description: Delete the specified build trigger. + operationId: deleteBuildTrigger + parameters: + - description: The UUID of the build trigger + explode: false + in: path + name: trigger_uuid + required: true + schema: + type: string + style: simple + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - repo:admin + tags: + - trigger + get: + description: Get information for the specified build trigger. + operationId: getBuildTrigger + parameters: + - description: The UUID of the build trigger + explode: false + in: path + name: trigger_uuid + required: true + schema: + type: string + style: simple + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:admin + tags: + - trigger + put: + description: Updates the specified build trigger. + operationId: updateBuildTrigger + parameters: + - description: The UUID of the build trigger + explode: false + in: path + name: trigger_uuid + required: true + schema: + type: string + style: simple + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/UpdateTrigger' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:admin + tags: + - trigger + x-codegen-request-body-name: body + x-name: endpoints.api.trigger.BuildTrigger + x-path: "/api/v1/repository/{repository}/trigger/{trigger_uuid}" + x-tag: trigger + /api/v1/repository/{repository}/trigger/{trigger_uuid}/activate: + post: + description: Activate the specified build trigger. + operationId: activateBuildTrigger + parameters: + - description: The UUID of the build trigger + explode: false + in: path + name: trigger_uuid + required: true + schema: + type: string + style: simple + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/BuildTriggerActivateRequest' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - repo:admin + tags: + - trigger + x-codegen-request-body-name: body + x-name: endpoints.api.trigger.BuildTriggerActivate + x-path: "/api/v1/repository/{repository}/trigger/{trigger_uuid}/activate" + x-tag: trigger + /api/v1/repository/{repository}/trigger/{trigger_uuid}/start: + post: + description: Manually start a build from the specified trigger. + operationId: manuallyStartBuildTrigger + parameters: + - description: The UUID of the build trigger + explode: false + in: path + name: trigger_uuid + required: true + schema: + type: string + style: simple + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/RunParameters' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - repo:admin + tags: + - trigger + x-codegen-request-body-name: body + x-name: endpoints.api.trigger.ActivateBuildTrigger + x-path: "/api/v1/repository/{repository}/trigger/{trigger_uuid}/start" + x-tag: trigger + /api/v1/repository/{repository}/trigger/{trigger_uuid}/builds: + get: + description: List the builds started by the specified trigger. + operationId: listTriggerRecentBuilds + parameters: + - description: The UUID of the build trigger + explode: false + in: path + name: trigger_uuid + required: true + schema: + type: string + style: simple + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + - description: The maximum number of builds to return + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - repo:admin + tags: + - trigger + x-name: endpoints.api.trigger.TriggerBuildList + x-path: "/api/v1/repository/{repository}/trigger/{trigger_uuid}/builds" + x-tag: trigger + /api/v1/user/: + get: + description: Get user information for the authenticated user. + operationId: getLoggedInUser + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/UserView' + description: Successful invocation + security: + - oauth2_implicit: + - user:read + tags: + - user + x-name: endpoints.api.user.User + x-path: /api/v1/user/ + x-tag: user + /api/v1/user/starred: + get: + description: List all starred repositories. + operationId: listStarredRepos + parameters: + - description: The page token for the next page + explode: true + in: query + name: next_page + required: false + schema: + type: string + style: form + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + security: + - oauth2_implicit: + - user:admin + tags: + - user + post: + description: Star a repository. + operationId: createStar + requestBody: + content: + '*/*': + schema: + $ref: '#/components/schemas/NewStarredRepository' + description: Request body contents. + required: true + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "201": + content: {} + description: Successful creation + security: + - oauth2_implicit: + - repo:read + tags: + - user + x-codegen-request-body-name: body + x-name: endpoints.api.user.StarredRepositoryList + x-path: /api/v1/user/starred + x-tag: user + /api/v1/user/starred/{repository}: + delete: + description: Removes a star from a repository. + operationId: deleteStar + parameters: + - description: The full path of the repository. e.g. namespace/name + explode: false + in: path + name: repository + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "204": + content: {} + description: Deleted + security: + - oauth2_implicit: + - user:admin + tags: + - user + x-name: endpoints.api.user.StarredRepository + x-path: "/api/v1/user/starred/{repository}" + x-tag: user + /api/v1/users/{username}: + get: + description: Get user information for the specified user. + operationId: getUserInformation + parameters: + - explode: false + in: path + name: username + required: true + schema: + type: string + style: simple + responses: + "400": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Bad Request + "401": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Session required + "403": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Unauthorized access + "404": + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiError' + description: Not found + "200": + content: {} + description: Successful invocation + tags: + - user + x-name: endpoints.api.user.Users + x-path: "/api/v1/users/{username}" + x-tag: user + /userfiles/{file_id}: + x-name: data.userfiles.UserfilesHandlers + x-path: "/userfiles/{file_id}" + x-tag: userfiles +components: + schemas: + ApiError: + example: + error_message: error_message + error_type: error_type + detail: detail + type: type + title: title + status: 0 + properties: + status: + description: Status code of the response. + type: integer + type: + description: Reference to the type of the error. + type: string + detail: + description: Details about the specific instance of the error. + type: string + title: + description: Unique error code to identify the type of error. + type: string + error_message: + description: Deprecated; alias for detail + type: string + error_type: + description: Deprecated; alias for detail + type: string + required: + - status + - title + - type + type: object + NewToken: + description: Description of a new token. + example: + friendlyName: friendlyName + properties: + friendlyName: + description: Friendly name to help identify the token + type: string + required: + - friendlyName + type: object + RepositoryBuildRequest: + description: Description of a new repository build. + example: + archive_url: archive_url + file_id: file_id + context: context + docker_tags: + - docker_tags + - docker_tags + dockerfile_path: dockerfile_path + subdirectory: subdirectory + pull_robot: pull_robot + properties: + file_id: + description: The file id that was generated when the build spec was uploaded + type: string + archive_url: + description: The URL of the .tar.gz to build. Must start with "http" or + "https". + type: string + subdirectory: + description: Subdirectory in which the Dockerfile can be found. You can + only specify this or dockerfile_path + type: string + dockerfile_path: + description: Path to a dockerfile. You can only specify this or subdirectory. + type: string + context: + description: Pass in the context for the dockerfile. This is optional. + type: string + pull_robot: + description: Username of a Quay robot account to use as pull credentials + type: string + docker_tags: + description: "The tags to which the built images will be pushed. If none\ + \ specified, \"latest\" is used." + items: + type: string + minItems: 1 + type: array + uniqueItems: true + type: object + ApiErrorDescription: + description: Description of an error + example: + description: description + type: type + title: external_service_timeout + properties: + type: + description: A reference to the error type resource + type: string + title: + description: The title of the error. Can be used to uniquely identify the + kind of error. + enum: + - external_service_timeout + - invalid_request + - invalid_response + - invalid_token + - expired_token + - insufficient_scope + - fresh_login_required + - exceeds_license + - not_found + - downstream_issue + type: string + description: + description: A more detailed description of the error that may include help + for fixing the issue. + type: string + required: + - description + - title + - type + type: object + CreateMessage: + description: Create a new message + example: + message: + severity: info + media_type: text/plain + content: content + properties: + message: + $ref: '#/components/schemas/CreateMessage_message' + type: object + ExportLogs: + description: Configuration for an export logs operation + example: + callback_url: callback_url + callback_email: callback_email + properties: + callback_url: + description: The callback URL to invoke with a link to the exported logs + type: string + callback_email: + description: The e-mail address at which to e-mail a link to the exported + logs + type: string + type: object + AddLabel: + description: Adds a label to a manifest + example: + value: value + key: key + properties: + key: + description: The key for the label + type: string + value: + description: The value for the label + type: string + required: + - key + - value + type: object + NewOrgQuota: + description: Description of a new organization quota + example: + limit_bytes: 0 + properties: + limit_bytes: + description: Number of bytes the organization is allowed + type: integer + required: + - limit_bytes + type: object + UpdateOrgQuota: + description: Description of a new organization quota + example: + limit_bytes: 0 + properties: + limit_bytes: + description: Number of bytes the organization is allowed + type: integer + type: object + NewOrgQuotaLimit: + description: Description of a new organization quota limit + example: + threshold_percent: 0 + type: type + properties: + type: + description: "Type of quota limit: \"Warning\" or \"Reject\"" + type: string + threshold_percent: + description: "Quota threshold, in percent of quota" + type: integer + required: + - threshold_percent + - type + type: object + UpdateOrgQuotaLimit: + description: Description of changing organization quota limit + example: + threshold_percent: 0 + type: type + properties: + type: + description: "Type of quota limit: \"Warning\" or \"Reject\"" + type: string + threshold_percent: + description: "Quota threshold, in percent of quota" + type: integer + type: object + NewUser: + description: Fields which must be specified for a new user. + properties: + username: + description: The user's username + type: string + password: + description: The user's password + type: string + email: + description: The user's email address + type: string + invite_code: + description: The optional invite code + type: string + recaptcha_response: + description: The (may be disabled) recaptcha response code for verification + type: string + required: + - password + - username + type: object + UpdateUser: + description: Fields which can be updated in a user. + properties: + password: + description: The user's password + type: string + invoice_email: + description: Whether the user desires to receive an invoice email. + type: boolean + email: + description: The user's email address + type: string + tag_expiration_s: + description: The number of seconds for tag expiration + minimum: 0 + type: integer + username: + description: The user's username + type: string + type: object + UserView: + description: Describes a user + example: + can_create_repo: true + verified: true + organizations: + - "{}" + - "{}" + anonymous: true + avatar: "{}" + logins: + - "{}" + - "{}" + email: email + preferred_namespace: true + properties: + verified: + description: Whether the user's email address has been verified + type: boolean + anonymous: + description: true if this user data represents a guest user + type: boolean + email: + description: The user's email address + type: string + avatar: + description: Avatar data representing the user's icon + properties: {} + type: object + organizations: + description: Information about the organizations in which the user is a + member + items: + properties: {} + type: object + type: array + logins: + description: The list of external login providers against which the user + has authenticated + items: + properties: {} + type: object + type: array + can_create_repo: + description: Whether the user has permission to create repositories + type: boolean + preferred_namespace: + description: "If true, the user's namespace is the preferred namespace to\ + \ display" + type: boolean + required: + - anonymous + - avatar + type: object + NewStarredRepository: + example: + namespace: namespace + repository: repository + properties: + namespace: + description: Namespace in which the repository belongs + type: string + repository: + description: Repository name + type: string + required: + - namespace + - repository + type: object + NewOrg: + description: Description of a new organization. + example: + recaptcha_response: recaptcha_response + name: name + email: email + properties: + name: + description: Organization username + type: string + email: + description: Organization contact email + type: string + recaptcha_response: + description: The (may be disabled) recaptcha response code for verification + type: string + required: + - email + - name + type: object + UpdateOrg: + description: Description of updates for an organization + example: + name: name + email: email + properties: + name: + description: The new name for the organization + type: string + email: + description: Organization contact email + type: string + type: object + NewApp: + description: Description of a new organization application. + example: + application_uri: application_uri + avatar_email: avatar_email + name: name + description: description + redirect_uri: redirect_uri + properties: + name: + description: The name of the application + type: string + redirect_uri: + description: The URI for the application's OAuth redirect + type: string + application_uri: + description: The URI for the application's homepage + type: string + description: + description: The human-readable description for the application + type: string + avatar_email: + description: The e-mail address of the avatar to use for the application + type: string + required: + - name + type: object + UpdateApp: + description: Description of an updated application. + example: + application_uri: application_uri + avatar_email: avatar_email + name: name + description: description + redirect_uri: redirect_uri + properties: + name: + description: The name of the application + type: string + redirect_uri: + description: The URI for the application's OAuth redirect + type: string + application_uri: + description: The URI for the application's homepage + type: string + description: + description: The human-readable description for the application + type: string + avatar_email: + description: The e-mail address of the avatar to use for the application + type: string + required: + - application_uri + - name + - redirect_uri + type: object + UserPermission: + description: Description of a user permission. + example: + role: read + properties: + role: + description: Role to use for the user + enum: + - read + - write + - admin + type: string + required: + - role + type: object + TeamPermission: + description: Description of a team permission. + example: + role: read + properties: + role: + description: Role to use for the team + enum: + - read + - write + - admin + type: string + required: + - role + type: object + NewPrototype: + description: Description of a new prototype + example: + delegate: + kind: user + name: name + role: read + activating_user: + name: name + properties: + role: + description: Role that should be applied to the delegate + enum: + - read + - write + - admin + type: string + activating_user: + $ref: '#/components/schemas/NewPrototype_activating_user' + delegate: + $ref: '#/components/schemas/NewPrototype_delegate' + required: + - delegate + - role + type: object + PrototypeUpdate: + description: Description of a the new prototype role + example: + role: read + properties: + role: + description: Role that should be applied to the permission + enum: + - read + - write + - admin + type: string + required: + - role + type: object + NewRepo: + description: Description of a new repository + example: + visibility: public + namespace: namespace + description: description + repository: repository + properties: + repository: + description: Repository name + type: string + visibility: + description: Visibility which the repository will start with + enum: + - public + - private + type: string + namespace: + description: "Namespace in which the repository should be created. If omitted,\ + \ the username of the caller is used" + type: string + description: + description: Markdown encoded description for the repository + type: string + required: + - description + - repository + - visibility + type: object + RepoUpdate: + description: Fields which can be updated in a repository. + example: + description: description + properties: + description: + description: Markdown encoded description for the repository + type: string + required: + - description + type: object + ChangeVisibility: + description: Change the visibility for the repository. + example: + visibility: public + properties: + visibility: + description: Visibility which the repository will start with + enum: + - public + - private + type: string + required: + - visibility + type: object + NotificationCreateRequest: + description: Information for creating a notification on a repository + example: + eventConfig: "{}" + method: method + event: event + title: title + config: "{}" + properties: + event: + description: The event on which the notification will respond + type: string + method: + description: The method of notification (such as email or web callback) + type: string + config: + description: JSON config information for the specific method of notification + properties: {} + type: object + eventConfig: + description: JSON config information for the specific event of notification + properties: {} + type: object + title: + description: The human-readable title of the notification + type: string + required: + - config + - event + - eventConfig + - method + type: object + TokenPermission: + description: Description of a token permission + example: + role: read + properties: + role: + description: Role to use for the token + enum: + - read + - write + - admin + type: string + required: + - role + type: object + CreateRobot: + description: Optional data for creating a robot + example: + description: description + unstructured_metadata: "{}" + properties: + description: + description: Optional text description for the robot + maxLength: 255 + type: string + unstructured_metadata: + description: Optional unstructured metadata for the robot + properties: {} + type: object + type: object + NewNamespaceQuota: + description: Description of a new organization quota + example: + limit_bytes: 0 + properties: + limit_bytes: + description: Number of bytes the organization is allowed + type: integer + required: + - limit_bytes + type: object + UpdateNamespaceQuota: + description: Description of a new organization quota + example: + limit_bytes: 0 + properties: + limit_bytes: + description: Number of bytes the organization is allowed + type: integer + type: object + CreateInstallUser: + description: Data for creating a user + example: + email: email + username: username + properties: + username: + description: The username of the user being created + type: string + email: + description: The email address of the user being created + type: string + required: + - username + type: object + CreateServiceKey: + description: Description of creation of a service key + example: + metadata: "{}" + notes: notes + service: service + name: name + expiration: "{}" + properties: + service: + description: The service authenticating with this key + type: string + name: + description: The friendly name of a service key + type: string + metadata: + description: The key/value pairs of this key's metadata + properties: {} + type: object + notes: + description: "If specified, the extra notes for the key" + type: string + expiration: + description: The expiration date as a unix timestamp + type: object + required: + - expiration + - service + type: object + PutServiceKey: + description: Description of updates for a service key + example: + metadata: "{}" + name: name + expiration: "{}" + properties: + name: + description: The friendly name of a service key + type: string + metadata: + description: The key/value pairs of this key's metadata + properties: {} + type: object + expiration: + description: The expiration date as a unix timestamp + type: object + type: object + ApproveServiceKey: + description: Information for approving service keys + example: + notes: notes + properties: + notes: + description: Optional approval notes + type: string + type: object + ChangeTag: + description: Makes changes to a specific tag + type: object + RestoreTag: + description: Restores a tag to a specific image + example: + manifest_digest: manifest_digest + properties: + manifest_digest: + description: "If specified, the manifest digest that should be used" + type: string + type: object + TeamDescription: + description: Description of a team + example: + role: member + description: description + properties: + role: + description: Org wide permissions that should apply to the team + enum: + - member + - creator + - admin + type: string + description: + description: Markdown description for the team + type: string + required: + - role + type: object + UpdateTrigger: + description: Options for updating a build trigger + example: + enabled: true + properties: + enabled: + description: Whether the build trigger is enabled + type: boolean + required: + - enabled + type: object + BuildTriggerActivateRequest: + example: + config: "{}" + pull_robot: pull_robot + properties: + config: + description: Arbitrary json. + properties: {} + type: object + pull_robot: + description: The name of the robot that will be used to pull images. + type: string + required: + - config + type: object + RunParameters: + additionalProperties: false + description: Optional run parameters for activating the build trigger + example: + commit_sha: commit_sha + branch_name: branch_name + properties: + branch_name: + description: "(SCM only) If specified, the name of the branch to build." + type: string + commit_sha: + description: "(Custom Only) If specified, the ref/SHA1 used to checkout\ + \ a git repository." + type: string + type: object + CreateMessage_message: + description: A single message + example: + severity: info + media_type: text/plain + content: content + properties: + content: + description: The actual message + type: string + media_type: + description: The media type of the message + enum: + - text/plain + - text/markdown + type: string + severity: + description: The severity of the message + enum: + - info + - warning + - error + type: string + required: + - content + - media_type + - severity + type: object + NewPrototype_activating_user: + description: Repository creating user to whom the rule should apply + example: + name: name + properties: + name: + description: The username for the activating_user + type: string + required: + - name + type: object + NewPrototype_delegate: + description: Information about the user or team to which the rule grants access + example: + kind: user + name: name + properties: + name: + description: The name for the delegate team or user + type: string + kind: + description: Whether the delegate is a user or a team + enum: + - user + - team + type: string + required: + - kind + - name + type: object + securitySchemes: + oauth2_implicit: + flows: + implicit: + authorizationUrl: https://quay.example.com/oauth/authorize + scopes: + repo:read: This application will be able to view and pull all repositories + visible to the granting user or robot account + repo:write: "This application will be able to view, push and pull to all\ + \ repositories to which the granting user or robot account has write\ + \ access" + repo:admin: This application will have administrator access to all repositories + to which the granting user or robot account has access + repo:create: This application will be able to create repositories in to + any namespaces that the granting user or robot account is allowed to + create repositories + user:read: This application will be able to read user information such + as username and email address. + org:admin: "This application will be able to administer your organizations\ + \ including creating robots, creating teams, adjusting team membership,\ + \ and changing billing settings. You should have absolute trust in the\ + \ requesting application before granting this permission." + super:user: "This application will be able to administer your installation\ + \ including managing users, managing organizations and other features\ + \ found in the superuser panel. You should have absolute trust in the\ + \ requesting application before granting this permission." + user:admin: This application will be able to administer your account including + creating robots and granting them permissions to your repositories. + You should have absolute trust in the requesting application before + granting this permission. + type: oauth2 +x-original-swagger-version: "2.0" diff --git a/quay_api/api_appspecifictokens.go b/quay_api/api_appspecifictokens.go new file mode 100644 index 0000000..a9b7b66 --- /dev/null +++ b/quay_api/api_appspecifictokens.go @@ -0,0 +1,582 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// AppspecifictokensAPIService AppspecifictokensAPI service +type AppspecifictokensAPIService service + +type ApiCreateAppTokenRequest struct { + ctx context.Context + ApiService *AppspecifictokensAPIService + body *NewToken +} + +// Request body contents. +func (r ApiCreateAppTokenRequest) Body(body NewToken) ApiCreateAppTokenRequest { + r.body = &body + return r +} + +func (r ApiCreateAppTokenRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateAppTokenExecute(r) +} + +/* +CreateAppToken Method for CreateAppToken + +Create a new app specific token for user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateAppTokenRequest +*/ +func (a *AppspecifictokensAPIService) CreateAppToken(ctx context.Context) ApiCreateAppTokenRequest { + return ApiCreateAppTokenRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *AppspecifictokensAPIService) CreateAppTokenExecute(r ApiCreateAppTokenRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppspecifictokensAPIService.CreateAppToken") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/apptoken" + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetAppTokenRequest struct { + ctx context.Context + ApiService *AppspecifictokensAPIService + tokenUuid string +} + +func (r ApiGetAppTokenRequest) Execute() (*http.Response, error) { + return r.ApiService.GetAppTokenExecute(r) +} + +/* +GetAppToken Method for GetAppToken + +Returns a specific app token for the user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param tokenUuid The uuid of the app specific token + @return ApiGetAppTokenRequest +*/ +func (a *AppspecifictokensAPIService) GetAppToken(ctx context.Context, tokenUuid string) ApiGetAppTokenRequest { + return ApiGetAppTokenRequest{ + ApiService: a, + ctx: ctx, + tokenUuid: tokenUuid, + } +} + +// Execute executes the request +func (a *AppspecifictokensAPIService) GetAppTokenExecute(r ApiGetAppTokenRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppspecifictokensAPIService.GetAppToken") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/apptoken/{token_uuid}" + localVarPath = strings.Replace(localVarPath, "{"+"token_uuid"+"}", url.PathEscape(parameterValueToString(r.tokenUuid, "tokenUuid")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListAppTokensRequest struct { + ctx context.Context + ApiService *AppspecifictokensAPIService + expiring *bool +} + +// If true, only returns those tokens expiring soon +func (r ApiListAppTokensRequest) Expiring(expiring bool) ApiListAppTokensRequest { + r.expiring = &expiring + return r +} + +func (r ApiListAppTokensRequest) Execute() (*http.Response, error) { + return r.ApiService.ListAppTokensExecute(r) +} + +/* +ListAppTokens Method for ListAppTokens + +Lists the app specific tokens for the user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListAppTokensRequest +*/ +func (a *AppspecifictokensAPIService) ListAppTokens(ctx context.Context) ApiListAppTokensRequest { + return ApiListAppTokensRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *AppspecifictokensAPIService) ListAppTokensExecute(r ApiListAppTokensRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppspecifictokensAPIService.ListAppTokens") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/apptoken" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.expiring != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "expiring", r.expiring, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRevokeAppTokenRequest struct { + ctx context.Context + ApiService *AppspecifictokensAPIService + tokenUuid string +} + +func (r ApiRevokeAppTokenRequest) Execute() (*http.Response, error) { + return r.ApiService.RevokeAppTokenExecute(r) +} + +/* +RevokeAppToken Method for RevokeAppToken + +Revokes a specific app token for the user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param tokenUuid The uuid of the app specific token + @return ApiRevokeAppTokenRequest +*/ +func (a *AppspecifictokensAPIService) RevokeAppToken(ctx context.Context, tokenUuid string) ApiRevokeAppTokenRequest { + return ApiRevokeAppTokenRequest{ + ApiService: a, + ctx: ctx, + tokenUuid: tokenUuid, + } +} + +// Execute executes the request +func (a *AppspecifictokensAPIService) RevokeAppTokenExecute(r ApiRevokeAppTokenRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AppspecifictokensAPIService.RevokeAppToken") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/apptoken/{token_uuid}" + localVarPath = strings.Replace(localVarPath, "{"+"token_uuid"+"}", url.PathEscape(parameterValueToString(r.tokenUuid, "tokenUuid")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/api_build.go b/quay_api/api_build.go new file mode 100644 index 0000000..1273b8a --- /dev/null +++ b/quay_api/api_build.go @@ -0,0 +1,888 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// BuildAPIService BuildAPI service +type BuildAPIService service + +type ApiCancelRepoBuildRequest struct { + ctx context.Context + ApiService *BuildAPIService + buildUuid string + repository string +} + +func (r ApiCancelRepoBuildRequest) Execute() (*http.Response, error) { + return r.ApiService.CancelRepoBuildExecute(r) +} + +/* +CancelRepoBuild Method for CancelRepoBuild + +Cancels a repository build. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param buildUuid The UUID of the build + @param repository The full path of the repository. e.g. namespace/name + @return ApiCancelRepoBuildRequest +*/ +func (a *BuildAPIService) CancelRepoBuild(ctx context.Context, buildUuid string, repository string) ApiCancelRepoBuildRequest { + return ApiCancelRepoBuildRequest{ + ApiService: a, + ctx: ctx, + buildUuid: buildUuid, + repository: repository, + } +} + +// Execute executes the request +func (a *BuildAPIService) CancelRepoBuildExecute(r ApiCancelRepoBuildRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BuildAPIService.CancelRepoBuild") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/build/{build_uuid}" + localVarPath = strings.Replace(localVarPath, "{"+"build_uuid"+"}", url.PathEscape(parameterValueToString(r.buildUuid, "buildUuid")), -1) + 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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetRepoBuildRequest struct { + ctx context.Context + ApiService *BuildAPIService + buildUuid string + repository string +} + +func (r ApiGetRepoBuildRequest) Execute() (*http.Response, error) { + return r.ApiService.GetRepoBuildExecute(r) +} + +/* +GetRepoBuild Method for GetRepoBuild + +Returns information about a build. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param buildUuid The UUID of the build + @param repository The full path of the repository. e.g. namespace/name + @return ApiGetRepoBuildRequest +*/ +func (a *BuildAPIService) GetRepoBuild(ctx context.Context, buildUuid string, repository string) ApiGetRepoBuildRequest { + return ApiGetRepoBuildRequest{ + ApiService: a, + ctx: ctx, + buildUuid: buildUuid, + repository: repository, + } +} + +// Execute executes the request +func (a *BuildAPIService) GetRepoBuildExecute(r ApiGetRepoBuildRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BuildAPIService.GetRepoBuild") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/build/{build_uuid}" + localVarPath = strings.Replace(localVarPath, "{"+"build_uuid"+"}", url.PathEscape(parameterValueToString(r.buildUuid, "buildUuid")), -1) + 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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetRepoBuildLogsRequest struct { + ctx context.Context + ApiService *BuildAPIService + buildUuid string + repository string +} + +func (r ApiGetRepoBuildLogsRequest) Execute() (*http.Response, error) { + return r.ApiService.GetRepoBuildLogsExecute(r) +} + +/* +GetRepoBuildLogs Method for GetRepoBuildLogs + +Return the build logs for the build specified by the build uuid. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param buildUuid The UUID of the build + @param repository The full path of the repository. e.g. namespace/name + @return ApiGetRepoBuildLogsRequest +*/ +func (a *BuildAPIService) GetRepoBuildLogs(ctx context.Context, buildUuid string, repository string) ApiGetRepoBuildLogsRequest { + return ApiGetRepoBuildLogsRequest{ + ApiService: a, + ctx: ctx, + buildUuid: buildUuid, + repository: repository, + } +} + +// Execute executes the request +func (a *BuildAPIService) GetRepoBuildLogsExecute(r ApiGetRepoBuildLogsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BuildAPIService.GetRepoBuildLogs") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/build/{build_uuid}/logs" + localVarPath = strings.Replace(localVarPath, "{"+"build_uuid"+"}", url.PathEscape(parameterValueToString(r.buildUuid, "buildUuid")), -1) + 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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetRepoBuildStatusRequest struct { + ctx context.Context + ApiService *BuildAPIService + buildUuid string + repository string +} + +func (r ApiGetRepoBuildStatusRequest) Execute() (*http.Response, error) { + return r.ApiService.GetRepoBuildStatusExecute(r) +} + +/* +GetRepoBuildStatus Method for GetRepoBuildStatus + +Return the status for the builds specified by the build uuids. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param buildUuid The UUID of the build + @param repository The full path of the repository. e.g. namespace/name + @return ApiGetRepoBuildStatusRequest +*/ +func (a *BuildAPIService) GetRepoBuildStatus(ctx context.Context, buildUuid string, repository string) ApiGetRepoBuildStatusRequest { + return ApiGetRepoBuildStatusRequest{ + ApiService: a, + ctx: ctx, + buildUuid: buildUuid, + repository: repository, + } +} + +// Execute executes the request +func (a *BuildAPIService) GetRepoBuildStatusExecute(r ApiGetRepoBuildStatusRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BuildAPIService.GetRepoBuildStatus") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/build/{build_uuid}/status" + localVarPath = strings.Replace(localVarPath, "{"+"build_uuid"+"}", url.PathEscape(parameterValueToString(r.buildUuid, "buildUuid")), -1) + 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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetRepoBuildsRequest struct { + ctx context.Context + ApiService *BuildAPIService + repository string + since *int32 + limit *int32 +} + +// Returns all builds since the given unix timecode +func (r ApiGetRepoBuildsRequest) Since(since int32) ApiGetRepoBuildsRequest { + r.since = &since + return r +} + +// The maximum number of builds to return +func (r ApiGetRepoBuildsRequest) Limit(limit int32) ApiGetRepoBuildsRequest { + r.limit = &limit + return r +} + +func (r ApiGetRepoBuildsRequest) Execute() (*http.Response, error) { + return r.ApiService.GetRepoBuildsExecute(r) +} + +/* +GetRepoBuilds Method for GetRepoBuilds + +Get the list of repository builds. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @return ApiGetRepoBuildsRequest +*/ +func (a *BuildAPIService) GetRepoBuilds(ctx context.Context, repository string) ApiGetRepoBuildsRequest { + return ApiGetRepoBuildsRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +func (a *BuildAPIService) GetRepoBuildsExecute(r ApiGetRepoBuildsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BuildAPIService.GetRepoBuilds") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/build/" + 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.since != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRequestRepoBuildRequest struct { + ctx context.Context + ApiService *BuildAPIService + repository string + body *RepositoryBuildRequest +} + +// Request body contents. +func (r ApiRequestRepoBuildRequest) Body(body RepositoryBuildRequest) ApiRequestRepoBuildRequest { + r.body = &body + return r +} + +func (r ApiRequestRepoBuildRequest) Execute() (*http.Response, error) { + return r.ApiService.RequestRepoBuildExecute(r) +} + +/* +RequestRepoBuild Method for RequestRepoBuild + +Request that a repository be built and pushed from the specified input. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @return ApiRequestRepoBuildRequest +*/ +func (a *BuildAPIService) RequestRepoBuild(ctx context.Context, repository string) ApiRequestRepoBuildRequest { + return ApiRequestRepoBuildRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +func (a *BuildAPIService) RequestRepoBuildExecute(r ApiRequestRepoBuildRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BuildAPIService.RequestRepoBuild") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/build/" + 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.body == nil { + return nil, reportError("body is required and must be specified") + } + + // 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 + } + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/api_discovery.go b/quay_api/api_discovery.go new file mode 100644 index 0000000..5c6a426 --- /dev/null +++ b/quay_api/api_discovery.go @@ -0,0 +1,165 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + +// DiscoveryAPIService DiscoveryAPI service +type DiscoveryAPIService service + +type ApiDiscoveryRequest struct { + ctx context.Context + ApiService *DiscoveryAPIService + internal *bool +} + +// Whether to include internal APIs. +func (r ApiDiscoveryRequest) Internal(internal bool) ApiDiscoveryRequest { + r.internal = &internal + return r +} + +func (r ApiDiscoveryRequest) Execute() (*http.Response, error) { + return r.ApiService.DiscoveryExecute(r) +} + +/* +Discovery Method for Discovery + +List all of the API endpoints available in the swagger API format. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiDiscoveryRequest +*/ +func (a *DiscoveryAPIService) Discovery(ctx context.Context) ApiDiscoveryRequest { + return ApiDiscoveryRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *DiscoveryAPIService) DiscoveryExecute(r ApiDiscoveryRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DiscoveryAPIService.Discovery") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/discovery" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.internal != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "internal", r.internal, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/api_error.go b/quay_api/api_error.go new file mode 100644 index 0000000..51a7e9e --- /dev/null +++ b/quay_api/api_error.go @@ -0,0 +1,172 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// ErrorAPIService ErrorAPI service +type ErrorAPIService service + +type ApiGetErrorDescriptionRequest struct { + ctx context.Context + ApiService *ErrorAPIService + errorType string +} + +func (r ApiGetErrorDescriptionRequest) Execute() (*ApiErrorDescription, *http.Response, error) { + return r.ApiService.GetErrorDescriptionExecute(r) +} + +/* +GetErrorDescription Method for GetErrorDescription + +Get a detailed description of the error. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param errorType The error code identifying the type of error. + @return ApiGetErrorDescriptionRequest +*/ +func (a *ErrorAPIService) GetErrorDescription(ctx context.Context, errorType string) ApiGetErrorDescriptionRequest { + return ApiGetErrorDescriptionRequest{ + ApiService: a, + ctx: ctx, + errorType: errorType, + } +} + +// Execute executes the request +// +// @return ApiErrorDescription +func (a *ErrorAPIService) GetErrorDescriptionExecute(r ApiGetErrorDescriptionRequest) (*ApiErrorDescription, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ApiErrorDescription + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ErrorAPIService.GetErrorDescription") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/error/{error_type}" + localVarPath = strings.Replace(localVarPath, "{"+"error_type"+"}", url.PathEscape(parameterValueToString(r.errorType, "errorType")), -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{"*/*"} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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 + } + 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/quay_api/api_globalmessages.go b/quay_api/api_globalmessages.go new file mode 100644 index 0000000..8a4a546 --- /dev/null +++ b/quay_api/api_globalmessages.go @@ -0,0 +1,436 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// GlobalmessagesAPIService GlobalmessagesAPI service +type GlobalmessagesAPIService service + +type ApiCreateGlobalMessageRequest struct { + ctx context.Context + ApiService *GlobalmessagesAPIService + body *CreateMessage +} + +// Request body contents. +func (r ApiCreateGlobalMessageRequest) Body(body CreateMessage) ApiCreateGlobalMessageRequest { + r.body = &body + return r +} + +func (r ApiCreateGlobalMessageRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateGlobalMessageExecute(r) +} + +/* +CreateGlobalMessage Method for CreateGlobalMessage + +Create a message. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateGlobalMessageRequest +*/ +func (a *GlobalmessagesAPIService) CreateGlobalMessage(ctx context.Context) ApiCreateGlobalMessageRequest { + return ApiCreateGlobalMessageRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *GlobalmessagesAPIService) CreateGlobalMessageExecute(r ApiCreateGlobalMessageRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GlobalmessagesAPIService.CreateGlobalMessage") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/messages" + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteGlobalMessageRequest struct { + ctx context.Context + ApiService *GlobalmessagesAPIService + uuid string +} + +func (r ApiDeleteGlobalMessageRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteGlobalMessageExecute(r) +} + +/* +DeleteGlobalMessage Method for DeleteGlobalMessage + +Delete a message. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param uuid + @return ApiDeleteGlobalMessageRequest +*/ +func (a *GlobalmessagesAPIService) DeleteGlobalMessage(ctx context.Context, uuid string) ApiDeleteGlobalMessageRequest { + return ApiDeleteGlobalMessageRequest{ + ApiService: a, + ctx: ctx, + uuid: uuid, + } +} + +// Execute executes the request +func (a *GlobalmessagesAPIService) DeleteGlobalMessageExecute(r ApiDeleteGlobalMessageRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GlobalmessagesAPIService.DeleteGlobalMessage") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/message/{uuid}" + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetGlobalMessagesRequest struct { + ctx context.Context + ApiService *GlobalmessagesAPIService +} + +func (r ApiGetGlobalMessagesRequest) Execute() (*http.Response, error) { + return r.ApiService.GetGlobalMessagesExecute(r) +} + +/* +GetGlobalMessages Method for GetGlobalMessages + +Return a super users messages. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetGlobalMessagesRequest +*/ +func (a *GlobalmessagesAPIService) GetGlobalMessages(ctx context.Context) ApiGetGlobalMessagesRequest { + return ApiGetGlobalMessagesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *GlobalmessagesAPIService) GetGlobalMessagesExecute(r ApiGetGlobalMessagesRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GlobalmessagesAPIService.GetGlobalMessages") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/messages" + + 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/api_logs.go b/quay_api/api_logs.go new file mode 100644 index 0000000..27bdfe3 --- /dev/null +++ b/quay_api/api_logs.go @@ -0,0 +1,1522 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// LogsAPIService LogsAPI service +type LogsAPIService service + +type ApiExportOrgLogsRequest struct { + ctx context.Context + ApiService *LogsAPIService + orgname string + body *ExportLogs + endtime *string + starttime *string +} + +// Request body contents. +func (r ApiExportOrgLogsRequest) Body(body ExportLogs) ApiExportOrgLogsRequest { + r.body = &body + return r +} + +// Latest time for logs. Format: \"%m/%d/%Y\" in UTC. +func (r ApiExportOrgLogsRequest) Endtime(endtime string) ApiExportOrgLogsRequest { + r.endtime = &endtime + return r +} + +// Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. +func (r ApiExportOrgLogsRequest) Starttime(starttime string) ApiExportOrgLogsRequest { + r.starttime = &starttime + return r +} + +func (r ApiExportOrgLogsRequest) Execute() (*http.Response, error) { + return r.ApiService.ExportOrgLogsExecute(r) +} + +/* +ExportOrgLogs Method for ExportOrgLogs + +Exports the logs for the specified organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @return ApiExportOrgLogsRequest +*/ +func (a *LogsAPIService) ExportOrgLogs(ctx context.Context, orgname string) ApiExportOrgLogsRequest { + return ApiExportOrgLogsRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + } +} + +// Execute executes the request +func (a *LogsAPIService) ExportOrgLogsExecute(r ApiExportOrgLogsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogsAPIService.ExportOrgLogs") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/exportlogs" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + + 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") + } + + if r.endtime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "endtime", r.endtime, "") + } + if r.starttime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "starttime", r.starttime, "") + } + // 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 + } + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiExportRepoLogsRequest struct { + ctx context.Context + ApiService *LogsAPIService + repository string + body *ExportLogs + endtime *string + starttime *string +} + +// Request body contents. +func (r ApiExportRepoLogsRequest) Body(body ExportLogs) ApiExportRepoLogsRequest { + r.body = &body + return r +} + +// Latest time for logs. Format: \"%m/%d/%Y\" in UTC. +func (r ApiExportRepoLogsRequest) Endtime(endtime string) ApiExportRepoLogsRequest { + r.endtime = &endtime + return r +} + +// Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. +func (r ApiExportRepoLogsRequest) Starttime(starttime string) ApiExportRepoLogsRequest { + r.starttime = &starttime + return r +} + +func (r ApiExportRepoLogsRequest) Execute() (*http.Response, error) { + return r.ApiService.ExportRepoLogsExecute(r) +} + +/* +ExportRepoLogs Method for ExportRepoLogs + +Queues an export of the logs for the specified repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @return ApiExportRepoLogsRequest +*/ +func (a *LogsAPIService) ExportRepoLogs(ctx context.Context, repository string) ApiExportRepoLogsRequest { + return ApiExportRepoLogsRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +func (a *LogsAPIService) ExportRepoLogsExecute(r ApiExportRepoLogsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogsAPIService.ExportRepoLogs") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/exportlogs" + 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.body == nil { + return nil, reportError("body is required and must be specified") + } + + if r.endtime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "endtime", r.endtime, "") + } + if r.starttime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "starttime", r.starttime, "") + } + // 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 + } + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiExportUserLogsRequest struct { + ctx context.Context + ApiService *LogsAPIService + body *ExportLogs + endtime *string + starttime *string +} + +// Request body contents. +func (r ApiExportUserLogsRequest) Body(body ExportLogs) ApiExportUserLogsRequest { + r.body = &body + return r +} + +// Latest time for logs. Format: \"%m/%d/%Y\" in UTC. +func (r ApiExportUserLogsRequest) Endtime(endtime string) ApiExportUserLogsRequest { + r.endtime = &endtime + return r +} + +// Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. +func (r ApiExportUserLogsRequest) Starttime(starttime string) ApiExportUserLogsRequest { + r.starttime = &starttime + return r +} + +func (r ApiExportUserLogsRequest) Execute() (*http.Response, error) { + return r.ApiService.ExportUserLogsExecute(r) +} + +/* +ExportUserLogs Method for ExportUserLogs + +Returns the aggregated logs for the current user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiExportUserLogsRequest +*/ +func (a *LogsAPIService) ExportUserLogs(ctx context.Context) ApiExportUserLogsRequest { + return ApiExportUserLogsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *LogsAPIService) ExportUserLogsExecute(r ApiExportUserLogsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogsAPIService.ExportUserLogs") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/exportlogs" + + 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") + } + + if r.endtime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "endtime", r.endtime, "") + } + if r.starttime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "starttime", r.starttime, "") + } + // 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 + } + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetAggregateOrgLogsRequest struct { + ctx context.Context + ApiService *LogsAPIService + orgname string + performer *string + endtime *string + starttime *string +} + +// Username for which to filter logs. +func (r ApiGetAggregateOrgLogsRequest) Performer(performer string) ApiGetAggregateOrgLogsRequest { + r.performer = &performer + return r +} + +// Latest time for logs. Format: \"%m/%d/%Y\" in UTC. +func (r ApiGetAggregateOrgLogsRequest) Endtime(endtime string) ApiGetAggregateOrgLogsRequest { + r.endtime = &endtime + return r +} + +// Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. +func (r ApiGetAggregateOrgLogsRequest) Starttime(starttime string) ApiGetAggregateOrgLogsRequest { + r.starttime = &starttime + return r +} + +func (r ApiGetAggregateOrgLogsRequest) Execute() (*http.Response, error) { + return r.ApiService.GetAggregateOrgLogsExecute(r) +} + +/* +GetAggregateOrgLogs Method for GetAggregateOrgLogs + +Gets the aggregated logs for the specified organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @return ApiGetAggregateOrgLogsRequest +*/ +func (a *LogsAPIService) GetAggregateOrgLogs(ctx context.Context, orgname string) ApiGetAggregateOrgLogsRequest { + return ApiGetAggregateOrgLogsRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + } +} + +// Execute executes the request +func (a *LogsAPIService) GetAggregateOrgLogsExecute(r ApiGetAggregateOrgLogsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogsAPIService.GetAggregateOrgLogs") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/aggregatelogs" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.performer != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "performer", r.performer, "") + } + if r.endtime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "endtime", r.endtime, "") + } + if r.starttime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "starttime", r.starttime, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetAggregateRepoLogsRequest struct { + ctx context.Context + ApiService *LogsAPIService + repository string + endtime *string + starttime *string +} + +// Latest time for logs. Format: \"%m/%d/%Y\" in UTC. +func (r ApiGetAggregateRepoLogsRequest) Endtime(endtime string) ApiGetAggregateRepoLogsRequest { + r.endtime = &endtime + return r +} + +// Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. +func (r ApiGetAggregateRepoLogsRequest) Starttime(starttime string) ApiGetAggregateRepoLogsRequest { + r.starttime = &starttime + return r +} + +func (r ApiGetAggregateRepoLogsRequest) Execute() (*http.Response, error) { + return r.ApiService.GetAggregateRepoLogsExecute(r) +} + +/* +GetAggregateRepoLogs Method for GetAggregateRepoLogs + +Returns the aggregated logs for the specified repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @return ApiGetAggregateRepoLogsRequest +*/ +func (a *LogsAPIService) GetAggregateRepoLogs(ctx context.Context, repository string) ApiGetAggregateRepoLogsRequest { + return ApiGetAggregateRepoLogsRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +func (a *LogsAPIService) GetAggregateRepoLogsExecute(r ApiGetAggregateRepoLogsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogsAPIService.GetAggregateRepoLogs") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/aggregatelogs" + 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.endtime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "endtime", r.endtime, "") + } + if r.starttime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "starttime", r.starttime, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetAggregateUserLogsRequest struct { + ctx context.Context + ApiService *LogsAPIService + performer *string + endtime *string + starttime *string +} + +// Username for which to filter logs. +func (r ApiGetAggregateUserLogsRequest) Performer(performer string) ApiGetAggregateUserLogsRequest { + r.performer = &performer + return r +} + +// Latest time for logs. Format: \"%m/%d/%Y\" in UTC. +func (r ApiGetAggregateUserLogsRequest) Endtime(endtime string) ApiGetAggregateUserLogsRequest { + r.endtime = &endtime + return r +} + +// Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. +func (r ApiGetAggregateUserLogsRequest) Starttime(starttime string) ApiGetAggregateUserLogsRequest { + r.starttime = &starttime + return r +} + +func (r ApiGetAggregateUserLogsRequest) Execute() (*http.Response, error) { + return r.ApiService.GetAggregateUserLogsExecute(r) +} + +/* +GetAggregateUserLogs Method for GetAggregateUserLogs + +Returns the aggregated logs for the current user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAggregateUserLogsRequest +*/ +func (a *LogsAPIService) GetAggregateUserLogs(ctx context.Context) ApiGetAggregateUserLogsRequest { + return ApiGetAggregateUserLogsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *LogsAPIService) GetAggregateUserLogsExecute(r ApiGetAggregateUserLogsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogsAPIService.GetAggregateUserLogs") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/aggregatelogs" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.performer != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "performer", r.performer, "") + } + if r.endtime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "endtime", r.endtime, "") + } + if r.starttime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "starttime", r.starttime, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListOrgLogsRequest struct { + ctx context.Context + ApiService *LogsAPIService + orgname string + nextPage *string + performer *string + endtime *string + starttime *string +} + +// The page token for the next page +func (r ApiListOrgLogsRequest) NextPage(nextPage string) ApiListOrgLogsRequest { + r.nextPage = &nextPage + return r +} + +// Username for which to filter logs. +func (r ApiListOrgLogsRequest) Performer(performer string) ApiListOrgLogsRequest { + r.performer = &performer + return r +} + +// Latest time for logs. Format: \"%m/%d/%Y\" in UTC. +func (r ApiListOrgLogsRequest) Endtime(endtime string) ApiListOrgLogsRequest { + r.endtime = &endtime + return r +} + +// Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. +func (r ApiListOrgLogsRequest) Starttime(starttime string) ApiListOrgLogsRequest { + r.starttime = &starttime + return r +} + +func (r ApiListOrgLogsRequest) Execute() (*http.Response, error) { + return r.ApiService.ListOrgLogsExecute(r) +} + +/* +ListOrgLogs Method for ListOrgLogs + +List the logs for the specified organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @return ApiListOrgLogsRequest +*/ +func (a *LogsAPIService) ListOrgLogs(ctx context.Context, orgname string) ApiListOrgLogsRequest { + return ApiListOrgLogsRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + } +} + +// Execute executes the request +func (a *LogsAPIService) ListOrgLogsExecute(r ApiListOrgLogsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogsAPIService.ListOrgLogs") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/logs" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.nextPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "next_page", r.nextPage, "") + } + if r.performer != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "performer", r.performer, "") + } + if r.endtime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "endtime", r.endtime, "") + } + if r.starttime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "starttime", r.starttime, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListRepoLogsRequest struct { + ctx context.Context + ApiService *LogsAPIService + repository string + nextPage *string + endtime *string + starttime *string +} + +// The page token for the next page +func (r ApiListRepoLogsRequest) NextPage(nextPage string) ApiListRepoLogsRequest { + r.nextPage = &nextPage + return r +} + +// Latest time for logs. Format: \"%m/%d/%Y\" in UTC. +func (r ApiListRepoLogsRequest) Endtime(endtime string) ApiListRepoLogsRequest { + r.endtime = &endtime + return r +} + +// Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. +func (r ApiListRepoLogsRequest) Starttime(starttime string) ApiListRepoLogsRequest { + r.starttime = &starttime + return r +} + +func (r ApiListRepoLogsRequest) Execute() (*http.Response, error) { + return r.ApiService.ListRepoLogsExecute(r) +} + +/* +ListRepoLogs Method for ListRepoLogs + +List the logs for the specified repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @return ApiListRepoLogsRequest +*/ +func (a *LogsAPIService) ListRepoLogs(ctx context.Context, repository string) ApiListRepoLogsRequest { + return ApiListRepoLogsRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +func (a *LogsAPIService) ListRepoLogsExecute(r ApiListRepoLogsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogsAPIService.ListRepoLogs") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/logs" + 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.nextPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "next_page", r.nextPage, "") + } + if r.endtime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "endtime", r.endtime, "") + } + if r.starttime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "starttime", r.starttime, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListUserLogsRequest struct { + ctx context.Context + ApiService *LogsAPIService + nextPage *string + performer *string + endtime *string + starttime *string +} + +// The page token for the next page +func (r ApiListUserLogsRequest) NextPage(nextPage string) ApiListUserLogsRequest { + r.nextPage = &nextPage + return r +} + +// Username for which to filter logs. +func (r ApiListUserLogsRequest) Performer(performer string) ApiListUserLogsRequest { + r.performer = &performer + return r +} + +// Latest time for logs. Format: \"%m/%d/%Y\" in UTC. +func (r ApiListUserLogsRequest) Endtime(endtime string) ApiListUserLogsRequest { + r.endtime = &endtime + return r +} + +// Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. +func (r ApiListUserLogsRequest) Starttime(starttime string) ApiListUserLogsRequest { + r.starttime = &starttime + return r +} + +func (r ApiListUserLogsRequest) Execute() (*http.Response, error) { + return r.ApiService.ListUserLogsExecute(r) +} + +/* +ListUserLogs Method for ListUserLogs + +List the logs for the current user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListUserLogsRequest +*/ +func (a *LogsAPIService) ListUserLogs(ctx context.Context) ApiListUserLogsRequest { + return ApiListUserLogsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *LogsAPIService) ListUserLogsExecute(r ApiListUserLogsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogsAPIService.ListUserLogs") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/logs" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.nextPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "next_page", r.nextPage, "") + } + if r.performer != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "performer", r.performer, "") + } + if r.endtime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "endtime", r.endtime, "") + } + if r.starttime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "starttime", r.starttime, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/api_manifest.go b/quay_api/api_manifest.go new file mode 100644 index 0000000..bd04293 --- /dev/null +++ b/quay_api/api_manifest.go @@ -0,0 +1,750 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// ManifestAPIService ManifestAPI service +type ManifestAPIService service + +type ApiAddManifestLabelRequest struct { + ctx context.Context + ApiService *ManifestAPIService + manifestref string + repository string + body *AddLabel +} + +// Request body contents. +func (r ApiAddManifestLabelRequest) Body(body AddLabel) ApiAddManifestLabelRequest { + r.body = &body + return r +} + +func (r ApiAddManifestLabelRequest) Execute() (*http.Response, error) { + return r.ApiService.AddManifestLabelExecute(r) +} + +/* +AddManifestLabel Method for AddManifestLabel + +Adds a new label into the tag manifest. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param manifestref The digest of the manifest + @param repository The full path of the repository. e.g. namespace/name + @return ApiAddManifestLabelRequest +*/ +func (a *ManifestAPIService) AddManifestLabel(ctx context.Context, manifestref string, repository string) ApiAddManifestLabelRequest { + return ApiAddManifestLabelRequest{ + ApiService: a, + ctx: ctx, + manifestref: manifestref, + repository: repository, + } +} + +// Execute executes the request +func (a *ManifestAPIService) AddManifestLabelExecute(r ApiAddManifestLabelRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ManifestAPIService.AddManifestLabel") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/manifest/{manifestref}/labels" + localVarPath = strings.Replace(localVarPath, "{"+"manifestref"+"}", url.PathEscape(parameterValueToString(r.manifestref, "manifestref")), -1) + 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.body == nil { + return nil, reportError("body is required and must be specified") + } + + // 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 + } + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteManifestLabelRequest struct { + ctx context.Context + ApiService *ManifestAPIService + manifestref string + repository string + labelid string +} + +func (r ApiDeleteManifestLabelRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteManifestLabelExecute(r) +} + +/* +DeleteManifestLabel Method for DeleteManifestLabel + +Deletes an existing label from a manifest. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param manifestref The digest of the manifest + @param repository The full path of the repository. e.g. namespace/name + @param labelid The ID of the label + @return ApiDeleteManifestLabelRequest +*/ +func (a *ManifestAPIService) DeleteManifestLabel(ctx context.Context, manifestref string, repository string, labelid string) ApiDeleteManifestLabelRequest { + return ApiDeleteManifestLabelRequest{ + ApiService: a, + ctx: ctx, + manifestref: manifestref, + repository: repository, + labelid: labelid, + } +} + +// Execute executes the request +func (a *ManifestAPIService) DeleteManifestLabelExecute(r ApiDeleteManifestLabelRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ManifestAPIService.DeleteManifestLabel") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/manifest/{manifestref}/labels/{labelid}" + localVarPath = strings.Replace(localVarPath, "{"+"manifestref"+"}", url.PathEscape(parameterValueToString(r.manifestref, "manifestref")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"labelid"+"}", url.PathEscape(parameterValueToString(r.labelid, "labelid")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetManifestLabelRequest struct { + ctx context.Context + ApiService *ManifestAPIService + manifestref string + repository string + labelid string +} + +func (r ApiGetManifestLabelRequest) Execute() (*http.Response, error) { + return r.ApiService.GetManifestLabelExecute(r) +} + +/* +GetManifestLabel Method for GetManifestLabel + +Retrieves the label with the specific ID under the manifest. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param manifestref The digest of the manifest + @param repository The full path of the repository. e.g. namespace/name + @param labelid The ID of the label + @return ApiGetManifestLabelRequest +*/ +func (a *ManifestAPIService) GetManifestLabel(ctx context.Context, manifestref string, repository string, labelid string) ApiGetManifestLabelRequest { + return ApiGetManifestLabelRequest{ + ApiService: a, + ctx: ctx, + manifestref: manifestref, + repository: repository, + labelid: labelid, + } +} + +// Execute executes the request +func (a *ManifestAPIService) GetManifestLabelExecute(r ApiGetManifestLabelRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ManifestAPIService.GetManifestLabel") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/manifest/{manifestref}/labels/{labelid}" + localVarPath = strings.Replace(localVarPath, "{"+"manifestref"+"}", url.PathEscape(parameterValueToString(r.manifestref, "manifestref")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"labelid"+"}", url.PathEscape(parameterValueToString(r.labelid, "labelid")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetRepoManifestRequest struct { + ctx context.Context + ApiService *ManifestAPIService + manifestref string + repository string +} + +func (r ApiGetRepoManifestRequest) Execute() (*http.Response, error) { + return r.ApiService.GetRepoManifestExecute(r) +} + +/* +GetRepoManifest Method for GetRepoManifest + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param manifestref The digest of the manifest + @param repository The full path of the repository. e.g. namespace/name + @return ApiGetRepoManifestRequest +*/ +func (a *ManifestAPIService) GetRepoManifest(ctx context.Context, manifestref string, repository string) ApiGetRepoManifestRequest { + return ApiGetRepoManifestRequest{ + ApiService: a, + ctx: ctx, + manifestref: manifestref, + repository: repository, + } +} + +// Execute executes the request +func (a *ManifestAPIService) GetRepoManifestExecute(r ApiGetRepoManifestRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ManifestAPIService.GetRepoManifest") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/manifest/{manifestref}" + localVarPath = strings.Replace(localVarPath, "{"+"manifestref"+"}", url.PathEscape(parameterValueToString(r.manifestref, "manifestref")), -1) + 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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListManifestLabelsRequest struct { + ctx context.Context + ApiService *ManifestAPIService + manifestref string + repository string + filter *string +} + +// If specified, only labels matching the given prefix will be returned +func (r ApiListManifestLabelsRequest) Filter(filter string) ApiListManifestLabelsRequest { + r.filter = &filter + return r +} + +func (r ApiListManifestLabelsRequest) Execute() (*http.Response, error) { + return r.ApiService.ListManifestLabelsExecute(r) +} + +/* +ListManifestLabels Method for ListManifestLabels + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param manifestref The digest of the manifest + @param repository The full path of the repository. e.g. namespace/name + @return ApiListManifestLabelsRequest +*/ +func (a *ManifestAPIService) ListManifestLabels(ctx context.Context, manifestref string, repository string) ApiListManifestLabelsRequest { + return ApiListManifestLabelsRequest{ + ApiService: a, + ctx: ctx, + manifestref: manifestref, + repository: repository, + } +} + +// Execute executes the request +func (a *ManifestAPIService) ListManifestLabelsExecute(r ApiListManifestLabelsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ManifestAPIService.ListManifestLabels") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/manifest/{manifestref}/labels" + localVarPath = strings.Replace(localVarPath, "{"+"manifestref"+"}", url.PathEscape(parameterValueToString(r.manifestref, "manifestref")), -1) + 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.filter != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filter", r.filter, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/api_namespacequota.go b/quay_api/api_namespacequota.go new file mode 100644 index 0000000..43ea056 --- /dev/null +++ b/quay_api/api_namespacequota.go @@ -0,0 +1,1994 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// NamespacequotaAPIService NamespacequotaAPI service +type NamespacequotaAPIService service + +type ApiChangeOrganizationQuotaRequest struct { + ctx context.Context + ApiService *NamespacequotaAPIService + orgname string + quotaId string + body *UpdateOrgQuota +} + +// Request body contents. +func (r ApiChangeOrganizationQuotaRequest) Body(body UpdateOrgQuota) ApiChangeOrganizationQuotaRequest { + r.body = &body + return r +} + +func (r ApiChangeOrganizationQuotaRequest) Execute() (*http.Response, error) { + return r.ApiService.ChangeOrganizationQuotaExecute(r) +} + +/* +ChangeOrganizationQuota Method for ChangeOrganizationQuota + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname + @param quotaId + @return ApiChangeOrganizationQuotaRequest +*/ +func (a *NamespacequotaAPIService) ChangeOrganizationQuota(ctx context.Context, orgname string, quotaId string) ApiChangeOrganizationQuotaRequest { + return ApiChangeOrganizationQuotaRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + quotaId: quotaId, + } +} + +// Execute executes the request +func (a *NamespacequotaAPIService) ChangeOrganizationQuotaExecute(r ApiChangeOrganizationQuotaRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NamespacequotaAPIService.ChangeOrganizationQuota") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/quota/{quota_id}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"quota_id"+"}", url.PathEscape(parameterValueToString(r.quotaId, "quotaId")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiChangeOrganizationQuotaLimitRequest struct { + ctx context.Context + ApiService *NamespacequotaAPIService + orgname string + limitId string + quotaId string + body *UpdateOrgQuotaLimit +} + +// Request body contents. +func (r ApiChangeOrganizationQuotaLimitRequest) Body(body UpdateOrgQuotaLimit) ApiChangeOrganizationQuotaLimitRequest { + r.body = &body + return r +} + +func (r ApiChangeOrganizationQuotaLimitRequest) Execute() (*http.Response, error) { + return r.ApiService.ChangeOrganizationQuotaLimitExecute(r) +} + +/* +ChangeOrganizationQuotaLimit Method for ChangeOrganizationQuotaLimit + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname + @param limitId + @param quotaId + @return ApiChangeOrganizationQuotaLimitRequest +*/ +func (a *NamespacequotaAPIService) ChangeOrganizationQuotaLimit(ctx context.Context, orgname string, limitId string, quotaId string) ApiChangeOrganizationQuotaLimitRequest { + return ApiChangeOrganizationQuotaLimitRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + limitId: limitId, + quotaId: quotaId, + } +} + +// Execute executes the request +func (a *NamespacequotaAPIService) ChangeOrganizationQuotaLimitExecute(r ApiChangeOrganizationQuotaLimitRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NamespacequotaAPIService.ChangeOrganizationQuotaLimit") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/quota/{quota_id}/limit/{limit_id}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"limit_id"+"}", url.PathEscape(parameterValueToString(r.limitId, "limitId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"quota_id"+"}", url.PathEscape(parameterValueToString(r.quotaId, "quotaId")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiCreateOrganizationQuotaRequest struct { + ctx context.Context + ApiService *NamespacequotaAPIService + orgname string + body *NewOrgQuota +} + +// Request body contents. +func (r ApiCreateOrganizationQuotaRequest) Body(body NewOrgQuota) ApiCreateOrganizationQuotaRequest { + r.body = &body + return r +} + +func (r ApiCreateOrganizationQuotaRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateOrganizationQuotaExecute(r) +} + +/* +CreateOrganizationQuota Method for CreateOrganizationQuota + +Create a new organization quota. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname + @return ApiCreateOrganizationQuotaRequest +*/ +func (a *NamespacequotaAPIService) CreateOrganizationQuota(ctx context.Context, orgname string) ApiCreateOrganizationQuotaRequest { + return ApiCreateOrganizationQuotaRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + } +} + +// Execute executes the request +func (a *NamespacequotaAPIService) CreateOrganizationQuotaExecute(r ApiCreateOrganizationQuotaRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NamespacequotaAPIService.CreateOrganizationQuota") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/quota" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiCreateOrganizationQuotaLimitRequest struct { + ctx context.Context + ApiService *NamespacequotaAPIService + orgname string + quotaId string + body *NewOrgQuotaLimit +} + +// Request body contents. +func (r ApiCreateOrganizationQuotaLimitRequest) Body(body NewOrgQuotaLimit) ApiCreateOrganizationQuotaLimitRequest { + r.body = &body + return r +} + +func (r ApiCreateOrganizationQuotaLimitRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateOrganizationQuotaLimitExecute(r) +} + +/* +CreateOrganizationQuotaLimit Method for CreateOrganizationQuotaLimit + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname + @param quotaId + @return ApiCreateOrganizationQuotaLimitRequest +*/ +func (a *NamespacequotaAPIService) CreateOrganizationQuotaLimit(ctx context.Context, orgname string, quotaId string) ApiCreateOrganizationQuotaLimitRequest { + return ApiCreateOrganizationQuotaLimitRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + quotaId: quotaId, + } +} + +// Execute executes the request +func (a *NamespacequotaAPIService) CreateOrganizationQuotaLimitExecute(r ApiCreateOrganizationQuotaLimitRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NamespacequotaAPIService.CreateOrganizationQuotaLimit") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/quota/{quota_id}/limit" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"quota_id"+"}", url.PathEscape(parameterValueToString(r.quotaId, "quotaId")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteOrganizationQuotaRequest struct { + ctx context.Context + ApiService *NamespacequotaAPIService + orgname string + quotaId string +} + +func (r ApiDeleteOrganizationQuotaRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteOrganizationQuotaExecute(r) +} + +/* +DeleteOrganizationQuota Method for DeleteOrganizationQuota + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname + @param quotaId + @return ApiDeleteOrganizationQuotaRequest +*/ +func (a *NamespacequotaAPIService) DeleteOrganizationQuota(ctx context.Context, orgname string, quotaId string) ApiDeleteOrganizationQuotaRequest { + return ApiDeleteOrganizationQuotaRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + quotaId: quotaId, + } +} + +// Execute executes the request +func (a *NamespacequotaAPIService) DeleteOrganizationQuotaExecute(r ApiDeleteOrganizationQuotaRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NamespacequotaAPIService.DeleteOrganizationQuota") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/quota/{quota_id}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"quota_id"+"}", url.PathEscape(parameterValueToString(r.quotaId, "quotaId")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteOrganizationQuotaLimitRequest struct { + ctx context.Context + ApiService *NamespacequotaAPIService + orgname string + limitId string + quotaId string +} + +func (r ApiDeleteOrganizationQuotaLimitRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteOrganizationQuotaLimitExecute(r) +} + +/* +DeleteOrganizationQuotaLimit Method for DeleteOrganizationQuotaLimit + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname + @param limitId + @param quotaId + @return ApiDeleteOrganizationQuotaLimitRequest +*/ +func (a *NamespacequotaAPIService) DeleteOrganizationQuotaLimit(ctx context.Context, orgname string, limitId string, quotaId string) ApiDeleteOrganizationQuotaLimitRequest { + return ApiDeleteOrganizationQuotaLimitRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + limitId: limitId, + quotaId: quotaId, + } +} + +// Execute executes the request +func (a *NamespacequotaAPIService) DeleteOrganizationQuotaLimitExecute(r ApiDeleteOrganizationQuotaLimitRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NamespacequotaAPIService.DeleteOrganizationQuotaLimit") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/quota/{quota_id}/limit/{limit_id}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"limit_id"+"}", url.PathEscape(parameterValueToString(r.limitId, "limitId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"quota_id"+"}", url.PathEscape(parameterValueToString(r.quotaId, "quotaId")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetOrganizationQuotaRequest struct { + ctx context.Context + ApiService *NamespacequotaAPIService + orgname string + quotaId string +} + +func (r ApiGetOrganizationQuotaRequest) Execute() (*http.Response, error) { + return r.ApiService.GetOrganizationQuotaExecute(r) +} + +/* +GetOrganizationQuota Method for GetOrganizationQuota + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname + @param quotaId + @return ApiGetOrganizationQuotaRequest +*/ +func (a *NamespacequotaAPIService) GetOrganizationQuota(ctx context.Context, orgname string, quotaId string) ApiGetOrganizationQuotaRequest { + return ApiGetOrganizationQuotaRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + quotaId: quotaId, + } +} + +// Execute executes the request +func (a *NamespacequotaAPIService) GetOrganizationQuotaExecute(r ApiGetOrganizationQuotaRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NamespacequotaAPIService.GetOrganizationQuota") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/quota/{quota_id}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"quota_id"+"}", url.PathEscape(parameterValueToString(r.quotaId, "quotaId")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetOrganizationQuotaLimitRequest struct { + ctx context.Context + ApiService *NamespacequotaAPIService + orgname string + limitId string + quotaId string +} + +func (r ApiGetOrganizationQuotaLimitRequest) Execute() (*http.Response, error) { + return r.ApiService.GetOrganizationQuotaLimitExecute(r) +} + +/* +GetOrganizationQuotaLimit Method for GetOrganizationQuotaLimit + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname + @param limitId + @param quotaId + @return ApiGetOrganizationQuotaLimitRequest +*/ +func (a *NamespacequotaAPIService) GetOrganizationQuotaLimit(ctx context.Context, orgname string, limitId string, quotaId string) ApiGetOrganizationQuotaLimitRequest { + return ApiGetOrganizationQuotaLimitRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + limitId: limitId, + quotaId: quotaId, + } +} + +// Execute executes the request +func (a *NamespacequotaAPIService) GetOrganizationQuotaLimitExecute(r ApiGetOrganizationQuotaLimitRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NamespacequotaAPIService.GetOrganizationQuotaLimit") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/quota/{quota_id}/limit/{limit_id}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"limit_id"+"}", url.PathEscape(parameterValueToString(r.limitId, "limitId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"quota_id"+"}", url.PathEscape(parameterValueToString(r.quotaId, "quotaId")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetUserQuotaRequest struct { + ctx context.Context + ApiService *NamespacequotaAPIService + quotaId string +} + +func (r ApiGetUserQuotaRequest) Execute() (*http.Response, error) { + return r.ApiService.GetUserQuotaExecute(r) +} + +/* +GetUserQuota Method for GetUserQuota + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param quotaId + @return ApiGetUserQuotaRequest +*/ +func (a *NamespacequotaAPIService) GetUserQuota(ctx context.Context, quotaId string) ApiGetUserQuotaRequest { + return ApiGetUserQuotaRequest{ + ApiService: a, + ctx: ctx, + quotaId: quotaId, + } +} + +// Execute executes the request +func (a *NamespacequotaAPIService) GetUserQuotaExecute(r ApiGetUserQuotaRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NamespacequotaAPIService.GetUserQuota") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/quota/{quota_id}" + localVarPath = strings.Replace(localVarPath, "{"+"quota_id"+"}", url.PathEscape(parameterValueToString(r.quotaId, "quotaId")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetUserQuotaLimitRequest struct { + ctx context.Context + ApiService *NamespacequotaAPIService + limitId string + quotaId string +} + +func (r ApiGetUserQuotaLimitRequest) Execute() (*http.Response, error) { + return r.ApiService.GetUserQuotaLimitExecute(r) +} + +/* +GetUserQuotaLimit Method for GetUserQuotaLimit + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param limitId + @param quotaId + @return ApiGetUserQuotaLimitRequest +*/ +func (a *NamespacequotaAPIService) GetUserQuotaLimit(ctx context.Context, limitId string, quotaId string) ApiGetUserQuotaLimitRequest { + return ApiGetUserQuotaLimitRequest{ + ApiService: a, + ctx: ctx, + limitId: limitId, + quotaId: quotaId, + } +} + +// Execute executes the request +func (a *NamespacequotaAPIService) GetUserQuotaLimitExecute(r ApiGetUserQuotaLimitRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NamespacequotaAPIService.GetUserQuotaLimit") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/quota/{quota_id}/limit/{limit_id}" + localVarPath = strings.Replace(localVarPath, "{"+"limit_id"+"}", url.PathEscape(parameterValueToString(r.limitId, "limitId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"quota_id"+"}", url.PathEscape(parameterValueToString(r.quotaId, "quotaId")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListOrganizationQuotaRequest struct { + ctx context.Context + ApiService *NamespacequotaAPIService + orgname string +} + +func (r ApiListOrganizationQuotaRequest) Execute() (*http.Response, error) { + return r.ApiService.ListOrganizationQuotaExecute(r) +} + +/* +ListOrganizationQuota Method for ListOrganizationQuota + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname + @return ApiListOrganizationQuotaRequest +*/ +func (a *NamespacequotaAPIService) ListOrganizationQuota(ctx context.Context, orgname string) ApiListOrganizationQuotaRequest { + return ApiListOrganizationQuotaRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + } +} + +// Execute executes the request +func (a *NamespacequotaAPIService) ListOrganizationQuotaExecute(r ApiListOrganizationQuotaRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NamespacequotaAPIService.ListOrganizationQuota") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/quota" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListOrganizationQuotaLimitRequest struct { + ctx context.Context + ApiService *NamespacequotaAPIService + orgname string + quotaId string +} + +func (r ApiListOrganizationQuotaLimitRequest) Execute() (*http.Response, error) { + return r.ApiService.ListOrganizationQuotaLimitExecute(r) +} + +/* +ListOrganizationQuotaLimit Method for ListOrganizationQuotaLimit + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname + @param quotaId + @return ApiListOrganizationQuotaLimitRequest +*/ +func (a *NamespacequotaAPIService) ListOrganizationQuotaLimit(ctx context.Context, orgname string, quotaId string) ApiListOrganizationQuotaLimitRequest { + return ApiListOrganizationQuotaLimitRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + quotaId: quotaId, + } +} + +// Execute executes the request +func (a *NamespacequotaAPIService) ListOrganizationQuotaLimitExecute(r ApiListOrganizationQuotaLimitRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NamespacequotaAPIService.ListOrganizationQuotaLimit") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/quota/{quota_id}/limit" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"quota_id"+"}", url.PathEscape(parameterValueToString(r.quotaId, "quotaId")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListUserQuotaRequest struct { + ctx context.Context + ApiService *NamespacequotaAPIService +} + +func (r ApiListUserQuotaRequest) Execute() (*http.Response, error) { + return r.ApiService.ListUserQuotaExecute(r) +} + +/* +ListUserQuota Method for ListUserQuota + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListUserQuotaRequest +*/ +func (a *NamespacequotaAPIService) ListUserQuota(ctx context.Context) ApiListUserQuotaRequest { + return ApiListUserQuotaRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *NamespacequotaAPIService) ListUserQuotaExecute(r ApiListUserQuotaRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NamespacequotaAPIService.ListUserQuota") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/quota" + + 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListUserQuotaLimitRequest struct { + ctx context.Context + ApiService *NamespacequotaAPIService + quotaId string +} + +func (r ApiListUserQuotaLimitRequest) Execute() (*http.Response, error) { + return r.ApiService.ListUserQuotaLimitExecute(r) +} + +/* +ListUserQuotaLimit Method for ListUserQuotaLimit + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param quotaId + @return ApiListUserQuotaLimitRequest +*/ +func (a *NamespacequotaAPIService) ListUserQuotaLimit(ctx context.Context, quotaId string) ApiListUserQuotaLimitRequest { + return ApiListUserQuotaLimitRequest{ + ApiService: a, + ctx: ctx, + quotaId: quotaId, + } +} + +// Execute executes the request +func (a *NamespacequotaAPIService) ListUserQuotaLimitExecute(r ApiListUserQuotaLimitRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NamespacequotaAPIService.ListUserQuotaLimit") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/quota/{quota_id}/limit" + localVarPath = strings.Replace(localVarPath, "{"+"quota_id"+"}", url.PathEscape(parameterValueToString(r.quotaId, "quotaId")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/api_organization.go b/quay_api/api_organization.go new file mode 100644 index 0000000..a102190 --- /dev/null +++ b/quay_api/api_organization.go @@ -0,0 +1,1994 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// OrganizationAPIService OrganizationAPI service +type OrganizationAPIService service + +type ApiChangeOrganizationDetailsRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + orgname string + body *UpdateOrg +} + +// Request body contents. +func (r ApiChangeOrganizationDetailsRequest) Body(body UpdateOrg) ApiChangeOrganizationDetailsRequest { + r.body = &body + return r +} + +func (r ApiChangeOrganizationDetailsRequest) Execute() (*http.Response, error) { + return r.ApiService.ChangeOrganizationDetailsExecute(r) +} + +/* +ChangeOrganizationDetails Method for ChangeOrganizationDetails + +Change the details for the specified organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @return ApiChangeOrganizationDetailsRequest +*/ +func (a *OrganizationAPIService) ChangeOrganizationDetails(ctx context.Context, orgname string) ApiChangeOrganizationDetailsRequest { + return ApiChangeOrganizationDetailsRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) ChangeOrganizationDetailsExecute(r ApiChangeOrganizationDetailsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.ChangeOrganizationDetails") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiCreateOrganizationRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + body *NewOrg +} + +// Request body contents. +func (r ApiCreateOrganizationRequest) Body(body NewOrg) ApiCreateOrganizationRequest { + r.body = &body + return r +} + +func (r ApiCreateOrganizationRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateOrganizationExecute(r) +} + +/* +CreateOrganization Method for CreateOrganization + +Create a new organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateOrganizationRequest +*/ +func (a *OrganizationAPIService) CreateOrganization(ctx context.Context) ApiCreateOrganizationRequest { + return ApiCreateOrganizationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) CreateOrganizationExecute(r ApiCreateOrganizationRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.CreateOrganization") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/" + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiCreateOrganizationApplicationRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + orgname string + body *NewApp +} + +// Request body contents. +func (r ApiCreateOrganizationApplicationRequest) Body(body NewApp) ApiCreateOrganizationApplicationRequest { + r.body = &body + return r +} + +func (r ApiCreateOrganizationApplicationRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateOrganizationApplicationExecute(r) +} + +/* +CreateOrganizationApplication Method for CreateOrganizationApplication + +Creates a new application under this organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @return ApiCreateOrganizationApplicationRequest +*/ +func (a *OrganizationAPIService) CreateOrganizationApplication(ctx context.Context, orgname string) ApiCreateOrganizationApplicationRequest { + return ApiCreateOrganizationApplicationRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) CreateOrganizationApplicationExecute(r ApiCreateOrganizationApplicationRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.CreateOrganizationApplication") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/applications" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteAdminedOrganizationRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + orgname string +} + +func (r ApiDeleteAdminedOrganizationRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteAdminedOrganizationExecute(r) +} + +/* +DeleteAdminedOrganization Method for DeleteAdminedOrganization + +Deletes the specified organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @return ApiDeleteAdminedOrganizationRequest +*/ +func (a *OrganizationAPIService) DeleteAdminedOrganization(ctx context.Context, orgname string) ApiDeleteAdminedOrganizationRequest { + return ApiDeleteAdminedOrganizationRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) DeleteAdminedOrganizationExecute(r ApiDeleteAdminedOrganizationRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.DeleteAdminedOrganization") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteOrganizationApplicationRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + orgname string + clientId string +} + +func (r ApiDeleteOrganizationApplicationRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteOrganizationApplicationExecute(r) +} + +/* +DeleteOrganizationApplication Method for DeleteOrganizationApplication + +Deletes the application under this organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param clientId The OAuth client ID + @return ApiDeleteOrganizationApplicationRequest +*/ +func (a *OrganizationAPIService) DeleteOrganizationApplication(ctx context.Context, orgname string, clientId string) ApiDeleteOrganizationApplicationRequest { + return ApiDeleteOrganizationApplicationRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + clientId: clientId, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) DeleteOrganizationApplicationExecute(r ApiDeleteOrganizationApplicationRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.DeleteOrganizationApplication") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/applications/{client_id}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"client_id"+"}", url.PathEscape(parameterValueToString(r.clientId, "clientId")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetApplicationInformationRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + clientId string +} + +func (r ApiGetApplicationInformationRequest) Execute() (*http.Response, error) { + return r.ApiService.GetApplicationInformationExecute(r) +} + +/* +GetApplicationInformation Method for GetApplicationInformation + +Get information on the specified application. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param clientId The OAuth client ID + @return ApiGetApplicationInformationRequest +*/ +func (a *OrganizationAPIService) GetApplicationInformation(ctx context.Context, clientId string) ApiGetApplicationInformationRequest { + return ApiGetApplicationInformationRequest{ + ApiService: a, + ctx: ctx, + clientId: clientId, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) GetApplicationInformationExecute(r ApiGetApplicationInformationRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetApplicationInformation") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/app/{client_id}" + localVarPath = strings.Replace(localVarPath, "{"+"client_id"+"}", url.PathEscape(parameterValueToString(r.clientId, "clientId")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetOrganizationRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + orgname string +} + +func (r ApiGetOrganizationRequest) Execute() (*http.Response, error) { + return r.ApiService.GetOrganizationExecute(r) +} + +/* +GetOrganization Method for GetOrganization + +Get the details for the specified organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @return ApiGetOrganizationRequest +*/ +func (a *OrganizationAPIService) GetOrganization(ctx context.Context, orgname string) ApiGetOrganizationRequest { + return ApiGetOrganizationRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) GetOrganizationExecute(r ApiGetOrganizationRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetOrganization") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetOrganizationApplicationRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + orgname string + clientId string +} + +func (r ApiGetOrganizationApplicationRequest) Execute() (*http.Response, error) { + return r.ApiService.GetOrganizationApplicationExecute(r) +} + +/* +GetOrganizationApplication Method for GetOrganizationApplication + +Retrieves the application with the specified client_id under the specified organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param clientId The OAuth client ID + @return ApiGetOrganizationApplicationRequest +*/ +func (a *OrganizationAPIService) GetOrganizationApplication(ctx context.Context, orgname string, clientId string) ApiGetOrganizationApplicationRequest { + return ApiGetOrganizationApplicationRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + clientId: clientId, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) GetOrganizationApplicationExecute(r ApiGetOrganizationApplicationRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetOrganizationApplication") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/applications/{client_id}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"client_id"+"}", url.PathEscape(parameterValueToString(r.clientId, "clientId")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetOrganizationApplicationsRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + orgname string +} + +func (r ApiGetOrganizationApplicationsRequest) Execute() (*http.Response, error) { + return r.ApiService.GetOrganizationApplicationsExecute(r) +} + +/* +GetOrganizationApplications Method for GetOrganizationApplications + +List the applications for the specified organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @return ApiGetOrganizationApplicationsRequest +*/ +func (a *OrganizationAPIService) GetOrganizationApplications(ctx context.Context, orgname string) ApiGetOrganizationApplicationsRequest { + return ApiGetOrganizationApplicationsRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) GetOrganizationApplicationsExecute(r ApiGetOrganizationApplicationsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetOrganizationApplications") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/applications" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetOrganizationCollaboratorsRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + orgname string +} + +func (r ApiGetOrganizationCollaboratorsRequest) Execute() (*http.Response, error) { + return r.ApiService.GetOrganizationCollaboratorsExecute(r) +} + +/* +GetOrganizationCollaborators Method for GetOrganizationCollaborators + +List outside collaborators of the specified organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @return ApiGetOrganizationCollaboratorsRequest +*/ +func (a *OrganizationAPIService) GetOrganizationCollaborators(ctx context.Context, orgname string) ApiGetOrganizationCollaboratorsRequest { + return ApiGetOrganizationCollaboratorsRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) GetOrganizationCollaboratorsExecute(r ApiGetOrganizationCollaboratorsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetOrganizationCollaborators") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/collaborators" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetOrganizationMemberRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + orgname string + membername string +} + +func (r ApiGetOrganizationMemberRequest) Execute() (*http.Response, error) { + return r.ApiService.GetOrganizationMemberExecute(r) +} + +/* +GetOrganizationMember Method for GetOrganizationMember + +Retrieves the details of a member of the organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param membername The username of the organization member + @return ApiGetOrganizationMemberRequest +*/ +func (a *OrganizationAPIService) GetOrganizationMember(ctx context.Context, orgname string, membername string) ApiGetOrganizationMemberRequest { + return ApiGetOrganizationMemberRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + membername: membername, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) GetOrganizationMemberExecute(r ApiGetOrganizationMemberRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetOrganizationMember") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/members/{membername}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"membername"+"}", url.PathEscape(parameterValueToString(r.membername, "membername")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetOrganizationMembersRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + orgname string +} + +func (r ApiGetOrganizationMembersRequest) Execute() (*http.Response, error) { + return r.ApiService.GetOrganizationMembersExecute(r) +} + +/* +GetOrganizationMembers Method for GetOrganizationMembers + +List the human members of the specified organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @return ApiGetOrganizationMembersRequest +*/ +func (a *OrganizationAPIService) GetOrganizationMembers(ctx context.Context, orgname string) ApiGetOrganizationMembersRequest { + return ApiGetOrganizationMembersRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) GetOrganizationMembersExecute(r ApiGetOrganizationMembersRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.GetOrganizationMembers") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/members" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRemoveOrganizationMemberRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + orgname string + membername string +} + +func (r ApiRemoveOrganizationMemberRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveOrganizationMemberExecute(r) +} + +/* +RemoveOrganizationMember Method for RemoveOrganizationMember + +Removes a member from an organization, revoking all its repository priviledges and removing + + it from all teams in the organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param membername The username of the organization member + @return ApiRemoveOrganizationMemberRequest +*/ +func (a *OrganizationAPIService) RemoveOrganizationMember(ctx context.Context, orgname string, membername string) ApiRemoveOrganizationMemberRequest { + return ApiRemoveOrganizationMemberRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + membername: membername, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) RemoveOrganizationMemberExecute(r ApiRemoveOrganizationMemberRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.RemoveOrganizationMember") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/members/{membername}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"membername"+"}", url.PathEscape(parameterValueToString(r.membername, "membername")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiUpdateOrganizationApplicationRequest struct { + ctx context.Context + ApiService *OrganizationAPIService + orgname string + clientId string + body *UpdateApp +} + +// Request body contents. +func (r ApiUpdateOrganizationApplicationRequest) Body(body UpdateApp) ApiUpdateOrganizationApplicationRequest { + r.body = &body + return r +} + +func (r ApiUpdateOrganizationApplicationRequest) Execute() (*http.Response, error) { + return r.ApiService.UpdateOrganizationApplicationExecute(r) +} + +/* +UpdateOrganizationApplication Method for UpdateOrganizationApplication + +Updates an application under this organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param clientId The OAuth client ID + @return ApiUpdateOrganizationApplicationRequest +*/ +func (a *OrganizationAPIService) UpdateOrganizationApplication(ctx context.Context, orgname string, clientId string) ApiUpdateOrganizationApplicationRequest { + return ApiUpdateOrganizationApplicationRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + clientId: clientId, + } +} + +// Execute executes the request +func (a *OrganizationAPIService) UpdateOrganizationApplicationExecute(r ApiUpdateOrganizationApplicationRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrganizationAPIService.UpdateOrganizationApplication") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/applications/{client_id}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"client_id"+"}", url.PathEscape(parameterValueToString(r.clientId, "clientId")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/api_permission.go b/quay_api/api_permission.go new file mode 100644 index 0000000..a2c543a --- /dev/null +++ b/quay_api/api_permission.go @@ -0,0 +1,1300 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// PermissionAPIService PermissionAPI service +type PermissionAPIService service + +type ApiChangeTeamPermissionsRequest struct { + ctx context.Context + ApiService *PermissionAPIService + repository string + teamname string + body *TeamPermission +} + +// Request body contents. +func (r ApiChangeTeamPermissionsRequest) Body(body TeamPermission) ApiChangeTeamPermissionsRequest { + r.body = &body + return r +} + +func (r ApiChangeTeamPermissionsRequest) Execute() (*http.Response, error) { + return r.ApiService.ChangeTeamPermissionsExecute(r) +} + +/* +ChangeTeamPermissions Method for ChangeTeamPermissions + +Update the existing team permission. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @param teamname The name of the team to which the permission applies + @return ApiChangeTeamPermissionsRequest +*/ +func (a *PermissionAPIService) ChangeTeamPermissions(ctx context.Context, repository string, teamname string) ApiChangeTeamPermissionsRequest { + return ApiChangeTeamPermissionsRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + teamname: teamname, + } +} + +// Execute executes the request +func (a *PermissionAPIService) ChangeTeamPermissionsExecute(r ApiChangeTeamPermissionsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PermissionAPIService.ChangeTeamPermissions") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/permissions/team/{teamname}" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"teamname"+"}", url.PathEscape(parameterValueToString(r.teamname, "teamname")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiChangeUserPermissionsRequest struct { + ctx context.Context + ApiService *PermissionAPIService + repository string + username string + body *UserPermission +} + +// Request body contents. +func (r ApiChangeUserPermissionsRequest) Body(body UserPermission) ApiChangeUserPermissionsRequest { + r.body = &body + return r +} + +func (r ApiChangeUserPermissionsRequest) Execute() (*http.Response, error) { + return r.ApiService.ChangeUserPermissionsExecute(r) +} + +/* +ChangeUserPermissions Method for ChangeUserPermissions + +Update the perimssions for an existing repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @param username The username of the user to which the permission applies + @return ApiChangeUserPermissionsRequest +*/ +func (a *PermissionAPIService) ChangeUserPermissions(ctx context.Context, repository string, username string) ApiChangeUserPermissionsRequest { + return ApiChangeUserPermissionsRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + username: username, + } +} + +// Execute executes the request +func (a *PermissionAPIService) ChangeUserPermissionsExecute(r ApiChangeUserPermissionsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PermissionAPIService.ChangeUserPermissions") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/permissions/user/{username}" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterValueToString(r.username, "username")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteTeamPermissionsRequest struct { + ctx context.Context + ApiService *PermissionAPIService + repository string + teamname string +} + +func (r ApiDeleteTeamPermissionsRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteTeamPermissionsExecute(r) +} + +/* +DeleteTeamPermissions Method for DeleteTeamPermissions + +Delete the permission for the specified team. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @param teamname The name of the team to which the permission applies + @return ApiDeleteTeamPermissionsRequest +*/ +func (a *PermissionAPIService) DeleteTeamPermissions(ctx context.Context, repository string, teamname string) ApiDeleteTeamPermissionsRequest { + return ApiDeleteTeamPermissionsRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + teamname: teamname, + } +} + +// Execute executes the request +func (a *PermissionAPIService) DeleteTeamPermissionsExecute(r ApiDeleteTeamPermissionsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PermissionAPIService.DeleteTeamPermissions") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/permissions/team/{teamname}" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"teamname"+"}", url.PathEscape(parameterValueToString(r.teamname, "teamname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteUserPermissionsRequest struct { + ctx context.Context + ApiService *PermissionAPIService + repository string + username string +} + +func (r ApiDeleteUserPermissionsRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteUserPermissionsExecute(r) +} + +/* +DeleteUserPermissions Method for DeleteUserPermissions + +Delete the permission for the user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @param username The username of the user to which the permission applies + @return ApiDeleteUserPermissionsRequest +*/ +func (a *PermissionAPIService) DeleteUserPermissions(ctx context.Context, repository string, username string) ApiDeleteUserPermissionsRequest { + return ApiDeleteUserPermissionsRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + username: username, + } +} + +// Execute executes the request +func (a *PermissionAPIService) DeleteUserPermissionsExecute(r ApiDeleteUserPermissionsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PermissionAPIService.DeleteUserPermissions") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/permissions/user/{username}" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterValueToString(r.username, "username")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetTeamPermissionsRequest struct { + ctx context.Context + ApiService *PermissionAPIService + repository string + teamname string +} + +func (r ApiGetTeamPermissionsRequest) Execute() (*http.Response, error) { + return r.ApiService.GetTeamPermissionsExecute(r) +} + +/* +GetTeamPermissions Method for GetTeamPermissions + +Fetch the permission for the specified team. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @param teamname The name of the team to which the permission applies + @return ApiGetTeamPermissionsRequest +*/ +func (a *PermissionAPIService) GetTeamPermissions(ctx context.Context, repository string, teamname string) ApiGetTeamPermissionsRequest { + return ApiGetTeamPermissionsRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + teamname: teamname, + } +} + +// Execute executes the request +func (a *PermissionAPIService) GetTeamPermissionsExecute(r ApiGetTeamPermissionsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PermissionAPIService.GetTeamPermissions") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/permissions/team/{teamname}" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"teamname"+"}", url.PathEscape(parameterValueToString(r.teamname, "teamname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetUserPermissionsRequest struct { + ctx context.Context + ApiService *PermissionAPIService + repository string + username string +} + +func (r ApiGetUserPermissionsRequest) Execute() (*http.Response, error) { + return r.ApiService.GetUserPermissionsExecute(r) +} + +/* +GetUserPermissions Method for GetUserPermissions + +Get the permission for the specified user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @param username The username of the user to which the permission applies + @return ApiGetUserPermissionsRequest +*/ +func (a *PermissionAPIService) GetUserPermissions(ctx context.Context, repository string, username string) ApiGetUserPermissionsRequest { + return ApiGetUserPermissionsRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + username: username, + } +} + +// Execute executes the request +func (a *PermissionAPIService) GetUserPermissionsExecute(r ApiGetUserPermissionsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PermissionAPIService.GetUserPermissions") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/permissions/user/{username}" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterValueToString(r.username, "username")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetUserTransitivePermissionRequest struct { + ctx context.Context + ApiService *PermissionAPIService + repository string + username string +} + +func (r ApiGetUserTransitivePermissionRequest) Execute() (*http.Response, error) { + return r.ApiService.GetUserTransitivePermissionExecute(r) +} + +/* +GetUserTransitivePermission Method for GetUserTransitivePermission + +Get the fetch the permission for the specified user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @param username The username of the user to which the permissions apply + @return ApiGetUserTransitivePermissionRequest +*/ +func (a *PermissionAPIService) GetUserTransitivePermission(ctx context.Context, repository string, username string) ApiGetUserTransitivePermissionRequest { + return ApiGetUserTransitivePermissionRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + username: username, + } +} + +// Execute executes the request +func (a *PermissionAPIService) GetUserTransitivePermissionExecute(r ApiGetUserTransitivePermissionRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PermissionAPIService.GetUserTransitivePermission") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/permissions/user/{username}/transitive" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterValueToString(r.username, "username")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListRepoTeamPermissionsRequest struct { + ctx context.Context + ApiService *PermissionAPIService + repository string +} + +func (r ApiListRepoTeamPermissionsRequest) Execute() (*http.Response, error) { + return r.ApiService.ListRepoTeamPermissionsExecute(r) +} + +/* +ListRepoTeamPermissions Method for ListRepoTeamPermissions + +List all team permission. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @return ApiListRepoTeamPermissionsRequest +*/ +func (a *PermissionAPIService) ListRepoTeamPermissions(ctx context.Context, repository string) ApiListRepoTeamPermissionsRequest { + return ApiListRepoTeamPermissionsRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +func (a *PermissionAPIService) ListRepoTeamPermissionsExecute(r ApiListRepoTeamPermissionsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PermissionAPIService.ListRepoTeamPermissions") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/permissions/team/" + 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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListRepoUserPermissionsRequest struct { + ctx context.Context + ApiService *PermissionAPIService + repository string +} + +func (r ApiListRepoUserPermissionsRequest) Execute() (*http.Response, error) { + return r.ApiService.ListRepoUserPermissionsExecute(r) +} + +/* +ListRepoUserPermissions Method for ListRepoUserPermissions + +List all user permissions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @return ApiListRepoUserPermissionsRequest +*/ +func (a *PermissionAPIService) ListRepoUserPermissions(ctx context.Context, repository string) ApiListRepoUserPermissionsRequest { + return ApiListRepoUserPermissionsRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +func (a *PermissionAPIService) ListRepoUserPermissionsExecute(r ApiListRepoUserPermissionsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PermissionAPIService.ListRepoUserPermissions") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/permissions/user/" + 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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/api_prototype.go b/quay_api/api_prototype.go new file mode 100644 index 0000000..1b28a5c --- /dev/null +++ b/quay_api/api_prototype.go @@ -0,0 +1,600 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// PrototypeAPIService PrototypeAPI service +type PrototypeAPIService service + +type ApiCreateOrganizationPrototypePermissionRequest struct { + ctx context.Context + ApiService *PrototypeAPIService + orgname string + body *NewPrototype +} + +// Request body contents. +func (r ApiCreateOrganizationPrototypePermissionRequest) Body(body NewPrototype) ApiCreateOrganizationPrototypePermissionRequest { + r.body = &body + return r +} + +func (r ApiCreateOrganizationPrototypePermissionRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateOrganizationPrototypePermissionExecute(r) +} + +/* +CreateOrganizationPrototypePermission Method for CreateOrganizationPrototypePermission + +Create a new permission prototype. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @return ApiCreateOrganizationPrototypePermissionRequest +*/ +func (a *PrototypeAPIService) CreateOrganizationPrototypePermission(ctx context.Context, orgname string) ApiCreateOrganizationPrototypePermissionRequest { + return ApiCreateOrganizationPrototypePermissionRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + } +} + +// Execute executes the request +func (a *PrototypeAPIService) CreateOrganizationPrototypePermissionExecute(r ApiCreateOrganizationPrototypePermissionRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrototypeAPIService.CreateOrganizationPrototypePermission") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/prototypes" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteOrganizationPrototypePermissionRequest struct { + ctx context.Context + ApiService *PrototypeAPIService + orgname string + prototypeid string +} + +func (r ApiDeleteOrganizationPrototypePermissionRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteOrganizationPrototypePermissionExecute(r) +} + +/* +DeleteOrganizationPrototypePermission Method for DeleteOrganizationPrototypePermission + +Delete an existing permission prototype. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param prototypeid The ID of the prototype + @return ApiDeleteOrganizationPrototypePermissionRequest +*/ +func (a *PrototypeAPIService) DeleteOrganizationPrototypePermission(ctx context.Context, orgname string, prototypeid string) ApiDeleteOrganizationPrototypePermissionRequest { + return ApiDeleteOrganizationPrototypePermissionRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + prototypeid: prototypeid, + } +} + +// Execute executes the request +func (a *PrototypeAPIService) DeleteOrganizationPrototypePermissionExecute(r ApiDeleteOrganizationPrototypePermissionRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrototypeAPIService.DeleteOrganizationPrototypePermission") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/prototypes/{prototypeid}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"prototypeid"+"}", url.PathEscape(parameterValueToString(r.prototypeid, "prototypeid")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetOrganizationPrototypePermissionsRequest struct { + ctx context.Context + ApiService *PrototypeAPIService + orgname string +} + +func (r ApiGetOrganizationPrototypePermissionsRequest) Execute() (*http.Response, error) { + return r.ApiService.GetOrganizationPrototypePermissionsExecute(r) +} + +/* +GetOrganizationPrototypePermissions Method for GetOrganizationPrototypePermissions + +List the existing prototypes for this organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @return ApiGetOrganizationPrototypePermissionsRequest +*/ +func (a *PrototypeAPIService) GetOrganizationPrototypePermissions(ctx context.Context, orgname string) ApiGetOrganizationPrototypePermissionsRequest { + return ApiGetOrganizationPrototypePermissionsRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + } +} + +// Execute executes the request +func (a *PrototypeAPIService) GetOrganizationPrototypePermissionsExecute(r ApiGetOrganizationPrototypePermissionsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrototypeAPIService.GetOrganizationPrototypePermissions") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/prototypes" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiUpdateOrganizationPrototypePermissionRequest struct { + ctx context.Context + ApiService *PrototypeAPIService + orgname string + prototypeid string + body *PrototypeUpdate +} + +// Request body contents. +func (r ApiUpdateOrganizationPrototypePermissionRequest) Body(body PrototypeUpdate) ApiUpdateOrganizationPrototypePermissionRequest { + r.body = &body + return r +} + +func (r ApiUpdateOrganizationPrototypePermissionRequest) Execute() (*http.Response, error) { + return r.ApiService.UpdateOrganizationPrototypePermissionExecute(r) +} + +/* +UpdateOrganizationPrototypePermission Method for UpdateOrganizationPrototypePermission + +Update the role of an existing permission prototype. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param prototypeid The ID of the prototype + @return ApiUpdateOrganizationPrototypePermissionRequest +*/ +func (a *PrototypeAPIService) UpdateOrganizationPrototypePermission(ctx context.Context, orgname string, prototypeid string) ApiUpdateOrganizationPrototypePermissionRequest { + return ApiUpdateOrganizationPrototypePermissionRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + prototypeid: prototypeid, + } +} + +// Execute executes the request +func (a *PrototypeAPIService) UpdateOrganizationPrototypePermissionExecute(r ApiUpdateOrganizationPrototypePermissionRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PrototypeAPIService.UpdateOrganizationPrototypePermission") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/prototypes/{prototypeid}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"prototypeid"+"}", url.PathEscape(parameterValueToString(r.prototypeid, "prototypeid")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/api_repository.go b/quay_api/api_repository.go new file mode 100644 index 0000000..fd66279 --- /dev/null +++ b/quay_api/api_repository.go @@ -0,0 +1,958 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// RepositoryAPIService RepositoryAPI service +type RepositoryAPIService service + +type ApiChangeRepoVisibilityRequest struct { + ctx context.Context + ApiService *RepositoryAPIService + repository string + body *ChangeVisibility +} + +// Request body contents. +func (r ApiChangeRepoVisibilityRequest) Body(body ChangeVisibility) ApiChangeRepoVisibilityRequest { + r.body = &body + return r +} + +func (r ApiChangeRepoVisibilityRequest) Execute() (*http.Response, error) { + return r.ApiService.ChangeRepoVisibilityExecute(r) +} + +/* +ChangeRepoVisibility Method for ChangeRepoVisibility + +Change the visibility of a repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @return ApiChangeRepoVisibilityRequest +*/ +func (a *RepositoryAPIService) ChangeRepoVisibility(ctx context.Context, repository string) ApiChangeRepoVisibilityRequest { + return ApiChangeRepoVisibilityRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +func (a *RepositoryAPIService) ChangeRepoVisibilityExecute(r ApiChangeRepoVisibilityRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoryAPIService.ChangeRepoVisibility") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/changevisibility" + 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.body == nil { + return nil, reportError("body is required and must be specified") + } + + // 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 + } + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiCreateRepoRequest struct { + ctx context.Context + ApiService *RepositoryAPIService + body *NewRepo +} + +// Request body contents. +func (r ApiCreateRepoRequest) Body(body NewRepo) ApiCreateRepoRequest { + r.body = &body + return r +} + +func (r ApiCreateRepoRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateRepoExecute(r) +} + +/* +CreateRepo Method for CreateRepo + +Create a new repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateRepoRequest +*/ +func (a *RepositoryAPIService) CreateRepo(ctx context.Context) ApiCreateRepoRequest { + return ApiCreateRepoRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *RepositoryAPIService) CreateRepoExecute(r ApiCreateRepoRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoryAPIService.CreateRepo") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository" + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteRepositoryRequest struct { + ctx context.Context + ApiService *RepositoryAPIService + repository string +} + +func (r ApiDeleteRepositoryRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteRepositoryExecute(r) +} + +/* +DeleteRepository Method for DeleteRepository + +Delete a repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @return ApiDeleteRepositoryRequest +*/ +func (a *RepositoryAPIService) DeleteRepository(ctx context.Context, repository string) ApiDeleteRepositoryRequest { + return ApiDeleteRepositoryRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +func (a *RepositoryAPIService) DeleteRepositoryExecute(r ApiDeleteRepositoryRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoryAPIService.DeleteRepository") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetRepoRequest struct { + ctx context.Context + ApiService *RepositoryAPIService + repository string + includeTags *bool + includeStats *bool +} + +// Whether to include repository tags +func (r ApiGetRepoRequest) IncludeTags(includeTags bool) ApiGetRepoRequest { + r.includeTags = &includeTags + return r +} + +// Whether to include action statistics +func (r ApiGetRepoRequest) IncludeStats(includeStats bool) ApiGetRepoRequest { + r.includeStats = &includeStats + return r +} + +func (r ApiGetRepoRequest) Execute() (*http.Response, error) { + return r.ApiService.GetRepoExecute(r) +} + +/* +GetRepo Method for GetRepo + +Fetch the specified repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @return ApiGetRepoRequest +*/ +func (a *RepositoryAPIService) GetRepo(ctx context.Context, repository string) ApiGetRepoRequest { + return ApiGetRepoRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +func (a *RepositoryAPIService) GetRepoExecute(r ApiGetRepoRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoryAPIService.GetRepo") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{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.includeTags != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "includeTags", r.includeTags, "") + } + if r.includeStats != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "includeStats", r.includeStats, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListReposRequest struct { + ctx context.Context + ApiService *RepositoryAPIService + nextPage *string + repoKind *string + popularity *bool + lastModified *bool + public *bool + starred *bool + namespace *string +} + +// The page token for the next page +func (r ApiListReposRequest) NextPage(nextPage string) ApiListReposRequest { + r.nextPage = &nextPage + return r +} + +// The kind of repositories to return +func (r ApiListReposRequest) RepoKind(repoKind string) ApiListReposRequest { + r.repoKind = &repoKind + return r +} + +// Whether to include the repository's popularity metric. +func (r ApiListReposRequest) Popularity(popularity bool) ApiListReposRequest { + r.popularity = &popularity + return r +} + +// Whether to include when the repository was last modified. +func (r ApiListReposRequest) LastModified(lastModified bool) ApiListReposRequest { + r.lastModified = &lastModified + return r +} + +// Adds any repositories visible to the user by virtue of being public +func (r ApiListReposRequest) Public(public bool) ApiListReposRequest { + r.public = &public + return r +} + +// Filters the repositories returned to those starred by the user +func (r ApiListReposRequest) Starred(starred bool) ApiListReposRequest { + r.starred = &starred + return r +} + +// Filters the repositories returned to this namespace +func (r ApiListReposRequest) Namespace(namespace string) ApiListReposRequest { + r.namespace = &namespace + return r +} + +func (r ApiListReposRequest) Execute() (*http.Response, error) { + return r.ApiService.ListReposExecute(r) +} + +/* +ListRepos Method for ListRepos + +Fetch the list of repositories visible to the current user under a variety of situations. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListReposRequest +*/ +func (a *RepositoryAPIService) ListRepos(ctx context.Context) ApiListReposRequest { + return ApiListReposRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *RepositoryAPIService) ListReposExecute(r ApiListReposRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoryAPIService.ListRepos") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.nextPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "next_page", r.nextPage, "") + } + if r.repoKind != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repo_kind", r.repoKind, "") + } + if r.popularity != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "popularity", r.popularity, "") + } + if r.lastModified != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified", r.lastModified, "") + } + if r.public != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "public", r.public, "") + } + if r.starred != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "starred", r.starred, "") + } + if r.namespace != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace", r.namespace, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiUpdateRepoRequest struct { + ctx context.Context + ApiService *RepositoryAPIService + repository string + body *RepoUpdate +} + +// Request body contents. +func (r ApiUpdateRepoRequest) Body(body RepoUpdate) ApiUpdateRepoRequest { + r.body = &body + return r +} + +func (r ApiUpdateRepoRequest) Execute() (*http.Response, error) { + return r.ApiService.UpdateRepoExecute(r) +} + +/* +UpdateRepo Method for UpdateRepo + +Update the description in the specified repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @return ApiUpdateRepoRequest +*/ +func (a *RepositoryAPIService) UpdateRepo(ctx context.Context, repository string) ApiUpdateRepoRequest { + return ApiUpdateRepoRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +func (a *RepositoryAPIService) UpdateRepoExecute(r ApiUpdateRepoRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositoryAPIService.UpdateRepo") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{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.body == nil { + return nil, reportError("body is required and must be specified") + } + + // 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 + } + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/api_repositorynotification.go b/quay_api/api_repositorynotification.go new file mode 100644 index 0000000..8a5f366 --- /dev/null +++ b/quay_api/api_repositorynotification.go @@ -0,0 +1,866 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// RepositorynotificationAPIService RepositorynotificationAPI service +type RepositorynotificationAPIService service + +type ApiCreateRepoNotificationRequest struct { + ctx context.Context + ApiService *RepositorynotificationAPIService + repository string + body *NotificationCreateRequest +} + +// Request body contents. +func (r ApiCreateRepoNotificationRequest) Body(body NotificationCreateRequest) ApiCreateRepoNotificationRequest { + r.body = &body + return r +} + +func (r ApiCreateRepoNotificationRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateRepoNotificationExecute(r) +} + +/* +CreateRepoNotification Method for CreateRepoNotification + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @return ApiCreateRepoNotificationRequest +*/ +func (a *RepositorynotificationAPIService) CreateRepoNotification(ctx context.Context, repository string) ApiCreateRepoNotificationRequest { + return ApiCreateRepoNotificationRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +func (a *RepositorynotificationAPIService) CreateRepoNotificationExecute(r ApiCreateRepoNotificationRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositorynotificationAPIService.CreateRepoNotification") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/notification/" + 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.body == nil { + return nil, reportError("body is required and must be specified") + } + + // 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 + } + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteRepoNotificationRequest struct { + ctx context.Context + ApiService *RepositorynotificationAPIService + repository string + uuid string +} + +func (r ApiDeleteRepoNotificationRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteRepoNotificationExecute(r) +} + +/* +DeleteRepoNotification Method for DeleteRepoNotification + +Deletes the specified notification. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @param uuid The UUID of the notification + @return ApiDeleteRepoNotificationRequest +*/ +func (a *RepositorynotificationAPIService) DeleteRepoNotification(ctx context.Context, repository string, uuid string) ApiDeleteRepoNotificationRequest { + return ApiDeleteRepoNotificationRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + uuid: uuid, + } +} + +// Execute executes the request +func (a *RepositorynotificationAPIService) DeleteRepoNotificationExecute(r ApiDeleteRepoNotificationRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositorynotificationAPIService.DeleteRepoNotification") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/notification/{uuid}" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetRepoNotificationRequest struct { + ctx context.Context + ApiService *RepositorynotificationAPIService + repository string + uuid string +} + +func (r ApiGetRepoNotificationRequest) Execute() (*http.Response, error) { + return r.ApiService.GetRepoNotificationExecute(r) +} + +/* +GetRepoNotification Method for GetRepoNotification + +Get information for the specified notification. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @param uuid The UUID of the notification + @return ApiGetRepoNotificationRequest +*/ +func (a *RepositorynotificationAPIService) GetRepoNotification(ctx context.Context, repository string, uuid string) ApiGetRepoNotificationRequest { + return ApiGetRepoNotificationRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + uuid: uuid, + } +} + +// Execute executes the request +func (a *RepositorynotificationAPIService) GetRepoNotificationExecute(r ApiGetRepoNotificationRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositorynotificationAPIService.GetRepoNotification") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/notification/{uuid}" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListRepoNotificationsRequest struct { + ctx context.Context + ApiService *RepositorynotificationAPIService + repository string +} + +func (r ApiListRepoNotificationsRequest) Execute() (*http.Response, error) { + return r.ApiService.ListRepoNotificationsExecute(r) +} + +/* +ListRepoNotifications Method for ListRepoNotifications + +List the notifications for the specified repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @return ApiListRepoNotificationsRequest +*/ +func (a *RepositorynotificationAPIService) ListRepoNotifications(ctx context.Context, repository string) ApiListRepoNotificationsRequest { + return ApiListRepoNotificationsRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +func (a *RepositorynotificationAPIService) ListRepoNotificationsExecute(r ApiListRepoNotificationsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositorynotificationAPIService.ListRepoNotifications") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/notification/" + 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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiResetRepositoryNotificationFailuresRequest struct { + ctx context.Context + ApiService *RepositorynotificationAPIService + repository string + uuid string +} + +func (r ApiResetRepositoryNotificationFailuresRequest) Execute() (*http.Response, error) { + return r.ApiService.ResetRepositoryNotificationFailuresExecute(r) +} + +/* +ResetRepositoryNotificationFailures Method for ResetRepositoryNotificationFailures + +Resets repository notification to 0 failures. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @param uuid The UUID of the notification + @return ApiResetRepositoryNotificationFailuresRequest +*/ +func (a *RepositorynotificationAPIService) ResetRepositoryNotificationFailures(ctx context.Context, repository string, uuid string) ApiResetRepositoryNotificationFailuresRequest { + return ApiResetRepositoryNotificationFailuresRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + uuid: uuid, + } +} + +// Execute executes the request +func (a *RepositorynotificationAPIService) ResetRepositoryNotificationFailuresExecute(r ApiResetRepositoryNotificationFailuresRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositorynotificationAPIService.ResetRepositoryNotificationFailures") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/notification/{uuid}" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiTestRepoNotificationRequest struct { + ctx context.Context + ApiService *RepositorynotificationAPIService + repository string + uuid string +} + +func (r ApiTestRepoNotificationRequest) Execute() (*http.Response, error) { + return r.ApiService.TestRepoNotificationExecute(r) +} + +/* +TestRepoNotification Method for TestRepoNotification + +Queues a test notification for this repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @param uuid The UUID of the notification + @return ApiTestRepoNotificationRequest +*/ +func (a *RepositorynotificationAPIService) TestRepoNotification(ctx context.Context, repository string, uuid string) ApiTestRepoNotificationRequest { + return ApiTestRepoNotificationRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + uuid: uuid, + } +} + +// Execute executes the request +func (a *RepositorynotificationAPIService) TestRepoNotificationExecute(r ApiTestRepoNotificationRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepositorynotificationAPIService.TestRepoNotification") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/notification/{uuid}/test" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", url.PathEscape(parameterValueToString(r.uuid, "uuid")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/api_repotoken.go b/quay_api/api_repotoken.go new file mode 100644 index 0000000..1287c98 --- /dev/null +++ b/quay_api/api_repotoken.go @@ -0,0 +1,740 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// RepotokenAPIService RepotokenAPI service +type RepotokenAPIService service + +type ApiChangeTokenRequest struct { + ctx context.Context + ApiService *RepotokenAPIService + repository string + code string + body *TokenPermission +} + +// Request body contents. +func (r ApiChangeTokenRequest) Body(body TokenPermission) ApiChangeTokenRequest { + r.body = &body + return r +} + +func (r ApiChangeTokenRequest) Execute() (*http.Response, error) { + return r.ApiService.ChangeTokenExecute(r) +} + +/* +ChangeToken Method for ChangeToken + +Update the permissions for the specified repository token. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @param code The token code + @return ApiChangeTokenRequest +*/ +func (a *RepotokenAPIService) ChangeToken(ctx context.Context, repository string, code string) ApiChangeTokenRequest { + return ApiChangeTokenRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + code: code, + } +} + +// Execute executes the request +func (a *RepotokenAPIService) ChangeTokenExecute(r ApiChangeTokenRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepotokenAPIService.ChangeToken") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/tokens/{code}" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"code"+"}", url.PathEscape(parameterValueToString(r.code, "code")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiCreateTokenRequest struct { + ctx context.Context + ApiService *RepotokenAPIService + repository string + body *NewToken +} + +// Request body contents. +func (r ApiCreateTokenRequest) Body(body NewToken) ApiCreateTokenRequest { + r.body = &body + return r +} + +func (r ApiCreateTokenRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateTokenExecute(r) +} + +/* +CreateToken Method for CreateToken + +Create a new repository token. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @return ApiCreateTokenRequest +*/ +func (a *RepotokenAPIService) CreateToken(ctx context.Context, repository string) ApiCreateTokenRequest { + return ApiCreateTokenRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +func (a *RepotokenAPIService) CreateTokenExecute(r ApiCreateTokenRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepotokenAPIService.CreateToken") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/tokens/" + 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.body == nil { + return nil, reportError("body is required and must be specified") + } + + // 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 + } + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteTokenRequest struct { + ctx context.Context + ApiService *RepotokenAPIService + repository string + code string +} + +func (r ApiDeleteTokenRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteTokenExecute(r) +} + +/* +DeleteToken Method for DeleteToken + +Delete the repository token. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @param code The token code + @return ApiDeleteTokenRequest +*/ +func (a *RepotokenAPIService) DeleteToken(ctx context.Context, repository string, code string) ApiDeleteTokenRequest { + return ApiDeleteTokenRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + code: code, + } +} + +// Execute executes the request +func (a *RepotokenAPIService) DeleteTokenExecute(r ApiDeleteTokenRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepotokenAPIService.DeleteToken") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/tokens/{code}" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"code"+"}", url.PathEscape(parameterValueToString(r.code, "code")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetTokensRequest struct { + ctx context.Context + ApiService *RepotokenAPIService + repository string + code string +} + +func (r ApiGetTokensRequest) Execute() (*http.Response, error) { + return r.ApiService.GetTokensExecute(r) +} + +/* +GetTokens Method for GetTokens + +Fetch the specified repository token information. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @param code The token code + @return ApiGetTokensRequest +*/ +func (a *RepotokenAPIService) GetTokens(ctx context.Context, repository string, code string) ApiGetTokensRequest { + return ApiGetTokensRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + code: code, + } +} + +// Execute executes the request +func (a *RepotokenAPIService) GetTokensExecute(r ApiGetTokensRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepotokenAPIService.GetTokens") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/tokens/{code}" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"code"+"}", url.PathEscape(parameterValueToString(r.code, "code")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListRepoTokensRequest struct { + ctx context.Context + ApiService *RepotokenAPIService + repository string +} + +func (r ApiListRepoTokensRequest) Execute() (*http.Response, error) { + return r.ApiService.ListRepoTokensExecute(r) +} + +/* +ListRepoTokens Method for ListRepoTokens + +List the tokens for the specified repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @return ApiListRepoTokensRequest +*/ +func (a *RepotokenAPIService) ListRepoTokens(ctx context.Context, repository string) ApiListRepoTokensRequest { + return ApiListRepoTokensRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +func (a *RepotokenAPIService) ListRepoTokensExecute(r ApiListRepoTokensRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RepotokenAPIService.ListRepoTokens") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/tokens/" + 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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/api_robot.go b/quay_api/api_robot.go new file mode 100644 index 0000000..497cd31 --- /dev/null +++ b/quay_api/api_robot.go @@ -0,0 +1,1756 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// RobotAPIService RobotAPI service +type RobotAPIService service + +type ApiCreateOrgRobotRequest struct { + ctx context.Context + ApiService *RobotAPIService + orgname string + robotShortname string + body *CreateRobot +} + +// Request body contents. +func (r ApiCreateOrgRobotRequest) Body(body CreateRobot) ApiCreateOrgRobotRequest { + r.body = &body + return r +} + +func (r ApiCreateOrgRobotRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateOrgRobotExecute(r) +} + +/* +CreateOrgRobot Method for CreateOrgRobot + +Create a new robot in the organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param robotShortname The short name for the robot, without any user or organization prefix + @return ApiCreateOrgRobotRequest +*/ +func (a *RobotAPIService) CreateOrgRobot(ctx context.Context, orgname string, robotShortname string) ApiCreateOrgRobotRequest { + return ApiCreateOrgRobotRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + robotShortname: robotShortname, + } +} + +// Execute executes the request +func (a *RobotAPIService) CreateOrgRobotExecute(r ApiCreateOrgRobotRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RobotAPIService.CreateOrgRobot") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/robots/{robot_shortname}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"robot_shortname"+"}", url.PathEscape(parameterValueToString(r.robotShortname, "robotShortname")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiCreateUserRobotRequest struct { + ctx context.Context + ApiService *RobotAPIService + robotShortname string + body *CreateRobot +} + +// Request body contents. +func (r ApiCreateUserRobotRequest) Body(body CreateRobot) ApiCreateUserRobotRequest { + r.body = &body + return r +} + +func (r ApiCreateUserRobotRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateUserRobotExecute(r) +} + +/* +CreateUserRobot Method for CreateUserRobot + +Create a new user robot with the specified name. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param robotShortname The short name for the robot, without any user or organization prefix + @return ApiCreateUserRobotRequest +*/ +func (a *RobotAPIService) CreateUserRobot(ctx context.Context, robotShortname string) ApiCreateUserRobotRequest { + return ApiCreateUserRobotRequest{ + ApiService: a, + ctx: ctx, + robotShortname: robotShortname, + } +} + +// Execute executes the request +func (a *RobotAPIService) CreateUserRobotExecute(r ApiCreateUserRobotRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RobotAPIService.CreateUserRobot") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/robots/{robot_shortname}" + localVarPath = strings.Replace(localVarPath, "{"+"robot_shortname"+"}", url.PathEscape(parameterValueToString(r.robotShortname, "robotShortname")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteOrgRobotRequest struct { + ctx context.Context + ApiService *RobotAPIService + orgname string + robotShortname string +} + +func (r ApiDeleteOrgRobotRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteOrgRobotExecute(r) +} + +/* +DeleteOrgRobot Method for DeleteOrgRobot + +Delete an existing organization robot. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param robotShortname The short name for the robot, without any user or organization prefix + @return ApiDeleteOrgRobotRequest +*/ +func (a *RobotAPIService) DeleteOrgRobot(ctx context.Context, orgname string, robotShortname string) ApiDeleteOrgRobotRequest { + return ApiDeleteOrgRobotRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + robotShortname: robotShortname, + } +} + +// Execute executes the request +func (a *RobotAPIService) DeleteOrgRobotExecute(r ApiDeleteOrgRobotRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RobotAPIService.DeleteOrgRobot") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/robots/{robot_shortname}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"robot_shortname"+"}", url.PathEscape(parameterValueToString(r.robotShortname, "robotShortname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteUserRobotRequest struct { + ctx context.Context + ApiService *RobotAPIService + robotShortname string +} + +func (r ApiDeleteUserRobotRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteUserRobotExecute(r) +} + +/* +DeleteUserRobot Method for DeleteUserRobot + +Delete an existing robot. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param robotShortname The short name for the robot, without any user or organization prefix + @return ApiDeleteUserRobotRequest +*/ +func (a *RobotAPIService) DeleteUserRobot(ctx context.Context, robotShortname string) ApiDeleteUserRobotRequest { + return ApiDeleteUserRobotRequest{ + ApiService: a, + ctx: ctx, + robotShortname: robotShortname, + } +} + +// Execute executes the request +func (a *RobotAPIService) DeleteUserRobotExecute(r ApiDeleteUserRobotRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RobotAPIService.DeleteUserRobot") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/robots/{robot_shortname}" + localVarPath = strings.Replace(localVarPath, "{"+"robot_shortname"+"}", url.PathEscape(parameterValueToString(r.robotShortname, "robotShortname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetOrgRobotRequest struct { + ctx context.Context + ApiService *RobotAPIService + orgname string + robotShortname string +} + +func (r ApiGetOrgRobotRequest) Execute() (*http.Response, error) { + return r.ApiService.GetOrgRobotExecute(r) +} + +/* +GetOrgRobot Method for GetOrgRobot + +Returns the organization's robot with the specified name. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param robotShortname The short name for the robot, without any user or organization prefix + @return ApiGetOrgRobotRequest +*/ +func (a *RobotAPIService) GetOrgRobot(ctx context.Context, orgname string, robotShortname string) ApiGetOrgRobotRequest { + return ApiGetOrgRobotRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + robotShortname: robotShortname, + } +} + +// Execute executes the request +func (a *RobotAPIService) GetOrgRobotExecute(r ApiGetOrgRobotRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RobotAPIService.GetOrgRobot") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/robots/{robot_shortname}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"robot_shortname"+"}", url.PathEscape(parameterValueToString(r.robotShortname, "robotShortname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetOrgRobotPermissionsRequest struct { + ctx context.Context + ApiService *RobotAPIService + orgname string + robotShortname string +} + +func (r ApiGetOrgRobotPermissionsRequest) Execute() (*http.Response, error) { + return r.ApiService.GetOrgRobotPermissionsExecute(r) +} + +/* +GetOrgRobotPermissions Method for GetOrgRobotPermissions + +Returns the list of repository permissions for the org's robot. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param robotShortname The short name for the robot, without any user or organization prefix + @return ApiGetOrgRobotPermissionsRequest +*/ +func (a *RobotAPIService) GetOrgRobotPermissions(ctx context.Context, orgname string, robotShortname string) ApiGetOrgRobotPermissionsRequest { + return ApiGetOrgRobotPermissionsRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + robotShortname: robotShortname, + } +} + +// Execute executes the request +func (a *RobotAPIService) GetOrgRobotPermissionsExecute(r ApiGetOrgRobotPermissionsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RobotAPIService.GetOrgRobotPermissions") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/robots/{robot_shortname}/permissions" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"robot_shortname"+"}", url.PathEscape(parameterValueToString(r.robotShortname, "robotShortname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetOrgRobotsRequest struct { + ctx context.Context + ApiService *RobotAPIService + orgname string + limit *int32 + token *bool + permissions *bool +} + +// If specified, the number of robots to return. +func (r ApiGetOrgRobotsRequest) Limit(limit int32) ApiGetOrgRobotsRequest { + r.limit = &limit + return r +} + +// If false, the robot's token is not returned. +func (r ApiGetOrgRobotsRequest) Token(token bool) ApiGetOrgRobotsRequest { + r.token = &token + return r +} + +// Whether to include repostories and teams in which the robots have permission. +func (r ApiGetOrgRobotsRequest) Permissions(permissions bool) ApiGetOrgRobotsRequest { + r.permissions = &permissions + return r +} + +func (r ApiGetOrgRobotsRequest) Execute() (*http.Response, error) { + return r.ApiService.GetOrgRobotsExecute(r) +} + +/* +GetOrgRobots Method for GetOrgRobots + +List the organization's robots. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @return ApiGetOrgRobotsRequest +*/ +func (a *RobotAPIService) GetOrgRobots(ctx context.Context, orgname string) ApiGetOrgRobotsRequest { + return ApiGetOrgRobotsRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + } +} + +// Execute executes the request +func (a *RobotAPIService) GetOrgRobotsExecute(r ApiGetOrgRobotsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RobotAPIService.GetOrgRobots") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/robots" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.token != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "token", r.token, "") + } + if r.permissions != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "permissions", r.permissions, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetUserRobotRequest struct { + ctx context.Context + ApiService *RobotAPIService + robotShortname string +} + +func (r ApiGetUserRobotRequest) Execute() (*http.Response, error) { + return r.ApiService.GetUserRobotExecute(r) +} + +/* +GetUserRobot Method for GetUserRobot + +Returns the user's robot with the specified name. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param robotShortname The short name for the robot, without any user or organization prefix + @return ApiGetUserRobotRequest +*/ +func (a *RobotAPIService) GetUserRobot(ctx context.Context, robotShortname string) ApiGetUserRobotRequest { + return ApiGetUserRobotRequest{ + ApiService: a, + ctx: ctx, + robotShortname: robotShortname, + } +} + +// Execute executes the request +func (a *RobotAPIService) GetUserRobotExecute(r ApiGetUserRobotRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RobotAPIService.GetUserRobot") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/robots/{robot_shortname}" + localVarPath = strings.Replace(localVarPath, "{"+"robot_shortname"+"}", url.PathEscape(parameterValueToString(r.robotShortname, "robotShortname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetUserRobotPermissionsRequest struct { + ctx context.Context + ApiService *RobotAPIService + robotShortname string +} + +func (r ApiGetUserRobotPermissionsRequest) Execute() (*http.Response, error) { + return r.ApiService.GetUserRobotPermissionsExecute(r) +} + +/* +GetUserRobotPermissions Method for GetUserRobotPermissions + +Returns the list of repository permissions for the user's robot. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param robotShortname The short name for the robot, without any user or organization prefix + @return ApiGetUserRobotPermissionsRequest +*/ +func (a *RobotAPIService) GetUserRobotPermissions(ctx context.Context, robotShortname string) ApiGetUserRobotPermissionsRequest { + return ApiGetUserRobotPermissionsRequest{ + ApiService: a, + ctx: ctx, + robotShortname: robotShortname, + } +} + +// Execute executes the request +func (a *RobotAPIService) GetUserRobotPermissionsExecute(r ApiGetUserRobotPermissionsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RobotAPIService.GetUserRobotPermissions") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/robots/{robot_shortname}/permissions" + localVarPath = strings.Replace(localVarPath, "{"+"robot_shortname"+"}", url.PathEscape(parameterValueToString(r.robotShortname, "robotShortname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetUserRobotsRequest struct { + ctx context.Context + ApiService *RobotAPIService + limit *int32 + token *bool + permissions *bool +} + +// If specified, the number of robots to return. +func (r ApiGetUserRobotsRequest) Limit(limit int32) ApiGetUserRobotsRequest { + r.limit = &limit + return r +} + +// If false, the robot's token is not returned. +func (r ApiGetUserRobotsRequest) Token(token bool) ApiGetUserRobotsRequest { + r.token = &token + return r +} + +// Whether to include repositories and teams in which the robots have permission. +func (r ApiGetUserRobotsRequest) Permissions(permissions bool) ApiGetUserRobotsRequest { + r.permissions = &permissions + return r +} + +func (r ApiGetUserRobotsRequest) Execute() (*http.Response, error) { + return r.ApiService.GetUserRobotsExecute(r) +} + +/* +GetUserRobots Method for GetUserRobots + +List the available robots for the user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetUserRobotsRequest +*/ +func (a *RobotAPIService) GetUserRobots(ctx context.Context) ApiGetUserRobotsRequest { + return ApiGetUserRobotsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *RobotAPIService) GetUserRobotsExecute(r ApiGetUserRobotsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RobotAPIService.GetUserRobots") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/robots" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.token != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "token", r.token, "") + } + if r.permissions != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "permissions", r.permissions, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRegenerateOrgRobotTokenRequest struct { + ctx context.Context + ApiService *RobotAPIService + orgname string + robotShortname string +} + +func (r ApiRegenerateOrgRobotTokenRequest) Execute() (*http.Response, error) { + return r.ApiService.RegenerateOrgRobotTokenExecute(r) +} + +/* +RegenerateOrgRobotToken Method for RegenerateOrgRobotToken + +Regenerates the token for an organization robot. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param robotShortname The short name for the robot, without any user or organization prefix + @return ApiRegenerateOrgRobotTokenRequest +*/ +func (a *RobotAPIService) RegenerateOrgRobotToken(ctx context.Context, orgname string, robotShortname string) ApiRegenerateOrgRobotTokenRequest { + return ApiRegenerateOrgRobotTokenRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + robotShortname: robotShortname, + } +} + +// Execute executes the request +func (a *RobotAPIService) RegenerateOrgRobotTokenExecute(r ApiRegenerateOrgRobotTokenRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RobotAPIService.RegenerateOrgRobotToken") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/robots/{robot_shortname}/regenerate" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"robot_shortname"+"}", url.PathEscape(parameterValueToString(r.robotShortname, "robotShortname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRegenerateUserRobotTokenRequest struct { + ctx context.Context + ApiService *RobotAPIService + robotShortname string +} + +func (r ApiRegenerateUserRobotTokenRequest) Execute() (*http.Response, error) { + return r.ApiService.RegenerateUserRobotTokenExecute(r) +} + +/* +RegenerateUserRobotToken Method for RegenerateUserRobotToken + +Regenerates the token for a user's robot. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param robotShortname The short name for the robot, without any user or organization prefix + @return ApiRegenerateUserRobotTokenRequest +*/ +func (a *RobotAPIService) RegenerateUserRobotToken(ctx context.Context, robotShortname string) ApiRegenerateUserRobotTokenRequest { + return ApiRegenerateUserRobotTokenRequest{ + ApiService: a, + ctx: ctx, + robotShortname: robotShortname, + } +} + +// Execute executes the request +func (a *RobotAPIService) RegenerateUserRobotTokenExecute(r ApiRegenerateUserRobotTokenRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RobotAPIService.RegenerateUserRobotToken") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/robots/{robot_shortname}/regenerate" + localVarPath = strings.Replace(localVarPath, "{"+"robot_shortname"+"}", url.PathEscape(parameterValueToString(r.robotShortname, "robotShortname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/api_search.go b/quay_api/api_search.go new file mode 100644 index 0000000..a385d1d --- /dev/null +++ b/quay_api/api_search.go @@ -0,0 +1,494 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// SearchAPIService SearchAPI service +type SearchAPIService service + +type ApiConductRepoSearchRequest struct { + ctx context.Context + ApiService *SearchAPIService + includeUsage *bool + page *int32 + query *string +} + +// Whether to include usage metadata +func (r ApiConductRepoSearchRequest) IncludeUsage(includeUsage bool) ApiConductRepoSearchRequest { + r.includeUsage = &includeUsage + return r +} + +// The page. +func (r ApiConductRepoSearchRequest) Page(page int32) ApiConductRepoSearchRequest { + r.page = &page + return r +} + +// The search query. +func (r ApiConductRepoSearchRequest) Query(query string) ApiConductRepoSearchRequest { + r.query = &query + return r +} + +func (r ApiConductRepoSearchRequest) Execute() (*http.Response, error) { + return r.ApiService.ConductRepoSearchExecute(r) +} + +/* +ConductRepoSearch Method for ConductRepoSearch + +Get a list of apps and repositories that match the specified query. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiConductRepoSearchRequest +*/ +func (a *SearchAPIService) ConductRepoSearch(ctx context.Context) ApiConductRepoSearchRequest { + return ApiConductRepoSearchRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *SearchAPIService) ConductRepoSearchExecute(r ApiConductRepoSearchRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SearchAPIService.ConductRepoSearch") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/find/repositories" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.includeUsage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "includeUsage", r.includeUsage, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.query != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "query", r.query, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiConductSearchRequest struct { + ctx context.Context + ApiService *SearchAPIService + query *string +} + +// The search query. +func (r ApiConductSearchRequest) Query(query string) ApiConductSearchRequest { + r.query = &query + return r +} + +func (r ApiConductSearchRequest) Execute() (*http.Response, error) { + return r.ApiService.ConductSearchExecute(r) +} + +/* +ConductSearch Method for ConductSearch + +Get a list of entities and resources that match the specified query. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiConductSearchRequest +*/ +func (a *SearchAPIService) ConductSearch(ctx context.Context) ApiConductSearchRequest { + return ApiConductSearchRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *SearchAPIService) ConductSearchExecute(r ApiConductSearchRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SearchAPIService.ConductSearch") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/find/all" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.query != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "query", r.query, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetMatchingEntitiesRequest struct { + ctx context.Context + ApiService *SearchAPIService + prefix string + includeOrgs *bool + includeTeams *bool + namespace *string +} + +// Whether to include orgs names. +func (r ApiGetMatchingEntitiesRequest) IncludeOrgs(includeOrgs bool) ApiGetMatchingEntitiesRequest { + r.includeOrgs = &includeOrgs + return r +} + +// Whether to include team names. +func (r ApiGetMatchingEntitiesRequest) IncludeTeams(includeTeams bool) ApiGetMatchingEntitiesRequest { + r.includeTeams = &includeTeams + return r +} + +// Namespace to use when querying for org entities. +func (r ApiGetMatchingEntitiesRequest) Namespace(namespace string) ApiGetMatchingEntitiesRequest { + r.namespace = &namespace + return r +} + +func (r ApiGetMatchingEntitiesRequest) Execute() (*http.Response, error) { + return r.ApiService.GetMatchingEntitiesExecute(r) +} + +/* +GetMatchingEntities Method for GetMatchingEntities + +Get a list of entities that match the specified prefix. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param prefix + @return ApiGetMatchingEntitiesRequest +*/ +func (a *SearchAPIService) GetMatchingEntities(ctx context.Context, prefix string) ApiGetMatchingEntitiesRequest { + return ApiGetMatchingEntitiesRequest{ + ApiService: a, + ctx: ctx, + prefix: prefix, + } +} + +// Execute executes the request +func (a *SearchAPIService) GetMatchingEntitiesExecute(r ApiGetMatchingEntitiesRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SearchAPIService.GetMatchingEntities") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/entities/{prefix}" + localVarPath = strings.Replace(localVarPath, "{"+"prefix"+"}", url.PathEscape(parameterValueToString(r.prefix, "prefix")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.includeOrgs != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "includeOrgs", r.includeOrgs, "") + } + if r.includeTeams != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "includeTeams", r.includeTeams, "") + } + if r.namespace != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "namespace", r.namespace, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/api_superuser.go b/quay_api/api_superuser.go new file mode 100644 index 0000000..ab1dd76 --- /dev/null +++ b/quay_api/api_superuser.go @@ -0,0 +1,3170 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// SuperuserAPIService SuperuserAPI service +type SuperuserAPIService service + +type ApiApproveServiceKeyRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + kid string + body *ApproveServiceKey +} + +// Request body contents. +func (r ApiApproveServiceKeyRequest) Body(body ApproveServiceKey) ApiApproveServiceKeyRequest { + r.body = &body + return r +} + +func (r ApiApproveServiceKeyRequest) Execute() (*http.Response, error) { + return r.ApiService.ApproveServiceKeyExecute(r) +} + +/* +ApproveServiceKey Method for ApproveServiceKey + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param kid The unique identifier for a service key + @return ApiApproveServiceKeyRequest +*/ +func (a *SuperuserAPIService) ApproveServiceKey(ctx context.Context, kid string) ApiApproveServiceKeyRequest { + return ApiApproveServiceKeyRequest{ + ApiService: a, + ctx: ctx, + kid: kid, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) ApproveServiceKeyExecute(r ApiApproveServiceKeyRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.ApproveServiceKey") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/approvedkeys/{kid}" + localVarPath = strings.Replace(localVarPath, "{"+"kid"+"}", url.PathEscape(parameterValueToString(r.kid, "kid")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiChangeOrganizationRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + name string + body *UpdateOrg +} + +// Request body contents. +func (r ApiChangeOrganizationRequest) Body(body UpdateOrg) ApiChangeOrganizationRequest { + r.body = &body + return r +} + +func (r ApiChangeOrganizationRequest) Execute() (*http.Response, error) { + return r.ApiService.ChangeOrganizationExecute(r) +} + +/* +ChangeOrganization Method for ChangeOrganization + +Updates information about the specified user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name The name of the organizaton being managed + @return ApiChangeOrganizationRequest +*/ +func (a *SuperuserAPIService) ChangeOrganization(ctx context.Context, name string) ApiChangeOrganizationRequest { + return ApiChangeOrganizationRequest{ + ApiService: a, + ctx: ctx, + name: name, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) ChangeOrganizationExecute(r ApiChangeOrganizationRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.ChangeOrganization") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/organizations/{name}" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", url.PathEscape(parameterValueToString(r.name, "name")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiChangeOrganizationQuotaSuperUserRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + quotaId string + namespace string + body *UpdateNamespaceQuota +} + +// Request body contents. +func (r ApiChangeOrganizationQuotaSuperUserRequest) Body(body UpdateNamespaceQuota) ApiChangeOrganizationQuotaSuperUserRequest { + r.body = &body + return r +} + +func (r ApiChangeOrganizationQuotaSuperUserRequest) Execute() (*http.Response, error) { + return r.ApiService.ChangeOrganizationQuotaSuperUserExecute(r) +} + +/* +ChangeOrganizationQuotaSuperUser Method for ChangeOrganizationQuotaSuperUser + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param quotaId + @param namespace + @return ApiChangeOrganizationQuotaSuperUserRequest +*/ +func (a *SuperuserAPIService) ChangeOrganizationQuotaSuperUser(ctx context.Context, quotaId string, namespace string) ApiChangeOrganizationQuotaSuperUserRequest { + return ApiChangeOrganizationQuotaSuperUserRequest{ + ApiService: a, + ctx: ctx, + quotaId: quotaId, + namespace: namespace, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) ChangeOrganizationQuotaSuperUserExecute(r ApiChangeOrganizationQuotaSuperUserRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.ChangeOrganizationQuotaSuperUser") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/organization/{namespace}/quota/{quota_id}" + localVarPath = strings.Replace(localVarPath, "{"+"quota_id"+"}", url.PathEscape(parameterValueToString(r.quotaId, "quotaId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", url.PathEscape(parameterValueToString(r.namespace, "namespace")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiChangeUserQuotaSuperUserRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + quotaId string + namespace string + body *UpdateNamespaceQuota +} + +// Request body contents. +func (r ApiChangeUserQuotaSuperUserRequest) Body(body UpdateNamespaceQuota) ApiChangeUserQuotaSuperUserRequest { + r.body = &body + return r +} + +func (r ApiChangeUserQuotaSuperUserRequest) Execute() (*http.Response, error) { + return r.ApiService.ChangeUserQuotaSuperUserExecute(r) +} + +/* +ChangeUserQuotaSuperUser Method for ChangeUserQuotaSuperUser + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param quotaId + @param namespace + @return ApiChangeUserQuotaSuperUserRequest +*/ +func (a *SuperuserAPIService) ChangeUserQuotaSuperUser(ctx context.Context, quotaId string, namespace string) ApiChangeUserQuotaSuperUserRequest { + return ApiChangeUserQuotaSuperUserRequest{ + ApiService: a, + ctx: ctx, + quotaId: quotaId, + namespace: namespace, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) ChangeUserQuotaSuperUserExecute(r ApiChangeUserQuotaSuperUserRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.ChangeUserQuotaSuperUser") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/users/{namespace}/quota/{quota_id}" + localVarPath = strings.Replace(localVarPath, "{"+"quota_id"+"}", url.PathEscape(parameterValueToString(r.quotaId, "quotaId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", url.PathEscape(parameterValueToString(r.namespace, "namespace")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiCreateInstallUserRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + body *CreateInstallUser +} + +// Request body contents. +func (r ApiCreateInstallUserRequest) Body(body CreateInstallUser) ApiCreateInstallUserRequest { + r.body = &body + return r +} + +func (r ApiCreateInstallUserRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateInstallUserExecute(r) +} + +/* +CreateInstallUser Method for CreateInstallUser + +Creates a new user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateInstallUserRequest +*/ +func (a *SuperuserAPIService) CreateInstallUser(ctx context.Context) ApiCreateInstallUserRequest { + return ApiCreateInstallUserRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) CreateInstallUserExecute(r ApiCreateInstallUserRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.CreateInstallUser") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/users/" + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiCreateOrganizationQuotaSuperUserRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + namespace string + body *NewNamespaceQuota +} + +// Request body contents. +func (r ApiCreateOrganizationQuotaSuperUserRequest) Body(body NewNamespaceQuota) ApiCreateOrganizationQuotaSuperUserRequest { + r.body = &body + return r +} + +func (r ApiCreateOrganizationQuotaSuperUserRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateOrganizationQuotaSuperUserExecute(r) +} + +/* +CreateOrganizationQuotaSuperUser Method for CreateOrganizationQuotaSuperUser + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param namespace + @return ApiCreateOrganizationQuotaSuperUserRequest +*/ +func (a *SuperuserAPIService) CreateOrganizationQuotaSuperUser(ctx context.Context, namespace string) ApiCreateOrganizationQuotaSuperUserRequest { + return ApiCreateOrganizationQuotaSuperUserRequest{ + ApiService: a, + ctx: ctx, + namespace: namespace, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) CreateOrganizationQuotaSuperUserExecute(r ApiCreateOrganizationQuotaSuperUserRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.CreateOrganizationQuotaSuperUser") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/organization/{namespace}/quota" + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", url.PathEscape(parameterValueToString(r.namespace, "namespace")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiCreateServiceKeyRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + body *CreateServiceKey +} + +// Request body contents. +func (r ApiCreateServiceKeyRequest) Body(body CreateServiceKey) ApiCreateServiceKeyRequest { + r.body = &body + return r +} + +func (r ApiCreateServiceKeyRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateServiceKeyExecute(r) +} + +/* +CreateServiceKey Method for CreateServiceKey + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateServiceKeyRequest +*/ +func (a *SuperuserAPIService) CreateServiceKey(ctx context.Context) ApiCreateServiceKeyRequest { + return ApiCreateServiceKeyRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) CreateServiceKeyExecute(r ApiCreateServiceKeyRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.CreateServiceKey") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/keys" + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiCreateUserQuotaSuperUserRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + namespace string + body *NewNamespaceQuota +} + +// Request body contents. +func (r ApiCreateUserQuotaSuperUserRequest) Body(body NewNamespaceQuota) ApiCreateUserQuotaSuperUserRequest { + r.body = &body + return r +} + +func (r ApiCreateUserQuotaSuperUserRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateUserQuotaSuperUserExecute(r) +} + +/* +CreateUserQuotaSuperUser Method for CreateUserQuotaSuperUser + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param namespace + @return ApiCreateUserQuotaSuperUserRequest +*/ +func (a *SuperuserAPIService) CreateUserQuotaSuperUser(ctx context.Context, namespace string) ApiCreateUserQuotaSuperUserRequest { + return ApiCreateUserQuotaSuperUserRequest{ + ApiService: a, + ctx: ctx, + namespace: namespace, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) CreateUserQuotaSuperUserExecute(r ApiCreateUserQuotaSuperUserRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.CreateUserQuotaSuperUser") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/users/{namespace}/quota" + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", url.PathEscape(parameterValueToString(r.namespace, "namespace")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteOrganizationRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + name string +} + +func (r ApiDeleteOrganizationRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteOrganizationExecute(r) +} + +/* +DeleteOrganization Method for DeleteOrganization + +Deletes the specified organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param name The name of the organizaton being managed + @return ApiDeleteOrganizationRequest +*/ +func (a *SuperuserAPIService) DeleteOrganization(ctx context.Context, name string) ApiDeleteOrganizationRequest { + return ApiDeleteOrganizationRequest{ + ApiService: a, + ctx: ctx, + name: name, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) DeleteOrganizationExecute(r ApiDeleteOrganizationRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.DeleteOrganization") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/organizations/{name}" + localVarPath = strings.Replace(localVarPath, "{"+"name"+"}", url.PathEscape(parameterValueToString(r.name, "name")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteOrganizationQuotaSuperUserRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + quotaId string + namespace string +} + +func (r ApiDeleteOrganizationQuotaSuperUserRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteOrganizationQuotaSuperUserExecute(r) +} + +/* +DeleteOrganizationQuotaSuperUser Method for DeleteOrganizationQuotaSuperUser + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param quotaId + @param namespace + @return ApiDeleteOrganizationQuotaSuperUserRequest +*/ +func (a *SuperuserAPIService) DeleteOrganizationQuotaSuperUser(ctx context.Context, quotaId string, namespace string) ApiDeleteOrganizationQuotaSuperUserRequest { + return ApiDeleteOrganizationQuotaSuperUserRequest{ + ApiService: a, + ctx: ctx, + quotaId: quotaId, + namespace: namespace, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) DeleteOrganizationQuotaSuperUserExecute(r ApiDeleteOrganizationQuotaSuperUserRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.DeleteOrganizationQuotaSuperUser") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/organization/{namespace}/quota/{quota_id}" + localVarPath = strings.Replace(localVarPath, "{"+"quota_id"+"}", url.PathEscape(parameterValueToString(r.quotaId, "quotaId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", url.PathEscape(parameterValueToString(r.namespace, "namespace")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteServiceKeyRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + kid string +} + +func (r ApiDeleteServiceKeyRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteServiceKeyExecute(r) +} + +/* +DeleteServiceKey Method for DeleteServiceKey + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param kid The unique identifier for a service key + @return ApiDeleteServiceKeyRequest +*/ +func (a *SuperuserAPIService) DeleteServiceKey(ctx context.Context, kid string) ApiDeleteServiceKeyRequest { + return ApiDeleteServiceKeyRequest{ + ApiService: a, + ctx: ctx, + kid: kid, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) DeleteServiceKeyExecute(r ApiDeleteServiceKeyRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.DeleteServiceKey") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/keys/{kid}" + localVarPath = strings.Replace(localVarPath, "{"+"kid"+"}", url.PathEscape(parameterValueToString(r.kid, "kid")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteUserQuotaSuperUserRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + quotaId string + namespace string +} + +func (r ApiDeleteUserQuotaSuperUserRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteUserQuotaSuperUserExecute(r) +} + +/* +DeleteUserQuotaSuperUser Method for DeleteUserQuotaSuperUser + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param quotaId + @param namespace + @return ApiDeleteUserQuotaSuperUserRequest +*/ +func (a *SuperuserAPIService) DeleteUserQuotaSuperUser(ctx context.Context, quotaId string, namespace string) ApiDeleteUserQuotaSuperUserRequest { + return ApiDeleteUserQuotaSuperUserRequest{ + ApiService: a, + ctx: ctx, + quotaId: quotaId, + namespace: namespace, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) DeleteUserQuotaSuperUserExecute(r ApiDeleteUserQuotaSuperUserRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.DeleteUserQuotaSuperUser") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/users/{namespace}/quota/{quota_id}" + localVarPath = strings.Replace(localVarPath, "{"+"quota_id"+"}", url.PathEscape(parameterValueToString(r.quotaId, "quotaId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", url.PathEscape(parameterValueToString(r.namespace, "namespace")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetRepoBuildLogsSuperUserRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + buildUuid string +} + +func (r ApiGetRepoBuildLogsSuperUserRequest) Execute() (*http.Response, error) { + return r.ApiService.GetRepoBuildLogsSuperUserExecute(r) +} + +/* +GetRepoBuildLogsSuperUser Method for GetRepoBuildLogsSuperUser + +Return the build logs for the build specified by the build uuid. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param buildUuid The UUID of the build + @return ApiGetRepoBuildLogsSuperUserRequest +*/ +func (a *SuperuserAPIService) GetRepoBuildLogsSuperUser(ctx context.Context, buildUuid string) ApiGetRepoBuildLogsSuperUserRequest { + return ApiGetRepoBuildLogsSuperUserRequest{ + ApiService: a, + ctx: ctx, + buildUuid: buildUuid, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) GetRepoBuildLogsSuperUserExecute(r ApiGetRepoBuildLogsSuperUserRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.GetRepoBuildLogsSuperUser") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/{build_uuid}/logs" + localVarPath = strings.Replace(localVarPath, "{"+"build_uuid"+"}", url.PathEscape(parameterValueToString(r.buildUuid, "buildUuid")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetRepoBuildStatusSuperUserRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + repository string + buildUuid string +} + +func (r ApiGetRepoBuildStatusSuperUserRequest) Execute() (*http.Response, error) { + return r.ApiService.GetRepoBuildStatusSuperUserExecute(r) +} + +/* +GetRepoBuildStatusSuperUser Method for GetRepoBuildStatusSuperUser + +Return the status for the builds specified by the build uuids. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @param buildUuid The UUID of the build + @return ApiGetRepoBuildStatusSuperUserRequest +*/ +func (a *SuperuserAPIService) GetRepoBuildStatusSuperUser(ctx context.Context, repository string, buildUuid string) ApiGetRepoBuildStatusSuperUserRequest { + return ApiGetRepoBuildStatusSuperUserRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + buildUuid: buildUuid, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) GetRepoBuildStatusSuperUserExecute(r ApiGetRepoBuildStatusSuperUserRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.GetRepoBuildStatusSuperUser") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/{build_uuid}/status" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"build_uuid"+"}", url.PathEscape(parameterValueToString(r.buildUuid, "buildUuid")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetRepoBuildSuperUserRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + repository string + buildUuid string +} + +func (r ApiGetRepoBuildSuperUserRequest) Execute() (*http.Response, error) { + return r.ApiService.GetRepoBuildSuperUserExecute(r) +} + +/* +GetRepoBuildSuperUser Method for GetRepoBuildSuperUser + +Returns information about a build. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @param buildUuid The UUID of the build + @return ApiGetRepoBuildSuperUserRequest +*/ +func (a *SuperuserAPIService) GetRepoBuildSuperUser(ctx context.Context, repository string, buildUuid string) ApiGetRepoBuildSuperUserRequest { + return ApiGetRepoBuildSuperUserRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + buildUuid: buildUuid, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) GetRepoBuildSuperUserExecute(r ApiGetRepoBuildSuperUserRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.GetRepoBuildSuperUser") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/{build_uuid}/build" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"build_uuid"+"}", url.PathEscape(parameterValueToString(r.buildUuid, "buildUuid")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetServiceKeyRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + kid string +} + +func (r ApiGetServiceKeyRequest) Execute() (*http.Response, error) { + return r.ApiService.GetServiceKeyExecute(r) +} + +/* +GetServiceKey Method for GetServiceKey + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param kid The unique identifier for a service key + @return ApiGetServiceKeyRequest +*/ +func (a *SuperuserAPIService) GetServiceKey(ctx context.Context, kid string) ApiGetServiceKeyRequest { + return ApiGetServiceKeyRequest{ + ApiService: a, + ctx: ctx, + kid: kid, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) GetServiceKeyExecute(r ApiGetServiceKeyRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.GetServiceKey") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/keys/{kid}" + localVarPath = strings.Replace(localVarPath, "{"+"kid"+"}", url.PathEscape(parameterValueToString(r.kid, "kid")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListAllLogsRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + nextPage *string + page *int32 + endtime *string + starttime *string +} + +// The page token for the next page +func (r ApiListAllLogsRequest) NextPage(nextPage string) ApiListAllLogsRequest { + r.nextPage = &nextPage + return r +} + +// The page number for the logs +func (r ApiListAllLogsRequest) Page(page int32) ApiListAllLogsRequest { + r.page = &page + return r +} + +// Latest time to which to get logs (%m/%d/%Y %Z) +func (r ApiListAllLogsRequest) Endtime(endtime string) ApiListAllLogsRequest { + r.endtime = &endtime + return r +} + +// Earliest time from which to get logs (%m/%d/%Y %Z) +func (r ApiListAllLogsRequest) Starttime(starttime string) ApiListAllLogsRequest { + r.starttime = &starttime + return r +} + +func (r ApiListAllLogsRequest) Execute() (*http.Response, error) { + return r.ApiService.ListAllLogsExecute(r) +} + +/* +ListAllLogs Method for ListAllLogs + +List the usage logs for the current system. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListAllLogsRequest +*/ +func (a *SuperuserAPIService) ListAllLogs(ctx context.Context) ApiListAllLogsRequest { + return ApiListAllLogsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) ListAllLogsExecute(r ApiListAllLogsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.ListAllLogs") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/logs" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.nextPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "next_page", r.nextPage, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.endtime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "endtime", r.endtime, "") + } + if r.starttime != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "starttime", r.starttime, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListAllUsersRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + nextPage *string + limit *int32 + disabled *bool +} + +// The page token for the next page +func (r ApiListAllUsersRequest) NextPage(nextPage string) ApiListAllUsersRequest { + r.nextPage = &nextPage + return r +} + +// Limit to the number of results to return per page. Max 100. +func (r ApiListAllUsersRequest) Limit(limit int32) ApiListAllUsersRequest { + r.limit = &limit + return r +} + +// If false, only enabled users will be returned. +func (r ApiListAllUsersRequest) Disabled(disabled bool) ApiListAllUsersRequest { + r.disabled = &disabled + return r +} + +func (r ApiListAllUsersRequest) Execute() (*http.Response, error) { + return r.ApiService.ListAllUsersExecute(r) +} + +/* +ListAllUsers Method for ListAllUsers + +Returns a list of all users in the system. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListAllUsersRequest +*/ +func (a *SuperuserAPIService) ListAllUsers(ctx context.Context) ApiListAllUsersRequest { + return ApiListAllUsersRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) ListAllUsersExecute(r ApiListAllUsersRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.ListAllUsers") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/users/" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.nextPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "next_page", r.nextPage, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.disabled != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "disabled", r.disabled, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListOrganizationQuotaSuperUserRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + namespace string +} + +func (r ApiListOrganizationQuotaSuperUserRequest) Execute() (*http.Response, error) { + return r.ApiService.ListOrganizationQuotaSuperUserExecute(r) +} + +/* +ListOrganizationQuotaSuperUser Method for ListOrganizationQuotaSuperUser + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param namespace + @return ApiListOrganizationQuotaSuperUserRequest +*/ +func (a *SuperuserAPIService) ListOrganizationQuotaSuperUser(ctx context.Context, namespace string) ApiListOrganizationQuotaSuperUserRequest { + return ApiListOrganizationQuotaSuperUserRequest{ + ApiService: a, + ctx: ctx, + namespace: namespace, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) ListOrganizationQuotaSuperUserExecute(r ApiListOrganizationQuotaSuperUserRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.ListOrganizationQuotaSuperUser") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/organization/{namespace}/quota" + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", url.PathEscape(parameterValueToString(r.namespace, "namespace")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListServiceKeysRequest struct { + ctx context.Context + ApiService *SuperuserAPIService +} + +func (r ApiListServiceKeysRequest) Execute() (*http.Response, error) { + return r.ApiService.ListServiceKeysExecute(r) +} + +/* +ListServiceKeys Method for ListServiceKeys + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListServiceKeysRequest +*/ +func (a *SuperuserAPIService) ListServiceKeys(ctx context.Context) ApiListServiceKeysRequest { + return ApiListServiceKeysRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) ListServiceKeysExecute(r ApiListServiceKeysRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.ListServiceKeys") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/keys" + + 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListUserQuotaSuperUserRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + namespace string +} + +func (r ApiListUserQuotaSuperUserRequest) Execute() (*http.Response, error) { + return r.ApiService.ListUserQuotaSuperUserExecute(r) +} + +/* +ListUserQuotaSuperUser Method for ListUserQuotaSuperUser + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param namespace + @return ApiListUserQuotaSuperUserRequest +*/ +func (a *SuperuserAPIService) ListUserQuotaSuperUser(ctx context.Context, namespace string) ApiListUserQuotaSuperUserRequest { + return ApiListUserQuotaSuperUserRequest{ + ApiService: a, + ctx: ctx, + namespace: namespace, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) ListUserQuotaSuperUserExecute(r ApiListUserQuotaSuperUserRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.ListUserQuotaSuperUser") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/users/{namespace}/quota" + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", url.PathEscape(parameterValueToString(r.namespace, "namespace")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiUpdateServiceKeyRequest struct { + ctx context.Context + ApiService *SuperuserAPIService + kid string + body *PutServiceKey +} + +// Request body contents. +func (r ApiUpdateServiceKeyRequest) Body(body PutServiceKey) ApiUpdateServiceKeyRequest { + r.body = &body + return r +} + +func (r ApiUpdateServiceKeyRequest) Execute() (*http.Response, error) { + return r.ApiService.UpdateServiceKeyExecute(r) +} + +/* +UpdateServiceKey Method for UpdateServiceKey + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param kid The unique identifier for a service key + @return ApiUpdateServiceKeyRequest +*/ +func (a *SuperuserAPIService) UpdateServiceKey(ctx context.Context, kid string) ApiUpdateServiceKeyRequest { + return ApiUpdateServiceKeyRequest{ + ApiService: a, + ctx: ctx, + kid: kid, + } +} + +// Execute executes the request +func (a *SuperuserAPIService) UpdateServiceKeyExecute(r ApiUpdateServiceKeyRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SuperuserAPIService.UpdateServiceKey") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/superuser/keys/{kid}" + localVarPath = strings.Replace(localVarPath, "{"+"kid"+"}", url.PathEscape(parameterValueToString(r.kid, "kid")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/api_tag.go b/quay_api/api_tag.go new file mode 100644 index 0000000..67d9c7d --- /dev/null +++ b/quay_api/api_tag.go @@ -0,0 +1,652 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// TagAPIService TagAPI service +type TagAPIService service + +type ApiChangeTagRequest struct { + ctx context.Context + ApiService *TagAPIService + repository string + tag string + body *map[string]interface{} +} + +// Request body contents. +func (r ApiChangeTagRequest) Body(body map[string]interface{}) ApiChangeTagRequest { + r.body = &body + return r +} + +func (r ApiChangeTagRequest) Execute() (*http.Response, error) { + return r.ApiService.ChangeTagExecute(r) +} + +/* +ChangeTag Method for ChangeTag + +Change which image a tag points to or create a new tag. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @param tag The name of the tag + @return ApiChangeTagRequest +*/ +func (a *TagAPIService) ChangeTag(ctx context.Context, repository string, tag string) ApiChangeTagRequest { + return ApiChangeTagRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + tag: tag, + } +} + +// Execute executes the request +func (a *TagAPIService) ChangeTagExecute(r ApiChangeTagRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TagAPIService.ChangeTag") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/tag/{tag}" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"tag"+"}", url.PathEscape(parameterValueToString(r.tag, "tag")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteFullTagRequest struct { + ctx context.Context + ApiService *TagAPIService + repository string + tag string +} + +func (r ApiDeleteFullTagRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteFullTagExecute(r) +} + +/* +DeleteFullTag Method for DeleteFullTag + +Delete the specified repository tag. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @param tag The name of the tag + @return ApiDeleteFullTagRequest +*/ +func (a *TagAPIService) DeleteFullTag(ctx context.Context, repository string, tag string) ApiDeleteFullTagRequest { + return ApiDeleteFullTagRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + tag: tag, + } +} + +// Execute executes the request +func (a *TagAPIService) DeleteFullTagExecute(r ApiDeleteFullTagRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TagAPIService.DeleteFullTag") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/tag/{tag}" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"tag"+"}", url.PathEscape(parameterValueToString(r.tag, "tag")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListRepoTagsRequest struct { + ctx context.Context + ApiService *TagAPIService + repository string + onlyActiveTags *bool + page *int32 + limit *int32 + filterTagName *string + specificTag *string +} + +// Filter to only active tags. +func (r ApiListRepoTagsRequest) OnlyActiveTags(onlyActiveTags bool) ApiListRepoTagsRequest { + r.onlyActiveTags = &onlyActiveTags + return r +} + +// Page index for the results. Default 1. +func (r ApiListRepoTagsRequest) Page(page int32) ApiListRepoTagsRequest { + r.page = &page + return r +} + +// Limit to the number of results to return per page. Max 100. +func (r ApiListRepoTagsRequest) Limit(limit int32) ApiListRepoTagsRequest { + r.limit = &limit + return r +} + +// Syntax: <op>:<name> Filters the tag names based on the operation.<op> can be 'like' or 'eq'. +func (r ApiListRepoTagsRequest) FilterTagName(filterTagName string) ApiListRepoTagsRequest { + r.filterTagName = &filterTagName + return r +} + +// Filters the tags to the specific tag. +func (r ApiListRepoTagsRequest) SpecificTag(specificTag string) ApiListRepoTagsRequest { + r.specificTag = &specificTag + return r +} + +func (r ApiListRepoTagsRequest) Execute() (*http.Response, error) { + return r.ApiService.ListRepoTagsExecute(r) +} + +/* +ListRepoTags Method for ListRepoTags + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @return ApiListRepoTagsRequest +*/ +func (a *TagAPIService) ListRepoTags(ctx context.Context, repository string) ApiListRepoTagsRequest { + return ApiListRepoTagsRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +func (a *TagAPIService) ListRepoTagsExecute(r ApiListRepoTagsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TagAPIService.ListRepoTags") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/tag/" + 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.onlyActiveTags != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "onlyActiveTags", r.onlyActiveTags, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + if r.filterTagName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "filter_tag_name", r.filterTagName, "") + } + if r.specificTag != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "specificTag", r.specificTag, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRestoreTagRequest struct { + ctx context.Context + ApiService *TagAPIService + repository string + tag string + body *RestoreTag +} + +// Request body contents. +func (r ApiRestoreTagRequest) Body(body RestoreTag) ApiRestoreTagRequest { + r.body = &body + return r +} + +func (r ApiRestoreTagRequest) Execute() (*http.Response, error) { + return r.ApiService.RestoreTagExecute(r) +} + +/* +RestoreTag Method for RestoreTag + +Restores a repository tag back to a previous image in the repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @param tag The name of the tag + @return ApiRestoreTagRequest +*/ +func (a *TagAPIService) RestoreTag(ctx context.Context, repository string, tag string) ApiRestoreTagRequest { + return ApiRestoreTagRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + tag: tag, + } +} + +// Execute executes the request +func (a *TagAPIService) RestoreTagExecute(r ApiRestoreTagRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TagAPIService.RestoreTag") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/tag/{tag}/restore" + localVarPath = strings.Replace(localVarPath, "{"+"repository"+"}", url.PathEscape(parameterValueToString(r.repository, "repository")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"tag"+"}", url.PathEscape(parameterValueToString(r.tag, "tag")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/api_team.go b/quay_api/api_team.go new file mode 100644 index 0000000..6d37d7b --- /dev/null +++ b/quay_api/api_team.go @@ -0,0 +1,1460 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// TeamAPIService TeamAPI service +type TeamAPIService service + +type ApiDeleteOrganizationTeamRequest struct { + ctx context.Context + ApiService *TeamAPIService + orgname string + teamname string +} + +func (r ApiDeleteOrganizationTeamRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteOrganizationTeamExecute(r) +} + +/* +DeleteOrganizationTeam Method for DeleteOrganizationTeam + +Delete the specified team. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param teamname The name of the team + @return ApiDeleteOrganizationTeamRequest +*/ +func (a *TeamAPIService) DeleteOrganizationTeam(ctx context.Context, orgname string, teamname string) ApiDeleteOrganizationTeamRequest { + return ApiDeleteOrganizationTeamRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + teamname: teamname, + } +} + +// Execute executes the request +func (a *TeamAPIService) DeleteOrganizationTeamExecute(r ApiDeleteOrganizationTeamRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamAPIService.DeleteOrganizationTeam") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/team/{teamname}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"teamname"+"}", url.PathEscape(parameterValueToString(r.teamname, "teamname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteOrganizationTeamMemberRequest struct { + ctx context.Context + ApiService *TeamAPIService + orgname string + membername string + teamname string +} + +func (r ApiDeleteOrganizationTeamMemberRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteOrganizationTeamMemberExecute(r) +} + +/* +DeleteOrganizationTeamMember Method for DeleteOrganizationTeamMember + +Delete a member of a team. + + If the user is merely invited to join the team, then the invite is removed instead. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param membername The username of the team member + @param teamname The name of the team + @return ApiDeleteOrganizationTeamMemberRequest +*/ +func (a *TeamAPIService) DeleteOrganizationTeamMember(ctx context.Context, orgname string, membername string, teamname string) ApiDeleteOrganizationTeamMemberRequest { + return ApiDeleteOrganizationTeamMemberRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + membername: membername, + teamname: teamname, + } +} + +// Execute executes the request +func (a *TeamAPIService) DeleteOrganizationTeamMemberExecute(r ApiDeleteOrganizationTeamMemberRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamAPIService.DeleteOrganizationTeamMember") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/team/{teamname}/members/{membername}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"membername"+"}", url.PathEscape(parameterValueToString(r.membername, "membername")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"teamname"+"}", url.PathEscape(parameterValueToString(r.teamname, "teamname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteTeamMemberEmailInviteRequest struct { + ctx context.Context + ApiService *TeamAPIService + orgname string + email string + teamname string +} + +func (r ApiDeleteTeamMemberEmailInviteRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteTeamMemberEmailInviteExecute(r) +} + +/* +DeleteTeamMemberEmailInvite Method for DeleteTeamMemberEmailInvite + +Delete an invite of an email address to join a team. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname + @param email + @param teamname + @return ApiDeleteTeamMemberEmailInviteRequest +*/ +func (a *TeamAPIService) DeleteTeamMemberEmailInvite(ctx context.Context, orgname string, email string, teamname string) ApiDeleteTeamMemberEmailInviteRequest { + return ApiDeleteTeamMemberEmailInviteRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + email: email, + teamname: teamname, + } +} + +// Execute executes the request +func (a *TeamAPIService) DeleteTeamMemberEmailInviteExecute(r ApiDeleteTeamMemberEmailInviteRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamAPIService.DeleteTeamMemberEmailInvite") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/team/{teamname}/invite/{email}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"email"+"}", url.PathEscape(parameterValueToString(r.email, "email")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"teamname"+"}", url.PathEscape(parameterValueToString(r.teamname, "teamname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDisableOrganizationTeamSyncRequest struct { + ctx context.Context + ApiService *TeamAPIService + orgname string + teamname string +} + +func (r ApiDisableOrganizationTeamSyncRequest) Execute() (*http.Response, error) { + return r.ApiService.DisableOrganizationTeamSyncExecute(r) +} + +/* +DisableOrganizationTeamSync Method for DisableOrganizationTeamSync + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param teamname The name of the team + @return ApiDisableOrganizationTeamSyncRequest +*/ +func (a *TeamAPIService) DisableOrganizationTeamSync(ctx context.Context, orgname string, teamname string) ApiDisableOrganizationTeamSyncRequest { + return ApiDisableOrganizationTeamSyncRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + teamname: teamname, + } +} + +// Execute executes the request +func (a *TeamAPIService) DisableOrganizationTeamSyncExecute(r ApiDisableOrganizationTeamSyncRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamAPIService.DisableOrganizationTeamSync") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/team/{teamname}/syncing" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"teamname"+"}", url.PathEscape(parameterValueToString(r.teamname, "teamname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiEnableOrganizationTeamSyncRequest struct { + ctx context.Context + ApiService *TeamAPIService + orgname string + teamname string +} + +func (r ApiEnableOrganizationTeamSyncRequest) Execute() (*http.Response, error) { + return r.ApiService.EnableOrganizationTeamSyncExecute(r) +} + +/* +EnableOrganizationTeamSync Method for EnableOrganizationTeamSync + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param teamname The name of the team + @return ApiEnableOrganizationTeamSyncRequest +*/ +func (a *TeamAPIService) EnableOrganizationTeamSync(ctx context.Context, orgname string, teamname string) ApiEnableOrganizationTeamSyncRequest { + return ApiEnableOrganizationTeamSyncRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + teamname: teamname, + } +} + +// Execute executes the request +func (a *TeamAPIService) EnableOrganizationTeamSyncExecute(r ApiEnableOrganizationTeamSyncRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamAPIService.EnableOrganizationTeamSync") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/team/{teamname}/syncing" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"teamname"+"}", url.PathEscape(parameterValueToString(r.teamname, "teamname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetOrganizationTeamMembersRequest struct { + ctx context.Context + ApiService *TeamAPIService + orgname string + teamname string + includePending *bool +} + +// Whether to include pending members +func (r ApiGetOrganizationTeamMembersRequest) IncludePending(includePending bool) ApiGetOrganizationTeamMembersRequest { + r.includePending = &includePending + return r +} + +func (r ApiGetOrganizationTeamMembersRequest) Execute() (*http.Response, error) { + return r.ApiService.GetOrganizationTeamMembersExecute(r) +} + +/* +GetOrganizationTeamMembers Method for GetOrganizationTeamMembers + +Retrieve the list of members for the specified team. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param teamname The name of the team + @return ApiGetOrganizationTeamMembersRequest +*/ +func (a *TeamAPIService) GetOrganizationTeamMembers(ctx context.Context, orgname string, teamname string) ApiGetOrganizationTeamMembersRequest { + return ApiGetOrganizationTeamMembersRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + teamname: teamname, + } +} + +// Execute executes the request +func (a *TeamAPIService) GetOrganizationTeamMembersExecute(r ApiGetOrganizationTeamMembersRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamAPIService.GetOrganizationTeamMembers") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/team/{teamname}/members" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"teamname"+"}", url.PathEscape(parameterValueToString(r.teamname, "teamname")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.includePending != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "includePending", r.includePending, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetOrganizationTeamPermissionsRequest struct { + ctx context.Context + ApiService *TeamAPIService + orgname string + teamname string +} + +func (r ApiGetOrganizationTeamPermissionsRequest) Execute() (*http.Response, error) { + return r.ApiService.GetOrganizationTeamPermissionsExecute(r) +} + +/* +GetOrganizationTeamPermissions Method for GetOrganizationTeamPermissions + +Returns the list of repository permissions for the org's team. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param teamname The name of the team + @return ApiGetOrganizationTeamPermissionsRequest +*/ +func (a *TeamAPIService) GetOrganizationTeamPermissions(ctx context.Context, orgname string, teamname string) ApiGetOrganizationTeamPermissionsRequest { + return ApiGetOrganizationTeamPermissionsRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + teamname: teamname, + } +} + +// Execute executes the request +func (a *TeamAPIService) GetOrganizationTeamPermissionsExecute(r ApiGetOrganizationTeamPermissionsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamAPIService.GetOrganizationTeamPermissions") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/team/{teamname}/permissions" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"teamname"+"}", url.PathEscape(parameterValueToString(r.teamname, "teamname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiInviteTeamMemberEmailRequest struct { + ctx context.Context + ApiService *TeamAPIService + orgname string + email string + teamname string +} + +func (r ApiInviteTeamMemberEmailRequest) Execute() (*http.Response, error) { + return r.ApiService.InviteTeamMemberEmailExecute(r) +} + +/* +InviteTeamMemberEmail Method for InviteTeamMemberEmail + +Invites an email address to an existing team. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname + @param email + @param teamname + @return ApiInviteTeamMemberEmailRequest +*/ +func (a *TeamAPIService) InviteTeamMemberEmail(ctx context.Context, orgname string, email string, teamname string) ApiInviteTeamMemberEmailRequest { + return ApiInviteTeamMemberEmailRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + email: email, + teamname: teamname, + } +} + +// Execute executes the request +func (a *TeamAPIService) InviteTeamMemberEmailExecute(r ApiInviteTeamMemberEmailRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamAPIService.InviteTeamMemberEmail") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/team/{teamname}/invite/{email}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"email"+"}", url.PathEscape(parameterValueToString(r.email, "email")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"teamname"+"}", url.PathEscape(parameterValueToString(r.teamname, "teamname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiUpdateOrganizationTeamRequest struct { + ctx context.Context + ApiService *TeamAPIService + orgname string + teamname string + body *TeamDescription +} + +// Request body contents. +func (r ApiUpdateOrganizationTeamRequest) Body(body TeamDescription) ApiUpdateOrganizationTeamRequest { + r.body = &body + return r +} + +func (r ApiUpdateOrganizationTeamRequest) Execute() (*http.Response, error) { + return r.ApiService.UpdateOrganizationTeamExecute(r) +} + +/* +UpdateOrganizationTeam Method for UpdateOrganizationTeam + +Update the org-wide permission for the specified team. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param teamname The name of the team + @return ApiUpdateOrganizationTeamRequest +*/ +func (a *TeamAPIService) UpdateOrganizationTeam(ctx context.Context, orgname string, teamname string) ApiUpdateOrganizationTeamRequest { + return ApiUpdateOrganizationTeamRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + teamname: teamname, + } +} + +// Execute executes the request +func (a *TeamAPIService) UpdateOrganizationTeamExecute(r ApiUpdateOrganizationTeamRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamAPIService.UpdateOrganizationTeam") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/team/{teamname}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"teamname"+"}", url.PathEscape(parameterValueToString(r.teamname, "teamname")), -1) + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiUpdateOrganizationTeamMemberRequest struct { + ctx context.Context + ApiService *TeamAPIService + orgname string + membername string + teamname string +} + +func (r ApiUpdateOrganizationTeamMemberRequest) Execute() (*http.Response, error) { + return r.ApiService.UpdateOrganizationTeamMemberExecute(r) +} + +/* +UpdateOrganizationTeamMember Method for UpdateOrganizationTeamMember + +Adds or invites a member to an existing team. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param orgname The name of the organization + @param membername The username of the team member + @param teamname The name of the team + @return ApiUpdateOrganizationTeamMemberRequest +*/ +func (a *TeamAPIService) UpdateOrganizationTeamMember(ctx context.Context, orgname string, membername string, teamname string) ApiUpdateOrganizationTeamMemberRequest { + return ApiUpdateOrganizationTeamMemberRequest{ + ApiService: a, + ctx: ctx, + orgname: orgname, + membername: membername, + teamname: teamname, + } +} + +// Execute executes the request +func (a *TeamAPIService) UpdateOrganizationTeamMemberExecute(r ApiUpdateOrganizationTeamMemberRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TeamAPIService.UpdateOrganizationTeamMember") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/organization/{orgname}/team/{teamname}/members/{membername}" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", url.PathEscape(parameterValueToString(r.orgname, "orgname")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"membername"+"}", url.PathEscape(parameterValueToString(r.membername, "membername")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"teamname"+"}", url.PathEscape(parameterValueToString(r.teamname, "teamname")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/api_trigger.go b/quay_api/api_trigger.go new file mode 100644 index 0000000..3fe044b --- /dev/null +++ b/quay_api/api_trigger.go @@ -0,0 +1,1046 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// TriggerAPIService TriggerAPI service +type TriggerAPIService service + +type ApiActivateBuildTriggerRequest struct { + ctx context.Context + ApiService *TriggerAPIService + triggerUuid string + repository string + body *BuildTriggerActivateRequest +} + +// Request body contents. +func (r ApiActivateBuildTriggerRequest) Body(body BuildTriggerActivateRequest) ApiActivateBuildTriggerRequest { + r.body = &body + return r +} + +func (r ApiActivateBuildTriggerRequest) Execute() (*http.Response, error) { + return r.ApiService.ActivateBuildTriggerExecute(r) +} + +/* +ActivateBuildTrigger Method for ActivateBuildTrigger + +Activate the specified build trigger. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param triggerUuid The UUID of the build trigger + @param repository The full path of the repository. e.g. namespace/name + @return ApiActivateBuildTriggerRequest +*/ +func (a *TriggerAPIService) ActivateBuildTrigger(ctx context.Context, triggerUuid string, repository string) ApiActivateBuildTriggerRequest { + return ApiActivateBuildTriggerRequest{ + ApiService: a, + ctx: ctx, + triggerUuid: triggerUuid, + repository: repository, + } +} + +// Execute executes the request +func (a *TriggerAPIService) ActivateBuildTriggerExecute(r ApiActivateBuildTriggerRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TriggerAPIService.ActivateBuildTrigger") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/trigger/{trigger_uuid}/activate" + localVarPath = strings.Replace(localVarPath, "{"+"trigger_uuid"+"}", url.PathEscape(parameterValueToString(r.triggerUuid, "triggerUuid")), -1) + 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.body == nil { + return nil, reportError("body is required and must be specified") + } + + // 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 + } + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteBuildTriggerRequest struct { + ctx context.Context + ApiService *TriggerAPIService + triggerUuid string + repository string +} + +func (r ApiDeleteBuildTriggerRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteBuildTriggerExecute(r) +} + +/* +DeleteBuildTrigger Method for DeleteBuildTrigger + +Delete the specified build trigger. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param triggerUuid The UUID of the build trigger + @param repository The full path of the repository. e.g. namespace/name + @return ApiDeleteBuildTriggerRequest +*/ +func (a *TriggerAPIService) DeleteBuildTrigger(ctx context.Context, triggerUuid string, repository string) ApiDeleteBuildTriggerRequest { + return ApiDeleteBuildTriggerRequest{ + ApiService: a, + ctx: ctx, + triggerUuid: triggerUuid, + repository: repository, + } +} + +// Execute executes the request +func (a *TriggerAPIService) DeleteBuildTriggerExecute(r ApiDeleteBuildTriggerRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TriggerAPIService.DeleteBuildTrigger") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/trigger/{trigger_uuid}" + localVarPath = strings.Replace(localVarPath, "{"+"trigger_uuid"+"}", url.PathEscape(parameterValueToString(r.triggerUuid, "triggerUuid")), -1) + 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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetBuildTriggerRequest struct { + ctx context.Context + ApiService *TriggerAPIService + triggerUuid string + repository string +} + +func (r ApiGetBuildTriggerRequest) Execute() (*http.Response, error) { + return r.ApiService.GetBuildTriggerExecute(r) +} + +/* +GetBuildTrigger Method for GetBuildTrigger + +Get information for the specified build trigger. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param triggerUuid The UUID of the build trigger + @param repository The full path of the repository. e.g. namespace/name + @return ApiGetBuildTriggerRequest +*/ +func (a *TriggerAPIService) GetBuildTrigger(ctx context.Context, triggerUuid string, repository string) ApiGetBuildTriggerRequest { + return ApiGetBuildTriggerRequest{ + ApiService: a, + ctx: ctx, + triggerUuid: triggerUuid, + repository: repository, + } +} + +// Execute executes the request +func (a *TriggerAPIService) GetBuildTriggerExecute(r ApiGetBuildTriggerRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TriggerAPIService.GetBuildTrigger") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/trigger/{trigger_uuid}" + localVarPath = strings.Replace(localVarPath, "{"+"trigger_uuid"+"}", url.PathEscape(parameterValueToString(r.triggerUuid, "triggerUuid")), -1) + 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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListBuildTriggersRequest struct { + ctx context.Context + ApiService *TriggerAPIService + repository string +} + +func (r ApiListBuildTriggersRequest) Execute() (*http.Response, error) { + return r.ApiService.ListBuildTriggersExecute(r) +} + +/* +ListBuildTriggers Method for ListBuildTriggers + +List the triggers for the specified repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @return ApiListBuildTriggersRequest +*/ +func (a *TriggerAPIService) ListBuildTriggers(ctx context.Context, repository string) ApiListBuildTriggersRequest { + return ApiListBuildTriggersRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +func (a *TriggerAPIService) ListBuildTriggersExecute(r ApiListBuildTriggersRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TriggerAPIService.ListBuildTriggers") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/trigger/" + 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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListTriggerRecentBuildsRequest struct { + ctx context.Context + ApiService *TriggerAPIService + triggerUuid string + repository string + limit *int32 +} + +// The maximum number of builds to return +func (r ApiListTriggerRecentBuildsRequest) Limit(limit int32) ApiListTriggerRecentBuildsRequest { + r.limit = &limit + return r +} + +func (r ApiListTriggerRecentBuildsRequest) Execute() (*http.Response, error) { + return r.ApiService.ListTriggerRecentBuildsExecute(r) +} + +/* +ListTriggerRecentBuilds Method for ListTriggerRecentBuilds + +List the builds started by the specified trigger. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param triggerUuid The UUID of the build trigger + @param repository The full path of the repository. e.g. namespace/name + @return ApiListTriggerRecentBuildsRequest +*/ +func (a *TriggerAPIService) ListTriggerRecentBuilds(ctx context.Context, triggerUuid string, repository string) ApiListTriggerRecentBuildsRequest { + return ApiListTriggerRecentBuildsRequest{ + ApiService: a, + ctx: ctx, + triggerUuid: triggerUuid, + repository: repository, + } +} + +// Execute executes the request +func (a *TriggerAPIService) ListTriggerRecentBuildsExecute(r ApiListTriggerRecentBuildsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TriggerAPIService.ListTriggerRecentBuilds") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/trigger/{trigger_uuid}/builds" + localVarPath = strings.Replace(localVarPath, "{"+"trigger_uuid"+"}", url.PathEscape(parameterValueToString(r.triggerUuid, "triggerUuid")), -1) + 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.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiManuallyStartBuildTriggerRequest struct { + ctx context.Context + ApiService *TriggerAPIService + triggerUuid string + repository string + body *RunParameters +} + +// Request body contents. +func (r ApiManuallyStartBuildTriggerRequest) Body(body RunParameters) ApiManuallyStartBuildTriggerRequest { + r.body = &body + return r +} + +func (r ApiManuallyStartBuildTriggerRequest) Execute() (*http.Response, error) { + return r.ApiService.ManuallyStartBuildTriggerExecute(r) +} + +/* +ManuallyStartBuildTrigger Method for ManuallyStartBuildTrigger + +Manually start a build from the specified trigger. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param triggerUuid The UUID of the build trigger + @param repository The full path of the repository. e.g. namespace/name + @return ApiManuallyStartBuildTriggerRequest +*/ +func (a *TriggerAPIService) ManuallyStartBuildTrigger(ctx context.Context, triggerUuid string, repository string) ApiManuallyStartBuildTriggerRequest { + return ApiManuallyStartBuildTriggerRequest{ + ApiService: a, + ctx: ctx, + triggerUuid: triggerUuid, + repository: repository, + } +} + +// Execute executes the request +func (a *TriggerAPIService) ManuallyStartBuildTriggerExecute(r ApiManuallyStartBuildTriggerRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TriggerAPIService.ManuallyStartBuildTrigger") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/trigger/{trigger_uuid}/start" + localVarPath = strings.Replace(localVarPath, "{"+"trigger_uuid"+"}", url.PathEscape(parameterValueToString(r.triggerUuid, "triggerUuid")), -1) + 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.body == nil { + return nil, reportError("body is required and must be specified") + } + + // 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 + } + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiUpdateBuildTriggerRequest struct { + ctx context.Context + ApiService *TriggerAPIService + triggerUuid string + repository string + body *UpdateTrigger +} + +// Request body contents. +func (r ApiUpdateBuildTriggerRequest) Body(body UpdateTrigger) ApiUpdateBuildTriggerRequest { + r.body = &body + return r +} + +func (r ApiUpdateBuildTriggerRequest) Execute() (*http.Response, error) { + return r.ApiService.UpdateBuildTriggerExecute(r) +} + +/* +UpdateBuildTrigger Method for UpdateBuildTrigger + +Updates the specified build trigger. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param triggerUuid The UUID of the build trigger + @param repository The full path of the repository. e.g. namespace/name + @return ApiUpdateBuildTriggerRequest +*/ +func (a *TriggerAPIService) UpdateBuildTrigger(ctx context.Context, triggerUuid string, repository string) ApiUpdateBuildTriggerRequest { + return ApiUpdateBuildTriggerRequest{ + ApiService: a, + ctx: ctx, + triggerUuid: triggerUuid, + repository: repository, + } +} + +// Execute executes the request +func (a *TriggerAPIService) UpdateBuildTriggerExecute(r ApiUpdateBuildTriggerRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TriggerAPIService.UpdateBuildTrigger") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/repository/{repository}/trigger/{trigger_uuid}" + localVarPath = strings.Replace(localVarPath, "{"+"trigger_uuid"+"}", url.PathEscape(parameterValueToString(r.triggerUuid, "triggerUuid")), -1) + 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.body == nil { + return nil, reportError("body is required and must be specified") + } + + // 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 + } + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/api_user.go b/quay_api/api_user.go new file mode 100644 index 0000000..d52b95c --- /dev/null +++ b/quay_api/api_user.go @@ -0,0 +1,726 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + +// UserAPIService UserAPI service +type UserAPIService service + +type ApiCreateStarRequest struct { + ctx context.Context + ApiService *UserAPIService + body *NewStarredRepository +} + +// Request body contents. +func (r ApiCreateStarRequest) Body(body NewStarredRepository) ApiCreateStarRequest { + r.body = &body + return r +} + +func (r ApiCreateStarRequest) Execute() (*http.Response, error) { + return r.ApiService.CreateStarExecute(r) +} + +/* +CreateStar Method for CreateStar + +Star a repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateStarRequest +*/ +func (a *UserAPIService) CreateStar(ctx context.Context) ApiCreateStarRequest { + return ApiCreateStarRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *UserAPIService) CreateStarExecute(r ApiCreateStarRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.CreateStar") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/starred" + + 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{} + + // 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteStarRequest struct { + ctx context.Context + ApiService *UserAPIService + repository string +} + +func (r ApiDeleteStarRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteStarExecute(r) +} + +/* +DeleteStar Method for DeleteStar + +Removes a star from a repository. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param repository The full path of the repository. e.g. namespace/name + @return ApiDeleteStarRequest +*/ +func (a *UserAPIService) DeleteStar(ctx context.Context, repository string) ApiDeleteStarRequest { + return ApiDeleteStarRequest{ + ApiService: a, + ctx: ctx, + repository: repository, + } +} + +// Execute executes the request +func (a *UserAPIService) DeleteStarExecute(r ApiDeleteStarRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.DeleteStar") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/starred/{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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetLoggedInUserRequest struct { + ctx context.Context + ApiService *UserAPIService +} + +func (r ApiGetLoggedInUserRequest) Execute() (*UserView, *http.Response, error) { + return r.ApiService.GetLoggedInUserExecute(r) +} + +/* +GetLoggedInUser Method for GetLoggedInUser + +Get user information for the authenticated user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetLoggedInUserRequest +*/ +func (a *UserAPIService) GetLoggedInUser(ctx context.Context) ApiGetLoggedInUserRequest { + return ApiGetLoggedInUserRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return UserView +func (a *UserAPIService) GetLoggedInUserExecute(r ApiGetLoggedInUserRequest) (*UserView, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserView + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.GetLoggedInUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/" + + 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 == 400 { + var v ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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 + } + 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 ApiGetUserInformationRequest struct { + ctx context.Context + ApiService *UserAPIService + username string +} + +func (r ApiGetUserInformationRequest) Execute() (*http.Response, error) { + return r.ApiService.GetUserInformationExecute(r) +} + +/* +GetUserInformation Method for GetUserInformation + +Get user information for the specified user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param username + @return ApiGetUserInformationRequest +*/ +func (a *UserAPIService) GetUserInformation(ctx context.Context, username string) ApiGetUserInformationRequest { + return ApiGetUserInformationRequest{ + ApiService: a, + ctx: ctx, + username: username, + } +} + +// Execute executes the request +func (a *UserAPIService) GetUserInformationExecute(r ApiGetUserInformationRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.GetUserInformation") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/users/{username}" + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterValueToString(r.username, "username")), -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{"*/*"} + + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListStarredReposRequest struct { + ctx context.Context + ApiService *UserAPIService + nextPage *string +} + +// The page token for the next page +func (r ApiListStarredReposRequest) NextPage(nextPage string) ApiListStarredReposRequest { + r.nextPage = &nextPage + return r +} + +func (r ApiListStarredReposRequest) Execute() (*http.Response, error) { + return r.ApiService.ListStarredReposExecute(r) +} + +/* +ListStarredRepos Method for ListStarredRepos + +List all starred repositories. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListStarredReposRequest +*/ +func (a *UserAPIService) ListStarredRepos(ctx context.Context) ApiListStarredReposRequest { + return ApiListStarredReposRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *UserAPIService) ListStarredReposExecute(r ApiListStarredReposRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAPIService.ListStarredRepos") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/api/v1/user/starred" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.nextPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "next_page", r.nextPage, "") + } + // 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 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 ApiError + 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 ApiError + 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 ApiError + 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 ApiError + 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, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/quay_api/client.go b/quay_api/client.go new file mode 100644 index 0000000..ce67ed3 --- /dev/null +++ b/quay_api/client.go @@ -0,0 +1,721 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +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" + + "golang.org/x/oauth2" +) + +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 Quay Frontend 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 + + AppspecifictokensAPI *AppspecifictokensAPIService + + BuildAPI *BuildAPIService + + DiscoveryAPI *DiscoveryAPIService + + ErrorAPI *ErrorAPIService + + GlobalmessagesAPI *GlobalmessagesAPIService + + LogsAPI *LogsAPIService + + ManifestAPI *ManifestAPIService + + NamespacequotaAPI *NamespacequotaAPIService + + OrganizationAPI *OrganizationAPIService + + PermissionAPI *PermissionAPIService + + PrototypeAPI *PrototypeAPIService + + RepositoryAPI *RepositoryAPIService + + RepositorynotificationAPI *RepositorynotificationAPIService + + RepotokenAPI *RepotokenAPIService + + RobotAPI *RobotAPIService + + SearchAPI *SearchAPIService + + SuperuserAPI *SuperuserAPIService + + TagAPI *TagAPIService + + TeamAPI *TeamAPIService + + TriggerAPI *TriggerAPIService + + UserAPI *UserAPIService +} + +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.AppspecifictokensAPI = (*AppspecifictokensAPIService)(&c.common) + c.BuildAPI = (*BuildAPIService)(&c.common) + c.DiscoveryAPI = (*DiscoveryAPIService)(&c.common) + c.ErrorAPI = (*ErrorAPIService)(&c.common) + c.GlobalmessagesAPI = (*GlobalmessagesAPIService)(&c.common) + c.LogsAPI = (*LogsAPIService)(&c.common) + c.ManifestAPI = (*ManifestAPIService)(&c.common) + c.NamespacequotaAPI = (*NamespacequotaAPIService)(&c.common) + c.OrganizationAPI = (*OrganizationAPIService)(&c.common) + c.PermissionAPI = (*PermissionAPIService)(&c.common) + c.PrototypeAPI = (*PrototypeAPIService)(&c.common) + c.RepositoryAPI = (*RepositoryAPIService)(&c.common) + c.RepositorynotificationAPI = (*RepositorynotificationAPIService)(&c.common) + c.RepotokenAPI = (*RepotokenAPIService)(&c.common) + c.RobotAPI = (*RobotAPIService)(&c.common) + c.SearchAPI = (*SearchAPIService)(&c.common) + c.SuperuserAPI = (*SuperuserAPIService)(&c.common) + c.TagAPI = (*TagAPIService)(&c.common) + c.TeamAPI = (*TeamAPIService)(&c.common) + c.TriggerAPI = (*TriggerAPIService)(&c.common) + c.UserAPI = (*UserAPIService)(&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 { + 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{}, 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, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), 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 < lenIndValue; i++ { + var arrayValue = indValue.Index(i) + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), collectionType) + } + return + + case reflect.Map: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + iter := indValue.MapRange() + for iter.Next() { + k, v := iter.Key(), iter.Value() + parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), collectionType) + } + return + + case reflect.Interface: + fallthrough + case reflect.Ptr: + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), collectionType) + return + + case reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64: + value = strconv.FormatInt(v.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64, reflect.Uintptr: + value = strconv.FormatUint(v.Uint(), 10) + case reflect.Float32, reflect.Float64: + value = strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Bool: + value = strconv.FormatBool(v.Bool()) + case reflect.String: + value = v.String() + default: + value = v.Type().String() + " value" + } + } + + switch valuesMap := headerOrQueryParams.(type) { + case url.Values: + if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { + valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) + } else { + valuesMap.Add(keyPrefix, value) + } + break + case map[string]string: + valuesMap[keyPrefix] = value + break + } +} + +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } + + resp, err := c.cfg.HTTPClient.Do(request) + if err != nil { + return resp, err + } + + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *Configuration { + return c.cfg +} + +type formFile struct { + fileBytes []byte + fileName string + formFileName string +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + formFiles []formFile) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 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. + + // OAuth2 authentication + if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { + // We were able to grab an oauth2 token from the context + var latestToken *oauth2.Token + if latestToken, err = tok.Token(); err != nil { + return nil, err + } + + latestToken.SetAuthHeader(localVarRequest) + } + + } + + 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/quay_api/configuration.go b/quay_api/configuration.go new file mode 100644 index 0000000..9b28591 --- /dev/null +++ b/quay_api/configuration.go @@ -0,0 +1,218 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +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 ( + // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. + ContextOAuth2 = contextKey("token") + + // 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: "https://quay.example.com", + 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/quay_api/docs/AddLabel.md b/quay_api/docs/AddLabel.md new file mode 100644 index 0000000..1b6767d --- /dev/null +++ b/quay_api/docs/AddLabel.md @@ -0,0 +1,72 @@ +# AddLabel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | The key for the label | +**Value** | **string** | The value for the label | + +## Methods + +### NewAddLabel + +`func NewAddLabel(key string, value string, ) *AddLabel` + +NewAddLabel instantiates a new AddLabel 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 + +### NewAddLabelWithDefaults + +`func NewAddLabelWithDefaults() *AddLabel` + +NewAddLabelWithDefaults instantiates a new AddLabel 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 *AddLabel) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *AddLabel) 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 *AddLabel) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetValue + +`func (o *AddLabel) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *AddLabel) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *AddLabel) SetValue(v string)` + +SetValue sets Value 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/quay_api/docs/ApiError.md b/quay_api/docs/ApiError.md new file mode 100644 index 0000000..3c3af88 --- /dev/null +++ b/quay_api/docs/ApiError.md @@ -0,0 +1,171 @@ +# ApiError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | **int32** | Status code of the response. | +**Type** | **string** | Reference to the type of the error. | +**Detail** | Pointer to **string** | Details about the specific instance of the error. | [optional] +**Title** | **string** | Unique error code to identify the type of error. | +**ErrorMessage** | Pointer to **string** | Deprecated; alias for detail | [optional] +**ErrorType** | Pointer to **string** | Deprecated; alias for detail | [optional] + +## Methods + +### NewApiError + +`func NewApiError(status int32, type_ string, title string, ) *ApiError` + +NewApiError instantiates a new ApiError 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 + +### NewApiErrorWithDefaults + +`func NewApiErrorWithDefaults() *ApiError` + +NewApiErrorWithDefaults instantiates a new ApiError 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 + +### GetStatus + +`func (o *ApiError) GetStatus() int32` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *ApiError) GetStatusOk() (*int32, 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 *ApiError) SetStatus(v int32)` + +SetStatus sets Status field to given value. + + +### GetType + +`func (o *ApiError) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ApiError) 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 *ApiError) SetType(v string)` + +SetType sets Type field to given value. + + +### GetDetail + +`func (o *ApiError) GetDetail() string` + +GetDetail returns the Detail field if non-nil, zero value otherwise. + +### GetDetailOk + +`func (o *ApiError) GetDetailOk() (*string, bool)` + +GetDetailOk returns a tuple with the Detail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetail + +`func (o *ApiError) SetDetail(v string)` + +SetDetail sets Detail field to given value. + +### HasDetail + +`func (o *ApiError) HasDetail() bool` + +HasDetail returns a boolean if a field has been set. + +### GetTitle + +`func (o *ApiError) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *ApiError) 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 *ApiError) SetTitle(v string)` + +SetTitle sets Title field to given value. + + +### GetErrorMessage + +`func (o *ApiError) GetErrorMessage() string` + +GetErrorMessage returns the ErrorMessage field if non-nil, zero value otherwise. + +### GetErrorMessageOk + +`func (o *ApiError) GetErrorMessageOk() (*string, bool)` + +GetErrorMessageOk returns a tuple with the ErrorMessage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrorMessage + +`func (o *ApiError) SetErrorMessage(v string)` + +SetErrorMessage sets ErrorMessage field to given value. + +### HasErrorMessage + +`func (o *ApiError) HasErrorMessage() bool` + +HasErrorMessage returns a boolean if a field has been set. + +### GetErrorType + +`func (o *ApiError) GetErrorType() string` + +GetErrorType returns the ErrorType field if non-nil, zero value otherwise. + +### GetErrorTypeOk + +`func (o *ApiError) GetErrorTypeOk() (*string, bool)` + +GetErrorTypeOk returns a tuple with the ErrorType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrorType + +`func (o *ApiError) SetErrorType(v string)` + +SetErrorType sets ErrorType field to given value. + +### HasErrorType + +`func (o *ApiError) HasErrorType() bool` + +HasErrorType 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/quay_api/docs/ApiErrorDescription.md b/quay_api/docs/ApiErrorDescription.md new file mode 100644 index 0000000..a44e608 --- /dev/null +++ b/quay_api/docs/ApiErrorDescription.md @@ -0,0 +1,93 @@ +# ApiErrorDescription + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | A reference to the error type resource | +**Title** | **string** | The title of the error. Can be used to uniquely identify the kind of error. | +**Description** | **string** | A more detailed description of the error that may include help for fixing the issue. | + +## Methods + +### NewApiErrorDescription + +`func NewApiErrorDescription(type_ string, title string, description string, ) *ApiErrorDescription` + +NewApiErrorDescription instantiates a new ApiErrorDescription 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 + +### NewApiErrorDescriptionWithDefaults + +`func NewApiErrorDescriptionWithDefaults() *ApiErrorDescription` + +NewApiErrorDescriptionWithDefaults instantiates a new ApiErrorDescription 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 *ApiErrorDescription) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ApiErrorDescription) 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 *ApiErrorDescription) SetType(v string)` + +SetType sets Type field to given value. + + +### GetTitle + +`func (o *ApiErrorDescription) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *ApiErrorDescription) 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 *ApiErrorDescription) SetTitle(v string)` + +SetTitle sets Title field to given value. + + +### GetDescription + +`func (o *ApiErrorDescription) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ApiErrorDescription) 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 *ApiErrorDescription) SetDescription(v string)` + +SetDescription sets Description 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/quay_api/docs/ApproveServiceKey.md b/quay_api/docs/ApproveServiceKey.md new file mode 100644 index 0000000..3640d1b --- /dev/null +++ b/quay_api/docs/ApproveServiceKey.md @@ -0,0 +1,56 @@ +# ApproveServiceKey + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Notes** | Pointer to **string** | Optional approval notes | [optional] + +## Methods + +### NewApproveServiceKey + +`func NewApproveServiceKey() *ApproveServiceKey` + +NewApproveServiceKey instantiates a new ApproveServiceKey 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 + +### NewApproveServiceKeyWithDefaults + +`func NewApproveServiceKeyWithDefaults() *ApproveServiceKey` + +NewApproveServiceKeyWithDefaults instantiates a new ApproveServiceKey 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 + +### GetNotes + +`func (o *ApproveServiceKey) GetNotes() string` + +GetNotes returns the Notes field if non-nil, zero value otherwise. + +### GetNotesOk + +`func (o *ApproveServiceKey) GetNotesOk() (*string, bool)` + +GetNotesOk returns a tuple with the Notes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotes + +`func (o *ApproveServiceKey) SetNotes(v string)` + +SetNotes sets Notes field to given value. + +### HasNotes + +`func (o *ApproveServiceKey) HasNotes() bool` + +HasNotes 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/quay_api/docs/AppspecifictokensAPI.md b/quay_api/docs/AppspecifictokensAPI.md new file mode 100644 index 0000000..b405f22 --- /dev/null +++ b/quay_api/docs/AppspecifictokensAPI.md @@ -0,0 +1,276 @@ +# \AppspecifictokensAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateAppToken**](AppspecifictokensAPI.md#CreateAppToken) | **Post** /api/v1/user/apptoken | +[**GetAppToken**](AppspecifictokensAPI.md#GetAppToken) | **Get** /api/v1/user/apptoken/{token_uuid} | +[**ListAppTokens**](AppspecifictokensAPI.md#ListAppTokens) | **Get** /api/v1/user/apptoken | +[**RevokeAppToken**](AppspecifictokensAPI.md#RevokeAppToken) | **Delete** /api/v1/user/apptoken/{token_uuid} | + + + +## CreateAppToken + +> CreateAppToken(ctx).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + body := *openapiclient.NewNewToken("FriendlyName_example") // NewToken | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AppspecifictokensAPI.CreateAppToken(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppspecifictokensAPI.CreateAppToken``: %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 apiCreateAppTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**NewToken**](NewToken.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetAppToken + +> GetAppToken(ctx, tokenUuid).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + tokenUuid := "tokenUuid_example" // string | The uuid of the app specific token + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AppspecifictokensAPI.GetAppToken(context.Background(), tokenUuid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppspecifictokensAPI.GetAppToken``: %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. +**tokenUuid** | **string** | The uuid of the app specific token | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAppTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListAppTokens + +> ListAppTokens(ctx).Expiring(expiring).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + expiring := true // bool | If true, only returns those tokens expiring soon (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AppspecifictokensAPI.ListAppTokens(context.Background()).Expiring(expiring).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppspecifictokensAPI.ListAppTokens``: %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 apiListAppTokensRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **expiring** | **bool** | If true, only returns those tokens expiring soon | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## RevokeAppToken + +> RevokeAppToken(ctx, tokenUuid).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + tokenUuid := "tokenUuid_example" // string | The uuid of the app specific token + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AppspecifictokensAPI.RevokeAppToken(context.Background(), tokenUuid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AppspecifictokensAPI.RevokeAppToken``: %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. +**tokenUuid** | **string** | The uuid of the app specific token | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRevokeAppTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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/quay_api/docs/BuildAPI.md b/quay_api/docs/BuildAPI.md new file mode 100644 index 0000000..f6dd3e7 --- /dev/null +++ b/quay_api/docs/BuildAPI.md @@ -0,0 +1,440 @@ +# \BuildAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CancelRepoBuild**](BuildAPI.md#CancelRepoBuild) | **Delete** /api/v1/repository/{repository}/build/{build_uuid} | +[**GetRepoBuild**](BuildAPI.md#GetRepoBuild) | **Get** /api/v1/repository/{repository}/build/{build_uuid} | +[**GetRepoBuildLogs**](BuildAPI.md#GetRepoBuildLogs) | **Get** /api/v1/repository/{repository}/build/{build_uuid}/logs | +[**GetRepoBuildStatus**](BuildAPI.md#GetRepoBuildStatus) | **Get** /api/v1/repository/{repository}/build/{build_uuid}/status | +[**GetRepoBuilds**](BuildAPI.md#GetRepoBuilds) | **Get** /api/v1/repository/{repository}/build/ | +[**RequestRepoBuild**](BuildAPI.md#RequestRepoBuild) | **Post** /api/v1/repository/{repository}/build/ | + + + +## CancelRepoBuild + +> CancelRepoBuild(ctx, buildUuid, repository).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + buildUuid := "buildUuid_example" // string | The UUID of the build + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.BuildAPI.CancelRepoBuild(context.Background(), buildUuid, repository).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BuildAPI.CancelRepoBuild``: %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. +**buildUuid** | **string** | The UUID of the build | +**repository** | **string** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCancelRepoBuildRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetRepoBuild + +> GetRepoBuild(ctx, buildUuid, repository).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + buildUuid := "buildUuid_example" // string | The UUID of the build + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.BuildAPI.GetRepoBuild(context.Background(), buildUuid, repository).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BuildAPI.GetRepoBuild``: %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. +**buildUuid** | **string** | The UUID of the build | +**repository** | **string** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRepoBuildRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetRepoBuildLogs + +> GetRepoBuildLogs(ctx, buildUuid, repository).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + buildUuid := "buildUuid_example" // string | The UUID of the build + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.BuildAPI.GetRepoBuildLogs(context.Background(), buildUuid, repository).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BuildAPI.GetRepoBuildLogs``: %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. +**buildUuid** | **string** | The UUID of the build | +**repository** | **string** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRepoBuildLogsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetRepoBuildStatus + +> GetRepoBuildStatus(ctx, buildUuid, repository).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + buildUuid := "buildUuid_example" // string | The UUID of the build + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.BuildAPI.GetRepoBuildStatus(context.Background(), buildUuid, repository).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BuildAPI.GetRepoBuildStatus``: %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. +**buildUuid** | **string** | The UUID of the build | +**repository** | **string** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRepoBuildStatusRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetRepoBuilds + +> GetRepoBuilds(ctx, repository).Since(since).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + since := int32(56) // int32 | Returns all builds since the given unix timecode (optional) + limit := int32(56) // int32 | The maximum number of builds to return (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.BuildAPI.GetRepoBuilds(context.Background(), repository).Since(since).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BuildAPI.GetRepoBuilds``: %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** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRepoBuildsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **since** | **int32** | Returns all builds since the given unix timecode | + **limit** | **int32** | The maximum number of builds to return | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## RequestRepoBuild + +> RequestRepoBuild(ctx, repository).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + body := *openapiclient.NewRepositoryBuildRequest() // RepositoryBuildRequest | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.BuildAPI.RequestRepoBuild(context.Background(), repository).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BuildAPI.RequestRepoBuild``: %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** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRequestRepoBuildRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**RepositoryBuildRequest**](RepositoryBuildRequest.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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/quay_api/docs/BuildTriggerActivateRequest.md b/quay_api/docs/BuildTriggerActivateRequest.md new file mode 100644 index 0000000..1b6a85d --- /dev/null +++ b/quay_api/docs/BuildTriggerActivateRequest.md @@ -0,0 +1,77 @@ +# BuildTriggerActivateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | **map[string]interface{}** | Arbitrary json. | +**PullRobot** | Pointer to **string** | The name of the robot that will be used to pull images. | [optional] + +## Methods + +### NewBuildTriggerActivateRequest + +`func NewBuildTriggerActivateRequest(config map[string]interface{}, ) *BuildTriggerActivateRequest` + +NewBuildTriggerActivateRequest instantiates a new BuildTriggerActivateRequest 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 + +### NewBuildTriggerActivateRequestWithDefaults + +`func NewBuildTriggerActivateRequestWithDefaults() *BuildTriggerActivateRequest` + +NewBuildTriggerActivateRequestWithDefaults instantiates a new BuildTriggerActivateRequest 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 + +### GetConfig + +`func (o *BuildTriggerActivateRequest) GetConfig() map[string]interface{}` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *BuildTriggerActivateRequest) GetConfigOk() (*map[string]interface{}, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *BuildTriggerActivateRequest) SetConfig(v map[string]interface{})` + +SetConfig sets Config field to given value. + + +### GetPullRobot + +`func (o *BuildTriggerActivateRequest) GetPullRobot() string` + +GetPullRobot returns the PullRobot field if non-nil, zero value otherwise. + +### GetPullRobotOk + +`func (o *BuildTriggerActivateRequest) GetPullRobotOk() (*string, bool)` + +GetPullRobotOk returns a tuple with the PullRobot field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPullRobot + +`func (o *BuildTriggerActivateRequest) SetPullRobot(v string)` + +SetPullRobot sets PullRobot field to given value. + +### HasPullRobot + +`func (o *BuildTriggerActivateRequest) HasPullRobot() bool` + +HasPullRobot 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/quay_api/docs/ChangeVisibility.md b/quay_api/docs/ChangeVisibility.md new file mode 100644 index 0000000..cc9d5c9 --- /dev/null +++ b/quay_api/docs/ChangeVisibility.md @@ -0,0 +1,51 @@ +# ChangeVisibility + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Visibility** | **string** | Visibility which the repository will start with | + +## Methods + +### NewChangeVisibility + +`func NewChangeVisibility(visibility string, ) *ChangeVisibility` + +NewChangeVisibility instantiates a new ChangeVisibility 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 + +### NewChangeVisibilityWithDefaults + +`func NewChangeVisibilityWithDefaults() *ChangeVisibility` + +NewChangeVisibilityWithDefaults instantiates a new ChangeVisibility 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 + +### GetVisibility + +`func (o *ChangeVisibility) GetVisibility() string` + +GetVisibility returns the Visibility field if non-nil, zero value otherwise. + +### GetVisibilityOk + +`func (o *ChangeVisibility) GetVisibilityOk() (*string, bool)` + +GetVisibilityOk returns a tuple with the Visibility field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVisibility + +`func (o *ChangeVisibility) SetVisibility(v string)` + +SetVisibility sets Visibility 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/quay_api/docs/CreateInstallUser.md b/quay_api/docs/CreateInstallUser.md new file mode 100644 index 0000000..213aa33 --- /dev/null +++ b/quay_api/docs/CreateInstallUser.md @@ -0,0 +1,77 @@ +# CreateInstallUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | The username of the user being created | +**Email** | Pointer to **string** | The email address of the user being created | [optional] + +## Methods + +### NewCreateInstallUser + +`func NewCreateInstallUser(username string, ) *CreateInstallUser` + +NewCreateInstallUser instantiates a new CreateInstallUser 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 + +### NewCreateInstallUserWithDefaults + +`func NewCreateInstallUserWithDefaults() *CreateInstallUser` + +NewCreateInstallUserWithDefaults instantiates a new CreateInstallUser 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 + +### GetUsername + +`func (o *CreateInstallUser) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *CreateInstallUser) GetUsernameOk() (*string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsername + +`func (o *CreateInstallUser) SetUsername(v string)` + +SetUsername sets Username field to given value. + + +### GetEmail + +`func (o *CreateInstallUser) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *CreateInstallUser) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *CreateInstallUser) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *CreateInstallUser) HasEmail() bool` + +HasEmail 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/quay_api/docs/CreateMessage.md b/quay_api/docs/CreateMessage.md new file mode 100644 index 0000000..10043f7 --- /dev/null +++ b/quay_api/docs/CreateMessage.md @@ -0,0 +1,56 @@ +# CreateMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | Pointer to [**CreateMessageMessage**](CreateMessageMessage.md) | | [optional] + +## Methods + +### NewCreateMessage + +`func NewCreateMessage() *CreateMessage` + +NewCreateMessage instantiates a new CreateMessage 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 + +### NewCreateMessageWithDefaults + +`func NewCreateMessageWithDefaults() *CreateMessage` + +NewCreateMessageWithDefaults instantiates a new CreateMessage 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 + +### GetMessage + +`func (o *CreateMessage) GetMessage() CreateMessageMessage` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *CreateMessage) GetMessageOk() (*CreateMessageMessage, 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 *CreateMessage) SetMessage(v CreateMessageMessage)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *CreateMessage) HasMessage() bool` + +HasMessage 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/quay_api/docs/CreateMessageMessage.md b/quay_api/docs/CreateMessageMessage.md new file mode 100644 index 0000000..bd43168 --- /dev/null +++ b/quay_api/docs/CreateMessageMessage.md @@ -0,0 +1,93 @@ +# CreateMessageMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | **string** | The actual message | +**MediaType** | **string** | The media type of the message | +**Severity** | **string** | The severity of the message | + +## Methods + +### NewCreateMessageMessage + +`func NewCreateMessageMessage(content string, mediaType string, severity string, ) *CreateMessageMessage` + +NewCreateMessageMessage instantiates a new CreateMessageMessage 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 + +### NewCreateMessageMessageWithDefaults + +`func NewCreateMessageMessageWithDefaults() *CreateMessageMessage` + +NewCreateMessageMessageWithDefaults instantiates a new CreateMessageMessage 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 + +### GetContent + +`func (o *CreateMessageMessage) GetContent() string` + +GetContent returns the Content field if non-nil, zero value otherwise. + +### GetContentOk + +`func (o *CreateMessageMessage) GetContentOk() (*string, bool)` + +GetContentOk returns a tuple with the Content field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContent + +`func (o *CreateMessageMessage) SetContent(v string)` + +SetContent sets Content field to given value. + + +### GetMediaType + +`func (o *CreateMessageMessage) GetMediaType() string` + +GetMediaType returns the MediaType field if non-nil, zero value otherwise. + +### GetMediaTypeOk + +`func (o *CreateMessageMessage) GetMediaTypeOk() (*string, bool)` + +GetMediaTypeOk returns a tuple with the MediaType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMediaType + +`func (o *CreateMessageMessage) SetMediaType(v string)` + +SetMediaType sets MediaType field to given value. + + +### GetSeverity + +`func (o *CreateMessageMessage) GetSeverity() string` + +GetSeverity returns the Severity field if non-nil, zero value otherwise. + +### GetSeverityOk + +`func (o *CreateMessageMessage) GetSeverityOk() (*string, bool)` + +GetSeverityOk returns a tuple with the Severity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSeverity + +`func (o *CreateMessageMessage) SetSeverity(v string)` + +SetSeverity sets Severity 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/quay_api/docs/CreateRobot.md b/quay_api/docs/CreateRobot.md new file mode 100644 index 0000000..ae9d24e --- /dev/null +++ b/quay_api/docs/CreateRobot.md @@ -0,0 +1,82 @@ +# CreateRobot + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | Pointer to **string** | Optional text description for the robot | [optional] +**UnstructuredMetadata** | Pointer to **map[string]interface{}** | Optional unstructured metadata for the robot | [optional] + +## Methods + +### NewCreateRobot + +`func NewCreateRobot() *CreateRobot` + +NewCreateRobot instantiates a new CreateRobot 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 + +### NewCreateRobotWithDefaults + +`func NewCreateRobotWithDefaults() *CreateRobot` + +NewCreateRobotWithDefaults instantiates a new CreateRobot 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 *CreateRobot) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *CreateRobot) 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 *CreateRobot) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *CreateRobot) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetUnstructuredMetadata + +`func (o *CreateRobot) GetUnstructuredMetadata() map[string]interface{}` + +GetUnstructuredMetadata returns the UnstructuredMetadata field if non-nil, zero value otherwise. + +### GetUnstructuredMetadataOk + +`func (o *CreateRobot) GetUnstructuredMetadataOk() (*map[string]interface{}, bool)` + +GetUnstructuredMetadataOk returns a tuple with the UnstructuredMetadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUnstructuredMetadata + +`func (o *CreateRobot) SetUnstructuredMetadata(v map[string]interface{})` + +SetUnstructuredMetadata sets UnstructuredMetadata field to given value. + +### HasUnstructuredMetadata + +`func (o *CreateRobot) HasUnstructuredMetadata() bool` + +HasUnstructuredMetadata 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/quay_api/docs/CreateServiceKey.md b/quay_api/docs/CreateServiceKey.md new file mode 100644 index 0000000..38dacfd --- /dev/null +++ b/quay_api/docs/CreateServiceKey.md @@ -0,0 +1,150 @@ +# CreateServiceKey + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Service** | **string** | The service authenticating with this key | +**Name** | Pointer to **string** | The friendly name of a service key | [optional] +**Metadata** | Pointer to **map[string]interface{}** | The key/value pairs of this key's metadata | [optional] +**Notes** | Pointer to **string** | If specified, the extra notes for the key | [optional] +**Expiration** | **map[string]interface{}** | The expiration date as a unix timestamp | + +## Methods + +### NewCreateServiceKey + +`func NewCreateServiceKey(service string, expiration map[string]interface{}, ) *CreateServiceKey` + +NewCreateServiceKey instantiates a new CreateServiceKey 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 + +### NewCreateServiceKeyWithDefaults + +`func NewCreateServiceKeyWithDefaults() *CreateServiceKey` + +NewCreateServiceKeyWithDefaults instantiates a new CreateServiceKey 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 + +### GetService + +`func (o *CreateServiceKey) GetService() string` + +GetService returns the Service field if non-nil, zero value otherwise. + +### GetServiceOk + +`func (o *CreateServiceKey) GetServiceOk() (*string, 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 *CreateServiceKey) SetService(v string)` + +SetService sets Service field to given value. + + +### GetName + +`func (o *CreateServiceKey) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateServiceKey) 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 *CreateServiceKey) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *CreateServiceKey) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetMetadata + +`func (o *CreateServiceKey) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *CreateServiceKey) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *CreateServiceKey) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *CreateServiceKey) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### GetNotes + +`func (o *CreateServiceKey) GetNotes() string` + +GetNotes returns the Notes field if non-nil, zero value otherwise. + +### GetNotesOk + +`func (o *CreateServiceKey) GetNotesOk() (*string, bool)` + +GetNotesOk returns a tuple with the Notes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNotes + +`func (o *CreateServiceKey) SetNotes(v string)` + +SetNotes sets Notes field to given value. + +### HasNotes + +`func (o *CreateServiceKey) HasNotes() bool` + +HasNotes returns a boolean if a field has been set. + +### GetExpiration + +`func (o *CreateServiceKey) GetExpiration() map[string]interface{}` + +GetExpiration returns the Expiration field if non-nil, zero value otherwise. + +### GetExpirationOk + +`func (o *CreateServiceKey) GetExpirationOk() (*map[string]interface{}, bool)` + +GetExpirationOk returns a tuple with the Expiration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiration + +`func (o *CreateServiceKey) SetExpiration(v map[string]interface{})` + +SetExpiration sets Expiration 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/quay_api/docs/DiscoveryAPI.md b/quay_api/docs/DiscoveryAPI.md new file mode 100644 index 0000000..fdb9b3b --- /dev/null +++ b/quay_api/docs/DiscoveryAPI.md @@ -0,0 +1,73 @@ +# \DiscoveryAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**Discovery**](DiscoveryAPI.md#Discovery) | **Get** /api/v1/discovery | + + + +## Discovery + +> Discovery(ctx).Internal(internal).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + internal := true // bool | Whether to include internal APIs. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.DiscoveryAPI.Discovery(context.Background()).Internal(internal).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DiscoveryAPI.Discovery``: %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 apiDiscoveryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **internal** | **bool** | Whether to include internal APIs. | + +### Return type + + (empty response body) + +### 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/quay_api/docs/ErrorAPI.md b/quay_api/docs/ErrorAPI.md new file mode 100644 index 0000000..4932be8 --- /dev/null +++ b/quay_api/docs/ErrorAPI.md @@ -0,0 +1,79 @@ +# \ErrorAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetErrorDescription**](ErrorAPI.md#GetErrorDescription) | **Get** /api/v1/error/{error_type} | + + + +## GetErrorDescription + +> ApiErrorDescription GetErrorDescription(ctx, errorType).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + errorType := "errorType_example" // string | The error code identifying the type of error. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ErrorAPI.GetErrorDescription(context.Background(), errorType).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ErrorAPI.GetErrorDescription``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetErrorDescription`: ApiErrorDescription + fmt.Fprintf(os.Stdout, "Response from `ErrorAPI.GetErrorDescription`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**errorType** | **string** | The error code identifying the type of error. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetErrorDescriptionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ApiErrorDescription**](ApiErrorDescription.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/quay_api/docs/ExportLogs.md b/quay_api/docs/ExportLogs.md new file mode 100644 index 0000000..2435e97 --- /dev/null +++ b/quay_api/docs/ExportLogs.md @@ -0,0 +1,82 @@ +# ExportLogs + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CallbackUrl** | Pointer to **string** | The callback URL to invoke with a link to the exported logs | [optional] +**CallbackEmail** | Pointer to **string** | The e-mail address at which to e-mail a link to the exported logs | [optional] + +## Methods + +### NewExportLogs + +`func NewExportLogs() *ExportLogs` + +NewExportLogs instantiates a new ExportLogs 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 + +### NewExportLogsWithDefaults + +`func NewExportLogsWithDefaults() *ExportLogs` + +NewExportLogsWithDefaults instantiates a new ExportLogs 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 + +### GetCallbackUrl + +`func (o *ExportLogs) GetCallbackUrl() string` + +GetCallbackUrl returns the CallbackUrl field if non-nil, zero value otherwise. + +### GetCallbackUrlOk + +`func (o *ExportLogs) GetCallbackUrlOk() (*string, bool)` + +GetCallbackUrlOk returns a tuple with the CallbackUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCallbackUrl + +`func (o *ExportLogs) SetCallbackUrl(v string)` + +SetCallbackUrl sets CallbackUrl field to given value. + +### HasCallbackUrl + +`func (o *ExportLogs) HasCallbackUrl() bool` + +HasCallbackUrl returns a boolean if a field has been set. + +### GetCallbackEmail + +`func (o *ExportLogs) GetCallbackEmail() string` + +GetCallbackEmail returns the CallbackEmail field if non-nil, zero value otherwise. + +### GetCallbackEmailOk + +`func (o *ExportLogs) GetCallbackEmailOk() (*string, bool)` + +GetCallbackEmailOk returns a tuple with the CallbackEmail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCallbackEmail + +`func (o *ExportLogs) SetCallbackEmail(v string)` + +SetCallbackEmail sets CallbackEmail field to given value. + +### HasCallbackEmail + +`func (o *ExportLogs) HasCallbackEmail() bool` + +HasCallbackEmail 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/quay_api/docs/GlobalmessagesAPI.md b/quay_api/docs/GlobalmessagesAPI.md new file mode 100644 index 0000000..46bb263 --- /dev/null +++ b/quay_api/docs/GlobalmessagesAPI.md @@ -0,0 +1,202 @@ +# \GlobalmessagesAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateGlobalMessage**](GlobalmessagesAPI.md#CreateGlobalMessage) | **Post** /api/v1/messages | +[**DeleteGlobalMessage**](GlobalmessagesAPI.md#DeleteGlobalMessage) | **Delete** /api/v1/message/{uuid} | +[**GetGlobalMessages**](GlobalmessagesAPI.md#GetGlobalMessages) | **Get** /api/v1/messages | + + + +## CreateGlobalMessage + +> CreateGlobalMessage(ctx).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + body := *openapiclient.NewCreateMessage() // CreateMessage | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.GlobalmessagesAPI.CreateGlobalMessage(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalmessagesAPI.CreateGlobalMessage``: %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 apiCreateGlobalMessageRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateMessage**](CreateMessage.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteGlobalMessage + +> DeleteGlobalMessage(ctx, uuid).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + uuid := "uuid_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.GlobalmessagesAPI.DeleteGlobalMessage(context.Background(), uuid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalmessagesAPI.DeleteGlobalMessage``: %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. +**uuid** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteGlobalMessageRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetGlobalMessages + +> GetGlobalMessages(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.GlobalmessagesAPI.GetGlobalMessages(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GlobalmessagesAPI.GetGlobalMessages``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetGlobalMessagesRequest struct via the builder pattern + + +### Return type + + (empty response body) + +### 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/quay_api/docs/LogsAPI.md b/quay_api/docs/LogsAPI.md new file mode 100644 index 0000000..0ade47d --- /dev/null +++ b/quay_api/docs/LogsAPI.md @@ -0,0 +1,667 @@ +# \LogsAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ExportOrgLogs**](LogsAPI.md#ExportOrgLogs) | **Post** /api/v1/organization/{orgname}/exportlogs | +[**ExportRepoLogs**](LogsAPI.md#ExportRepoLogs) | **Post** /api/v1/repository/{repository}/exportlogs | +[**ExportUserLogs**](LogsAPI.md#ExportUserLogs) | **Post** /api/v1/user/exportlogs | +[**GetAggregateOrgLogs**](LogsAPI.md#GetAggregateOrgLogs) | **Get** /api/v1/organization/{orgname}/aggregatelogs | +[**GetAggregateRepoLogs**](LogsAPI.md#GetAggregateRepoLogs) | **Get** /api/v1/repository/{repository}/aggregatelogs | +[**GetAggregateUserLogs**](LogsAPI.md#GetAggregateUserLogs) | **Get** /api/v1/user/aggregatelogs | +[**ListOrgLogs**](LogsAPI.md#ListOrgLogs) | **Get** /api/v1/organization/{orgname}/logs | +[**ListRepoLogs**](LogsAPI.md#ListRepoLogs) | **Get** /api/v1/repository/{repository}/logs | +[**ListUserLogs**](LogsAPI.md#ListUserLogs) | **Get** /api/v1/user/logs | + + + +## ExportOrgLogs + +> ExportOrgLogs(ctx, orgname).Body(body).Endtime(endtime).Starttime(starttime).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + body := *openapiclient.NewExportLogs() // ExportLogs | Request body contents. + endtime := "endtime_example" // string | Latest time for logs. Format: \"%m/%d/%Y\" in UTC. (optional) + starttime := "starttime_example" // string | Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.LogsAPI.ExportOrgLogs(context.Background(), orgname).Body(body).Endtime(endtime).Starttime(starttime).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LogsAPI.ExportOrgLogs``: %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. +**orgname** | **string** | The name of the organization | + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportOrgLogsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**ExportLogs**](ExportLogs.md) | Request body contents. | + **endtime** | **string** | Latest time for logs. Format: \"%m/%d/%Y\" in UTC. | + **starttime** | **string** | Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ExportRepoLogs + +> ExportRepoLogs(ctx, repository).Body(body).Endtime(endtime).Starttime(starttime).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + body := *openapiclient.NewExportLogs() // ExportLogs | Request body contents. + endtime := "endtime_example" // string | Latest time for logs. Format: \"%m/%d/%Y\" in UTC. (optional) + starttime := "starttime_example" // string | Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.LogsAPI.ExportRepoLogs(context.Background(), repository).Body(body).Endtime(endtime).Starttime(starttime).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LogsAPI.ExportRepoLogs``: %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** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportRepoLogsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**ExportLogs**](ExportLogs.md) | Request body contents. | + **endtime** | **string** | Latest time for logs. Format: \"%m/%d/%Y\" in UTC. | + **starttime** | **string** | Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ExportUserLogs + +> ExportUserLogs(ctx).Body(body).Endtime(endtime).Starttime(starttime).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + body := *openapiclient.NewExportLogs() // ExportLogs | Request body contents. + endtime := "endtime_example" // string | Latest time for logs. Format: \"%m/%d/%Y\" in UTC. (optional) + starttime := "starttime_example" // string | Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.LogsAPI.ExportUserLogs(context.Background()).Body(body).Endtime(endtime).Starttime(starttime).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LogsAPI.ExportUserLogs``: %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 apiExportUserLogsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ExportLogs**](ExportLogs.md) | Request body contents. | + **endtime** | **string** | Latest time for logs. Format: \"%m/%d/%Y\" in UTC. | + **starttime** | **string** | Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetAggregateOrgLogs + +> GetAggregateOrgLogs(ctx, orgname).Performer(performer).Endtime(endtime).Starttime(starttime).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + performer := "performer_example" // string | Username for which to filter logs. (optional) + endtime := "endtime_example" // string | Latest time for logs. Format: \"%m/%d/%Y\" in UTC. (optional) + starttime := "starttime_example" // string | Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.LogsAPI.GetAggregateOrgLogs(context.Background(), orgname).Performer(performer).Endtime(endtime).Starttime(starttime).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LogsAPI.GetAggregateOrgLogs``: %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. +**orgname** | **string** | The name of the organization | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAggregateOrgLogsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **performer** | **string** | Username for which to filter logs. | + **endtime** | **string** | Latest time for logs. Format: \"%m/%d/%Y\" in UTC. | + **starttime** | **string** | Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetAggregateRepoLogs + +> GetAggregateRepoLogs(ctx, repository).Endtime(endtime).Starttime(starttime).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + endtime := "endtime_example" // string | Latest time for logs. Format: \"%m/%d/%Y\" in UTC. (optional) + starttime := "starttime_example" // string | Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.LogsAPI.GetAggregateRepoLogs(context.Background(), repository).Endtime(endtime).Starttime(starttime).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LogsAPI.GetAggregateRepoLogs``: %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** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAggregateRepoLogsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **endtime** | **string** | Latest time for logs. Format: \"%m/%d/%Y\" in UTC. | + **starttime** | **string** | Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetAggregateUserLogs + +> GetAggregateUserLogs(ctx).Performer(performer).Endtime(endtime).Starttime(starttime).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + performer := "performer_example" // string | Username for which to filter logs. (optional) + endtime := "endtime_example" // string | Latest time for logs. Format: \"%m/%d/%Y\" in UTC. (optional) + starttime := "starttime_example" // string | Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.LogsAPI.GetAggregateUserLogs(context.Background()).Performer(performer).Endtime(endtime).Starttime(starttime).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LogsAPI.GetAggregateUserLogs``: %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 apiGetAggregateUserLogsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **performer** | **string** | Username for which to filter logs. | + **endtime** | **string** | Latest time for logs. Format: \"%m/%d/%Y\" in UTC. | + **starttime** | **string** | Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListOrgLogs + +> ListOrgLogs(ctx, orgname).NextPage(nextPage).Performer(performer).Endtime(endtime).Starttime(starttime).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + nextPage := "nextPage_example" // string | The page token for the next page (optional) + performer := "performer_example" // string | Username for which to filter logs. (optional) + endtime := "endtime_example" // string | Latest time for logs. Format: \"%m/%d/%Y\" in UTC. (optional) + starttime := "starttime_example" // string | Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.LogsAPI.ListOrgLogs(context.Background(), orgname).NextPage(nextPage).Performer(performer).Endtime(endtime).Starttime(starttime).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LogsAPI.ListOrgLogs``: %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. +**orgname** | **string** | The name of the organization | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListOrgLogsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **nextPage** | **string** | The page token for the next page | + **performer** | **string** | Username for which to filter logs. | + **endtime** | **string** | Latest time for logs. Format: \"%m/%d/%Y\" in UTC. | + **starttime** | **string** | Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListRepoLogs + +> ListRepoLogs(ctx, repository).NextPage(nextPage).Endtime(endtime).Starttime(starttime).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + nextPage := "nextPage_example" // string | The page token for the next page (optional) + endtime := "endtime_example" // string | Latest time for logs. Format: \"%m/%d/%Y\" in UTC. (optional) + starttime := "starttime_example" // string | Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.LogsAPI.ListRepoLogs(context.Background(), repository).NextPage(nextPage).Endtime(endtime).Starttime(starttime).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LogsAPI.ListRepoLogs``: %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** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListRepoLogsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **nextPage** | **string** | The page token for the next page | + **endtime** | **string** | Latest time for logs. Format: \"%m/%d/%Y\" in UTC. | + **starttime** | **string** | Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListUserLogs + +> ListUserLogs(ctx).NextPage(nextPage).Performer(performer).Endtime(endtime).Starttime(starttime).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + nextPage := "nextPage_example" // string | The page token for the next page (optional) + performer := "performer_example" // string | Username for which to filter logs. (optional) + endtime := "endtime_example" // string | Latest time for logs. Format: \"%m/%d/%Y\" in UTC. (optional) + starttime := "starttime_example" // string | Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.LogsAPI.ListUserLogs(context.Background()).NextPage(nextPage).Performer(performer).Endtime(endtime).Starttime(starttime).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LogsAPI.ListUserLogs``: %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 apiListUserLogsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **nextPage** | **string** | The page token for the next page | + **performer** | **string** | Username for which to filter logs. | + **endtime** | **string** | Latest time for logs. Format: \"%m/%d/%Y\" in UTC. | + **starttime** | **string** | Earliest time for logs. Format: \"%m/%d/%Y\" in UTC. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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/quay_api/docs/ManifestAPI.md b/quay_api/docs/ManifestAPI.md new file mode 100644 index 0000000..692c733 --- /dev/null +++ b/quay_api/docs/ManifestAPI.md @@ -0,0 +1,374 @@ +# \ManifestAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddManifestLabel**](ManifestAPI.md#AddManifestLabel) | **Post** /api/v1/repository/{repository}/manifest/{manifestref}/labels | +[**DeleteManifestLabel**](ManifestAPI.md#DeleteManifestLabel) | **Delete** /api/v1/repository/{repository}/manifest/{manifestref}/labels/{labelid} | +[**GetManifestLabel**](ManifestAPI.md#GetManifestLabel) | **Get** /api/v1/repository/{repository}/manifest/{manifestref}/labels/{labelid} | +[**GetRepoManifest**](ManifestAPI.md#GetRepoManifest) | **Get** /api/v1/repository/{repository}/manifest/{manifestref} | +[**ListManifestLabels**](ManifestAPI.md#ListManifestLabels) | **Get** /api/v1/repository/{repository}/manifest/{manifestref}/labels | + + + +## AddManifestLabel + +> AddManifestLabel(ctx, manifestref, repository).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + manifestref := "manifestref_example" // string | The digest of the manifest + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + body := *openapiclient.NewAddLabel("Key_example", "Value_example") // AddLabel | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ManifestAPI.AddManifestLabel(context.Background(), manifestref, repository).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ManifestAPI.AddManifestLabel``: %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. +**manifestref** | **string** | The digest of the manifest | +**repository** | **string** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddManifestLabelRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | [**AddLabel**](AddLabel.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteManifestLabel + +> DeleteManifestLabel(ctx, manifestref, repository, labelid).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + manifestref := "manifestref_example" // string | The digest of the manifest + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + labelid := "labelid_example" // string | The ID of the label + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ManifestAPI.DeleteManifestLabel(context.Background(), manifestref, repository, labelid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ManifestAPI.DeleteManifestLabel``: %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. +**manifestref** | **string** | The digest of the manifest | +**repository** | **string** | The full path of the repository. e.g. namespace/name | +**labelid** | **string** | The ID of the label | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteManifestLabelRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetManifestLabel + +> GetManifestLabel(ctx, manifestref, repository, labelid).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + manifestref := "manifestref_example" // string | The digest of the manifest + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + labelid := "labelid_example" // string | The ID of the label + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ManifestAPI.GetManifestLabel(context.Background(), manifestref, repository, labelid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ManifestAPI.GetManifestLabel``: %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. +**manifestref** | **string** | The digest of the manifest | +**repository** | **string** | The full path of the repository. e.g. namespace/name | +**labelid** | **string** | The ID of the label | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetManifestLabelRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetRepoManifest + +> GetRepoManifest(ctx, manifestref, repository).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + manifestref := "manifestref_example" // string | The digest of the manifest + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ManifestAPI.GetRepoManifest(context.Background(), manifestref, repository).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ManifestAPI.GetRepoManifest``: %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. +**manifestref** | **string** | The digest of the manifest | +**repository** | **string** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRepoManifestRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListManifestLabels + +> ListManifestLabels(ctx, manifestref, repository).Filter(filter).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + manifestref := "manifestref_example" // string | The digest of the manifest + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + filter := "filter_example" // string | If specified, only labels matching the given prefix will be returned (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.ManifestAPI.ListManifestLabels(context.Background(), manifestref, repository).Filter(filter).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ManifestAPI.ListManifestLabels``: %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. +**manifestref** | **string** | The digest of the manifest | +**repository** | **string** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListManifestLabelsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **filter** | **string** | If specified, only labels matching the given prefix will be returned | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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/quay_api/docs/NamespacequotaAPI.md b/quay_api/docs/NamespacequotaAPI.md new file mode 100644 index 0000000..f172bb1 --- /dev/null +++ b/quay_api/docs/NamespacequotaAPI.md @@ -0,0 +1,983 @@ +# \NamespacequotaAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ChangeOrganizationQuota**](NamespacequotaAPI.md#ChangeOrganizationQuota) | **Put** /api/v1/organization/{orgname}/quota/{quota_id} | +[**ChangeOrganizationQuotaLimit**](NamespacequotaAPI.md#ChangeOrganizationQuotaLimit) | **Put** /api/v1/organization/{orgname}/quota/{quota_id}/limit/{limit_id} | +[**CreateOrganizationQuota**](NamespacequotaAPI.md#CreateOrganizationQuota) | **Post** /api/v1/organization/{orgname}/quota | +[**CreateOrganizationQuotaLimit**](NamespacequotaAPI.md#CreateOrganizationQuotaLimit) | **Post** /api/v1/organization/{orgname}/quota/{quota_id}/limit | +[**DeleteOrganizationQuota**](NamespacequotaAPI.md#DeleteOrganizationQuota) | **Delete** /api/v1/organization/{orgname}/quota/{quota_id} | +[**DeleteOrganizationQuotaLimit**](NamespacequotaAPI.md#DeleteOrganizationQuotaLimit) | **Delete** /api/v1/organization/{orgname}/quota/{quota_id}/limit/{limit_id} | +[**GetOrganizationQuota**](NamespacequotaAPI.md#GetOrganizationQuota) | **Get** /api/v1/organization/{orgname}/quota/{quota_id} | +[**GetOrganizationQuotaLimit**](NamespacequotaAPI.md#GetOrganizationQuotaLimit) | **Get** /api/v1/organization/{orgname}/quota/{quota_id}/limit/{limit_id} | +[**GetUserQuota**](NamespacequotaAPI.md#GetUserQuota) | **Get** /api/v1/user/quota/{quota_id} | +[**GetUserQuotaLimit**](NamespacequotaAPI.md#GetUserQuotaLimit) | **Get** /api/v1/user/quota/{quota_id}/limit/{limit_id} | +[**ListOrganizationQuota**](NamespacequotaAPI.md#ListOrganizationQuota) | **Get** /api/v1/organization/{orgname}/quota | +[**ListOrganizationQuotaLimit**](NamespacequotaAPI.md#ListOrganizationQuotaLimit) | **Get** /api/v1/organization/{orgname}/quota/{quota_id}/limit | +[**ListUserQuota**](NamespacequotaAPI.md#ListUserQuota) | **Get** /api/v1/user/quota | +[**ListUserQuotaLimit**](NamespacequotaAPI.md#ListUserQuotaLimit) | **Get** /api/v1/user/quota/{quota_id}/limit | + + + +## ChangeOrganizationQuota + +> ChangeOrganizationQuota(ctx, orgname, quotaId).Body(body).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | + quotaId := "quotaId_example" // string | + body := *openapiclient.NewUpdateOrgQuota() // UpdateOrgQuota | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.NamespacequotaAPI.ChangeOrganizationQuota(context.Background(), orgname, quotaId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NamespacequotaAPI.ChangeOrganizationQuota``: %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. +**orgname** | **string** | | +**quotaId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiChangeOrganizationQuotaRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | [**UpdateOrgQuota**](UpdateOrgQuota.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ChangeOrganizationQuotaLimit + +> ChangeOrganizationQuotaLimit(ctx, orgname, limitId, quotaId).Body(body).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | + limitId := "limitId_example" // string | + quotaId := "quotaId_example" // string | + body := *openapiclient.NewUpdateOrgQuotaLimit() // UpdateOrgQuotaLimit | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.NamespacequotaAPI.ChangeOrganizationQuotaLimit(context.Background(), orgname, limitId, quotaId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NamespacequotaAPI.ChangeOrganizationQuotaLimit``: %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. +**orgname** | **string** | | +**limitId** | **string** | | +**quotaId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiChangeOrganizationQuotaLimitRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **body** | [**UpdateOrgQuotaLimit**](UpdateOrgQuotaLimit.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## CreateOrganizationQuota + +> CreateOrganizationQuota(ctx, orgname).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | + body := *openapiclient.NewNewOrgQuota(int32(123)) // NewOrgQuota | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.NamespacequotaAPI.CreateOrganizationQuota(context.Background(), orgname).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NamespacequotaAPI.CreateOrganizationQuota``: %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. +**orgname** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateOrganizationQuotaRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**NewOrgQuota**](NewOrgQuota.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## CreateOrganizationQuotaLimit + +> CreateOrganizationQuotaLimit(ctx, orgname, quotaId).Body(body).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | + quotaId := "quotaId_example" // string | + body := *openapiclient.NewNewOrgQuotaLimit("Type_example", int32(123)) // NewOrgQuotaLimit | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.NamespacequotaAPI.CreateOrganizationQuotaLimit(context.Background(), orgname, quotaId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NamespacequotaAPI.CreateOrganizationQuotaLimit``: %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. +**orgname** | **string** | | +**quotaId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateOrganizationQuotaLimitRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | [**NewOrgQuotaLimit**](NewOrgQuotaLimit.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteOrganizationQuota + +> DeleteOrganizationQuota(ctx, orgname, quotaId).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | + quotaId := "quotaId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.NamespacequotaAPI.DeleteOrganizationQuota(context.Background(), orgname, quotaId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NamespacequotaAPI.DeleteOrganizationQuota``: %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. +**orgname** | **string** | | +**quotaId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteOrganizationQuotaRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteOrganizationQuotaLimit + +> DeleteOrganizationQuotaLimit(ctx, orgname, limitId, quotaId).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | + limitId := "limitId_example" // string | + quotaId := "quotaId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.NamespacequotaAPI.DeleteOrganizationQuotaLimit(context.Background(), orgname, limitId, quotaId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NamespacequotaAPI.DeleteOrganizationQuotaLimit``: %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. +**orgname** | **string** | | +**limitId** | **string** | | +**quotaId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteOrganizationQuotaLimitRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetOrganizationQuota + +> GetOrganizationQuota(ctx, orgname, quotaId).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | + quotaId := "quotaId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.NamespacequotaAPI.GetOrganizationQuota(context.Background(), orgname, quotaId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NamespacequotaAPI.GetOrganizationQuota``: %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. +**orgname** | **string** | | +**quotaId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrganizationQuotaRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### 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) + + +## GetOrganizationQuotaLimit + +> GetOrganizationQuotaLimit(ctx, orgname, limitId, quotaId).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | + limitId := "limitId_example" // string | + quotaId := "quotaId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.NamespacequotaAPI.GetOrganizationQuotaLimit(context.Background(), orgname, limitId, quotaId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NamespacequotaAPI.GetOrganizationQuotaLimit``: %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. +**orgname** | **string** | | +**limitId** | **string** | | +**quotaId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrganizationQuotaLimitRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + + (empty response body) + +### 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) + + +## GetUserQuota + +> GetUserQuota(ctx, quotaId).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + quotaId := "quotaId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.NamespacequotaAPI.GetUserQuota(context.Background(), quotaId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NamespacequotaAPI.GetUserQuota``: %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. +**quotaId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserQuotaRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetUserQuotaLimit + +> GetUserQuotaLimit(ctx, limitId, quotaId).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + limitId := "limitId_example" // string | + quotaId := "quotaId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.NamespacequotaAPI.GetUserQuotaLimit(context.Background(), limitId, quotaId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NamespacequotaAPI.GetUserQuotaLimit``: %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. +**limitId** | **string** | | +**quotaId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserQuotaLimitRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListOrganizationQuota + +> ListOrganizationQuota(ctx, orgname).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.NamespacequotaAPI.ListOrganizationQuota(context.Background(), orgname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NamespacequotaAPI.ListOrganizationQuota``: %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. +**orgname** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListOrganizationQuotaRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### 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) + + +## ListOrganizationQuotaLimit + +> ListOrganizationQuotaLimit(ctx, orgname, quotaId).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | + quotaId := "quotaId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.NamespacequotaAPI.ListOrganizationQuotaLimit(context.Background(), orgname, quotaId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NamespacequotaAPI.ListOrganizationQuotaLimit``: %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. +**orgname** | **string** | | +**quotaId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListOrganizationQuotaLimitRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### 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) + + +## ListUserQuota + +> ListUserQuota(ctx).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.NamespacequotaAPI.ListUserQuota(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NamespacequotaAPI.ListUserQuota``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiListUserQuotaRequest struct via the builder pattern + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListUserQuotaLimit + +> ListUserQuotaLimit(ctx, quotaId).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + quotaId := "quotaId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.NamespacequotaAPI.ListUserQuotaLimit(context.Background(), quotaId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NamespacequotaAPI.ListUserQuotaLimit``: %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. +**quotaId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListUserQuotaLimitRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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/quay_api/docs/NewApp.md b/quay_api/docs/NewApp.md new file mode 100644 index 0000000..ad7c337 --- /dev/null +++ b/quay_api/docs/NewApp.md @@ -0,0 +1,155 @@ +# NewApp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the application | +**RedirectUri** | Pointer to **string** | The URI for the application's OAuth redirect | [optional] +**ApplicationUri** | Pointer to **string** | The URI for the application's homepage | [optional] +**Description** | Pointer to **string** | The human-readable description for the application | [optional] +**AvatarEmail** | Pointer to **string** | The e-mail address of the avatar to use for the application | [optional] + +## Methods + +### NewNewApp + +`func NewNewApp(name string, ) *NewApp` + +NewNewApp instantiates a new NewApp 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 + +### NewNewAppWithDefaults + +`func NewNewAppWithDefaults() *NewApp` + +NewNewAppWithDefaults instantiates a new NewApp 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 *NewApp) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NewApp) 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 *NewApp) SetName(v string)` + +SetName sets Name field to given value. + + +### GetRedirectUri + +`func (o *NewApp) GetRedirectUri() string` + +GetRedirectUri returns the RedirectUri field if non-nil, zero value otherwise. + +### GetRedirectUriOk + +`func (o *NewApp) GetRedirectUriOk() (*string, bool)` + +GetRedirectUriOk returns a tuple with the RedirectUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRedirectUri + +`func (o *NewApp) SetRedirectUri(v string)` + +SetRedirectUri sets RedirectUri field to given value. + +### HasRedirectUri + +`func (o *NewApp) HasRedirectUri() bool` + +HasRedirectUri returns a boolean if a field has been set. + +### GetApplicationUri + +`func (o *NewApp) GetApplicationUri() string` + +GetApplicationUri returns the ApplicationUri field if non-nil, zero value otherwise. + +### GetApplicationUriOk + +`func (o *NewApp) GetApplicationUriOk() (*string, bool)` + +GetApplicationUriOk returns a tuple with the ApplicationUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApplicationUri + +`func (o *NewApp) SetApplicationUri(v string)` + +SetApplicationUri sets ApplicationUri field to given value. + +### HasApplicationUri + +`func (o *NewApp) HasApplicationUri() bool` + +HasApplicationUri returns a boolean if a field has been set. + +### GetDescription + +`func (o *NewApp) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *NewApp) 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 *NewApp) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *NewApp) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetAvatarEmail + +`func (o *NewApp) GetAvatarEmail() string` + +GetAvatarEmail returns the AvatarEmail field if non-nil, zero value otherwise. + +### GetAvatarEmailOk + +`func (o *NewApp) GetAvatarEmailOk() (*string, bool)` + +GetAvatarEmailOk returns a tuple with the AvatarEmail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAvatarEmail + +`func (o *NewApp) SetAvatarEmail(v string)` + +SetAvatarEmail sets AvatarEmail field to given value. + +### HasAvatarEmail + +`func (o *NewApp) HasAvatarEmail() bool` + +HasAvatarEmail 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/quay_api/docs/NewNamespaceQuota.md b/quay_api/docs/NewNamespaceQuota.md new file mode 100644 index 0000000..d4b9e4c --- /dev/null +++ b/quay_api/docs/NewNamespaceQuota.md @@ -0,0 +1,51 @@ +# NewNamespaceQuota + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LimitBytes** | **int32** | Number of bytes the organization is allowed | + +## Methods + +### NewNewNamespaceQuota + +`func NewNewNamespaceQuota(limitBytes int32, ) *NewNamespaceQuota` + +NewNewNamespaceQuota instantiates a new NewNamespaceQuota 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 + +### NewNewNamespaceQuotaWithDefaults + +`func NewNewNamespaceQuotaWithDefaults() *NewNamespaceQuota` + +NewNewNamespaceQuotaWithDefaults instantiates a new NewNamespaceQuota 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 + +### GetLimitBytes + +`func (o *NewNamespaceQuota) GetLimitBytes() int32` + +GetLimitBytes returns the LimitBytes field if non-nil, zero value otherwise. + +### GetLimitBytesOk + +`func (o *NewNamespaceQuota) GetLimitBytesOk() (*int32, bool)` + +GetLimitBytesOk returns a tuple with the LimitBytes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimitBytes + +`func (o *NewNamespaceQuota) SetLimitBytes(v int32)` + +SetLimitBytes sets LimitBytes 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/quay_api/docs/NewOrg.md b/quay_api/docs/NewOrg.md new file mode 100644 index 0000000..073430d --- /dev/null +++ b/quay_api/docs/NewOrg.md @@ -0,0 +1,98 @@ +# NewOrg + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Organization username | +**Email** | **string** | Organization contact email | +**RecaptchaResponse** | Pointer to **string** | The (may be disabled) recaptcha response code for verification | [optional] + +## Methods + +### NewNewOrg + +`func NewNewOrg(name string, email string, ) *NewOrg` + +NewNewOrg instantiates a new NewOrg 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 + +### NewNewOrgWithDefaults + +`func NewNewOrgWithDefaults() *NewOrg` + +NewNewOrgWithDefaults instantiates a new NewOrg 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 *NewOrg) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NewOrg) 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 *NewOrg) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEmail + +`func (o *NewOrg) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *NewOrg) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *NewOrg) SetEmail(v string)` + +SetEmail sets Email field to given value. + + +### GetRecaptchaResponse + +`func (o *NewOrg) GetRecaptchaResponse() string` + +GetRecaptchaResponse returns the RecaptchaResponse field if non-nil, zero value otherwise. + +### GetRecaptchaResponseOk + +`func (o *NewOrg) GetRecaptchaResponseOk() (*string, bool)` + +GetRecaptchaResponseOk returns a tuple with the RecaptchaResponse field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecaptchaResponse + +`func (o *NewOrg) SetRecaptchaResponse(v string)` + +SetRecaptchaResponse sets RecaptchaResponse field to given value. + +### HasRecaptchaResponse + +`func (o *NewOrg) HasRecaptchaResponse() bool` + +HasRecaptchaResponse 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/quay_api/docs/NewOrgQuota.md b/quay_api/docs/NewOrgQuota.md new file mode 100644 index 0000000..0bcca3d --- /dev/null +++ b/quay_api/docs/NewOrgQuota.md @@ -0,0 +1,51 @@ +# NewOrgQuota + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LimitBytes** | **int32** | Number of bytes the organization is allowed | + +## Methods + +### NewNewOrgQuota + +`func NewNewOrgQuota(limitBytes int32, ) *NewOrgQuota` + +NewNewOrgQuota instantiates a new NewOrgQuota 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 + +### NewNewOrgQuotaWithDefaults + +`func NewNewOrgQuotaWithDefaults() *NewOrgQuota` + +NewNewOrgQuotaWithDefaults instantiates a new NewOrgQuota 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 + +### GetLimitBytes + +`func (o *NewOrgQuota) GetLimitBytes() int32` + +GetLimitBytes returns the LimitBytes field if non-nil, zero value otherwise. + +### GetLimitBytesOk + +`func (o *NewOrgQuota) GetLimitBytesOk() (*int32, bool)` + +GetLimitBytesOk returns a tuple with the LimitBytes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimitBytes + +`func (o *NewOrgQuota) SetLimitBytes(v int32)` + +SetLimitBytes sets LimitBytes 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/quay_api/docs/NewOrgQuotaLimit.md b/quay_api/docs/NewOrgQuotaLimit.md new file mode 100644 index 0000000..c7b1a16 --- /dev/null +++ b/quay_api/docs/NewOrgQuotaLimit.md @@ -0,0 +1,72 @@ +# NewOrgQuotaLimit + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | Type of quota limit: \"Warning\" or \"Reject\" | +**ThresholdPercent** | **int32** | Quota threshold, in percent of quota | + +## Methods + +### NewNewOrgQuotaLimit + +`func NewNewOrgQuotaLimit(type_ string, thresholdPercent int32, ) *NewOrgQuotaLimit` + +NewNewOrgQuotaLimit instantiates a new NewOrgQuotaLimit 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 + +### NewNewOrgQuotaLimitWithDefaults + +`func NewNewOrgQuotaLimitWithDefaults() *NewOrgQuotaLimit` + +NewNewOrgQuotaLimitWithDefaults instantiates a new NewOrgQuotaLimit 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 *NewOrgQuotaLimit) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *NewOrgQuotaLimit) 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 *NewOrgQuotaLimit) SetType(v string)` + +SetType sets Type field to given value. + + +### GetThresholdPercent + +`func (o *NewOrgQuotaLimit) GetThresholdPercent() int32` + +GetThresholdPercent returns the ThresholdPercent field if non-nil, zero value otherwise. + +### GetThresholdPercentOk + +`func (o *NewOrgQuotaLimit) GetThresholdPercentOk() (*int32, bool)` + +GetThresholdPercentOk returns a tuple with the ThresholdPercent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThresholdPercent + +`func (o *NewOrgQuotaLimit) SetThresholdPercent(v int32)` + +SetThresholdPercent sets ThresholdPercent 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/quay_api/docs/NewPrototype.md b/quay_api/docs/NewPrototype.md new file mode 100644 index 0000000..bdaf424 --- /dev/null +++ b/quay_api/docs/NewPrototype.md @@ -0,0 +1,98 @@ +# NewPrototype + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Role** | **string** | Role that should be applied to the delegate | +**ActivatingUser** | Pointer to [**NewPrototypeActivatingUser**](NewPrototypeActivatingUser.md) | | [optional] +**Delegate** | [**NewPrototypeDelegate**](NewPrototypeDelegate.md) | | + +## Methods + +### NewNewPrototype + +`func NewNewPrototype(role string, delegate NewPrototypeDelegate, ) *NewPrototype` + +NewNewPrototype instantiates a new NewPrototype 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 + +### NewNewPrototypeWithDefaults + +`func NewNewPrototypeWithDefaults() *NewPrototype` + +NewNewPrototypeWithDefaults instantiates a new NewPrototype 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 + +### GetRole + +`func (o *NewPrototype) GetRole() string` + +GetRole returns the Role field if non-nil, zero value otherwise. + +### GetRoleOk + +`func (o *NewPrototype) GetRoleOk() (*string, bool)` + +GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRole + +`func (o *NewPrototype) SetRole(v string)` + +SetRole sets Role field to given value. + + +### GetActivatingUser + +`func (o *NewPrototype) GetActivatingUser() NewPrototypeActivatingUser` + +GetActivatingUser returns the ActivatingUser field if non-nil, zero value otherwise. + +### GetActivatingUserOk + +`func (o *NewPrototype) GetActivatingUserOk() (*NewPrototypeActivatingUser, bool)` + +GetActivatingUserOk returns a tuple with the ActivatingUser field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActivatingUser + +`func (o *NewPrototype) SetActivatingUser(v NewPrototypeActivatingUser)` + +SetActivatingUser sets ActivatingUser field to given value. + +### HasActivatingUser + +`func (o *NewPrototype) HasActivatingUser() bool` + +HasActivatingUser returns a boolean if a field has been set. + +### GetDelegate + +`func (o *NewPrototype) GetDelegate() NewPrototypeDelegate` + +GetDelegate returns the Delegate field if non-nil, zero value otherwise. + +### GetDelegateOk + +`func (o *NewPrototype) GetDelegateOk() (*NewPrototypeDelegate, bool)` + +GetDelegateOk returns a tuple with the Delegate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDelegate + +`func (o *NewPrototype) SetDelegate(v NewPrototypeDelegate)` + +SetDelegate sets Delegate 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/quay_api/docs/NewPrototypeActivatingUser.md b/quay_api/docs/NewPrototypeActivatingUser.md new file mode 100644 index 0000000..fcb279d --- /dev/null +++ b/quay_api/docs/NewPrototypeActivatingUser.md @@ -0,0 +1,51 @@ +# NewPrototypeActivatingUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The username for the activating_user | + +## Methods + +### NewNewPrototypeActivatingUser + +`func NewNewPrototypeActivatingUser(name string, ) *NewPrototypeActivatingUser` + +NewNewPrototypeActivatingUser instantiates a new NewPrototypeActivatingUser 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 + +### NewNewPrototypeActivatingUserWithDefaults + +`func NewNewPrototypeActivatingUserWithDefaults() *NewPrototypeActivatingUser` + +NewNewPrototypeActivatingUserWithDefaults instantiates a new NewPrototypeActivatingUser 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 *NewPrototypeActivatingUser) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NewPrototypeActivatingUser) 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 *NewPrototypeActivatingUser) 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/quay_api/docs/NewPrototypeDelegate.md b/quay_api/docs/NewPrototypeDelegate.md new file mode 100644 index 0000000..06ec7f1 --- /dev/null +++ b/quay_api/docs/NewPrototypeDelegate.md @@ -0,0 +1,72 @@ +# NewPrototypeDelegate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name for the delegate team or user | +**Kind** | **string** | Whether the delegate is a user or a team | + +## Methods + +### NewNewPrototypeDelegate + +`func NewNewPrototypeDelegate(name string, kind string, ) *NewPrototypeDelegate` + +NewNewPrototypeDelegate instantiates a new NewPrototypeDelegate 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 + +### NewNewPrototypeDelegateWithDefaults + +`func NewNewPrototypeDelegateWithDefaults() *NewPrototypeDelegate` + +NewNewPrototypeDelegateWithDefaults instantiates a new NewPrototypeDelegate 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 *NewPrototypeDelegate) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NewPrototypeDelegate) 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 *NewPrototypeDelegate) SetName(v string)` + +SetName sets Name field to given value. + + +### GetKind + +`func (o *NewPrototypeDelegate) GetKind() string` + +GetKind returns the Kind field if non-nil, zero value otherwise. + +### GetKindOk + +`func (o *NewPrototypeDelegate) GetKindOk() (*string, bool)` + +GetKindOk returns a tuple with the Kind field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKind + +`func (o *NewPrototypeDelegate) SetKind(v string)` + +SetKind sets Kind 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/quay_api/docs/NewRepo.md b/quay_api/docs/NewRepo.md new file mode 100644 index 0000000..46ba8a6 --- /dev/null +++ b/quay_api/docs/NewRepo.md @@ -0,0 +1,119 @@ +# NewRepo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Repository** | **string** | Repository name | +**Visibility** | **string** | Visibility which the repository will start with | +**Namespace** | Pointer to **string** | Namespace in which the repository should be created. If omitted, the username of the caller is used | [optional] +**Description** | **string** | Markdown encoded description for the repository | + +## Methods + +### NewNewRepo + +`func NewNewRepo(repository string, visibility string, description string, ) *NewRepo` + +NewNewRepo instantiates a new NewRepo 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 + +### NewNewRepoWithDefaults + +`func NewNewRepoWithDefaults() *NewRepo` + +NewNewRepoWithDefaults instantiates a new NewRepo 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 + +### GetRepository + +`func (o *NewRepo) GetRepository() string` + +GetRepository returns the Repository field if non-nil, zero value otherwise. + +### GetRepositoryOk + +`func (o *NewRepo) GetRepositoryOk() (*string, 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 *NewRepo) SetRepository(v string)` + +SetRepository sets Repository field to given value. + + +### GetVisibility + +`func (o *NewRepo) GetVisibility() string` + +GetVisibility returns the Visibility field if non-nil, zero value otherwise. + +### GetVisibilityOk + +`func (o *NewRepo) GetVisibilityOk() (*string, bool)` + +GetVisibilityOk returns a tuple with the Visibility field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVisibility + +`func (o *NewRepo) SetVisibility(v string)` + +SetVisibility sets Visibility field to given value. + + +### GetNamespace + +`func (o *NewRepo) GetNamespace() string` + +GetNamespace returns the Namespace field if non-nil, zero value otherwise. + +### GetNamespaceOk + +`func (o *NewRepo) GetNamespaceOk() (*string, bool)` + +GetNamespaceOk returns a tuple with the Namespace field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNamespace + +`func (o *NewRepo) SetNamespace(v string)` + +SetNamespace sets Namespace field to given value. + +### HasNamespace + +`func (o *NewRepo) HasNamespace() bool` + +HasNamespace returns a boolean if a field has been set. + +### GetDescription + +`func (o *NewRepo) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *NewRepo) 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 *NewRepo) SetDescription(v string)` + +SetDescription sets Description 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/quay_api/docs/NewStarredRepository.md b/quay_api/docs/NewStarredRepository.md new file mode 100644 index 0000000..708fe7b --- /dev/null +++ b/quay_api/docs/NewStarredRepository.md @@ -0,0 +1,72 @@ +# NewStarredRepository + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Namespace** | **string** | Namespace in which the repository belongs | +**Repository** | **string** | Repository name | + +## Methods + +### NewNewStarredRepository + +`func NewNewStarredRepository(namespace string, repository string, ) *NewStarredRepository` + +NewNewStarredRepository instantiates a new NewStarredRepository 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 + +### NewNewStarredRepositoryWithDefaults + +`func NewNewStarredRepositoryWithDefaults() *NewStarredRepository` + +NewNewStarredRepositoryWithDefaults instantiates a new NewStarredRepository 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 + +### GetNamespace + +`func (o *NewStarredRepository) GetNamespace() string` + +GetNamespace returns the Namespace field if non-nil, zero value otherwise. + +### GetNamespaceOk + +`func (o *NewStarredRepository) GetNamespaceOk() (*string, bool)` + +GetNamespaceOk returns a tuple with the Namespace field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNamespace + +`func (o *NewStarredRepository) SetNamespace(v string)` + +SetNamespace sets Namespace field to given value. + + +### GetRepository + +`func (o *NewStarredRepository) GetRepository() string` + +GetRepository returns the Repository field if non-nil, zero value otherwise. + +### GetRepositoryOk + +`func (o *NewStarredRepository) GetRepositoryOk() (*string, 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 *NewStarredRepository) SetRepository(v string)` + +SetRepository sets Repository 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/quay_api/docs/NewToken.md b/quay_api/docs/NewToken.md new file mode 100644 index 0000000..dedd9c5 --- /dev/null +++ b/quay_api/docs/NewToken.md @@ -0,0 +1,51 @@ +# NewToken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FriendlyName** | **string** | Friendly name to help identify the token | + +## Methods + +### NewNewToken + +`func NewNewToken(friendlyName string, ) *NewToken` + +NewNewToken instantiates a new NewToken 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 + +### NewNewTokenWithDefaults + +`func NewNewTokenWithDefaults() *NewToken` + +NewNewTokenWithDefaults instantiates a new NewToken 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 + +### GetFriendlyName + +`func (o *NewToken) GetFriendlyName() string` + +GetFriendlyName returns the FriendlyName field if non-nil, zero value otherwise. + +### GetFriendlyNameOk + +`func (o *NewToken) GetFriendlyNameOk() (*string, bool)` + +GetFriendlyNameOk returns a tuple with the FriendlyName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFriendlyName + +`func (o *NewToken) SetFriendlyName(v string)` + +SetFriendlyName sets FriendlyName 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/quay_api/docs/NewUser.md b/quay_api/docs/NewUser.md new file mode 100644 index 0000000..68c9089 --- /dev/null +++ b/quay_api/docs/NewUser.md @@ -0,0 +1,150 @@ +# NewUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | The user's username | +**Password** | **string** | The user's password | +**Email** | Pointer to **string** | The user's email address | [optional] +**InviteCode** | Pointer to **string** | The optional invite code | [optional] +**RecaptchaResponse** | Pointer to **string** | The (may be disabled) recaptcha response code for verification | [optional] + +## Methods + +### NewNewUser + +`func NewNewUser(username string, password string, ) *NewUser` + +NewNewUser instantiates a new NewUser 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 + +### NewNewUserWithDefaults + +`func NewNewUserWithDefaults() *NewUser` + +NewNewUserWithDefaults instantiates a new NewUser 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 + +### GetUsername + +`func (o *NewUser) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *NewUser) GetUsernameOk() (*string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsername + +`func (o *NewUser) SetUsername(v string)` + +SetUsername sets Username field to given value. + + +### GetPassword + +`func (o *NewUser) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *NewUser) GetPasswordOk() (*string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassword + +`func (o *NewUser) SetPassword(v string)` + +SetPassword sets Password field to given value. + + +### GetEmail + +`func (o *NewUser) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *NewUser) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *NewUser) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *NewUser) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### GetInviteCode + +`func (o *NewUser) GetInviteCode() string` + +GetInviteCode returns the InviteCode field if non-nil, zero value otherwise. + +### GetInviteCodeOk + +`func (o *NewUser) GetInviteCodeOk() (*string, bool)` + +GetInviteCodeOk returns a tuple with the InviteCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInviteCode + +`func (o *NewUser) SetInviteCode(v string)` + +SetInviteCode sets InviteCode field to given value. + +### HasInviteCode + +`func (o *NewUser) HasInviteCode() bool` + +HasInviteCode returns a boolean if a field has been set. + +### GetRecaptchaResponse + +`func (o *NewUser) GetRecaptchaResponse() string` + +GetRecaptchaResponse returns the RecaptchaResponse field if non-nil, zero value otherwise. + +### GetRecaptchaResponseOk + +`func (o *NewUser) GetRecaptchaResponseOk() (*string, bool)` + +GetRecaptchaResponseOk returns a tuple with the RecaptchaResponse field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRecaptchaResponse + +`func (o *NewUser) SetRecaptchaResponse(v string)` + +SetRecaptchaResponse sets RecaptchaResponse field to given value. + +### HasRecaptchaResponse + +`func (o *NewUser) HasRecaptchaResponse() bool` + +HasRecaptchaResponse 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/quay_api/docs/NotificationCreateRequest.md b/quay_api/docs/NotificationCreateRequest.md new file mode 100644 index 0000000..2723ca9 --- /dev/null +++ b/quay_api/docs/NotificationCreateRequest.md @@ -0,0 +1,140 @@ +# NotificationCreateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Event** | **string** | The event on which the notification will respond | +**Method** | **string** | The method of notification (such as email or web callback) | +**Config** | **map[string]interface{}** | JSON config information for the specific method of notification | +**EventConfig** | **map[string]interface{}** | JSON config information for the specific event of notification | +**Title** | Pointer to **string** | The human-readable title of the notification | [optional] + +## Methods + +### NewNotificationCreateRequest + +`func NewNotificationCreateRequest(event string, method string, config map[string]interface{}, eventConfig map[string]interface{}, ) *NotificationCreateRequest` + +NewNotificationCreateRequest instantiates a new NotificationCreateRequest 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 + +### NewNotificationCreateRequestWithDefaults + +`func NewNotificationCreateRequestWithDefaults() *NotificationCreateRequest` + +NewNotificationCreateRequestWithDefaults instantiates a new NotificationCreateRequest 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 + +### GetEvent + +`func (o *NotificationCreateRequest) GetEvent() string` + +GetEvent returns the Event field if non-nil, zero value otherwise. + +### GetEventOk + +`func (o *NotificationCreateRequest) 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 *NotificationCreateRequest) SetEvent(v string)` + +SetEvent sets Event field to given value. + + +### GetMethod + +`func (o *NotificationCreateRequest) GetMethod() string` + +GetMethod returns the Method field if non-nil, zero value otherwise. + +### GetMethodOk + +`func (o *NotificationCreateRequest) GetMethodOk() (*string, bool)` + +GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMethod + +`func (o *NotificationCreateRequest) SetMethod(v string)` + +SetMethod sets Method field to given value. + + +### GetConfig + +`func (o *NotificationCreateRequest) GetConfig() map[string]interface{}` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *NotificationCreateRequest) GetConfigOk() (*map[string]interface{}, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *NotificationCreateRequest) SetConfig(v map[string]interface{})` + +SetConfig sets Config field to given value. + + +### GetEventConfig + +`func (o *NotificationCreateRequest) GetEventConfig() map[string]interface{}` + +GetEventConfig returns the EventConfig field if non-nil, zero value otherwise. + +### GetEventConfigOk + +`func (o *NotificationCreateRequest) GetEventConfigOk() (*map[string]interface{}, bool)` + +GetEventConfigOk returns a tuple with the EventConfig field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEventConfig + +`func (o *NotificationCreateRequest) SetEventConfig(v map[string]interface{})` + +SetEventConfig sets EventConfig field to given value. + + +### GetTitle + +`func (o *NotificationCreateRequest) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *NotificationCreateRequest) 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 *NotificationCreateRequest) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *NotificationCreateRequest) 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/quay_api/docs/OrganizationAPI.md b/quay_api/docs/OrganizationAPI.md new file mode 100644 index 0000000..15b6023 --- /dev/null +++ b/quay_api/docs/OrganizationAPI.md @@ -0,0 +1,991 @@ +# \OrganizationAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ChangeOrganizationDetails**](OrganizationAPI.md#ChangeOrganizationDetails) | **Put** /api/v1/organization/{orgname} | +[**CreateOrganization**](OrganizationAPI.md#CreateOrganization) | **Post** /api/v1/organization/ | +[**CreateOrganizationApplication**](OrganizationAPI.md#CreateOrganizationApplication) | **Post** /api/v1/organization/{orgname}/applications | +[**DeleteAdminedOrganization**](OrganizationAPI.md#DeleteAdminedOrganization) | **Delete** /api/v1/organization/{orgname} | +[**DeleteOrganizationApplication**](OrganizationAPI.md#DeleteOrganizationApplication) | **Delete** /api/v1/organization/{orgname}/applications/{client_id} | +[**GetApplicationInformation**](OrganizationAPI.md#GetApplicationInformation) | **Get** /api/v1/app/{client_id} | +[**GetOrganization**](OrganizationAPI.md#GetOrganization) | **Get** /api/v1/organization/{orgname} | +[**GetOrganizationApplication**](OrganizationAPI.md#GetOrganizationApplication) | **Get** /api/v1/organization/{orgname}/applications/{client_id} | +[**GetOrganizationApplications**](OrganizationAPI.md#GetOrganizationApplications) | **Get** /api/v1/organization/{orgname}/applications | +[**GetOrganizationCollaborators**](OrganizationAPI.md#GetOrganizationCollaborators) | **Get** /api/v1/organization/{orgname}/collaborators | +[**GetOrganizationMember**](OrganizationAPI.md#GetOrganizationMember) | **Get** /api/v1/organization/{orgname}/members/{membername} | +[**GetOrganizationMembers**](OrganizationAPI.md#GetOrganizationMembers) | **Get** /api/v1/organization/{orgname}/members | +[**RemoveOrganizationMember**](OrganizationAPI.md#RemoveOrganizationMember) | **Delete** /api/v1/organization/{orgname}/members/{membername} | +[**UpdateOrganizationApplication**](OrganizationAPI.md#UpdateOrganizationApplication) | **Put** /api/v1/organization/{orgname}/applications/{client_id} | + + + +## ChangeOrganizationDetails + +> ChangeOrganizationDetails(ctx, orgname).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + body := *openapiclient.NewUpdateOrg() // UpdateOrg | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.ChangeOrganizationDetails(context.Background(), orgname).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.ChangeOrganizationDetails``: %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. +**orgname** | **string** | The name of the organization | + +### Other Parameters + +Other parameters are passed through a pointer to a apiChangeOrganizationDetailsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**UpdateOrg**](UpdateOrg.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## CreateOrganization + +> CreateOrganization(ctx).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + body := *openapiclient.NewNewOrg("Name_example", "Email_example") // NewOrg | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.CreateOrganization(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.CreateOrganization``: %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 apiCreateOrganizationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**NewOrg**](NewOrg.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## CreateOrganizationApplication + +> CreateOrganizationApplication(ctx, orgname).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + body := *openapiclient.NewNewApp("Name_example") // NewApp | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.CreateOrganizationApplication(context.Background(), orgname).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.CreateOrganizationApplication``: %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. +**orgname** | **string** | The name of the organization | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateOrganizationApplicationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**NewApp**](NewApp.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteAdminedOrganization + +> DeleteAdminedOrganization(ctx, orgname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.DeleteAdminedOrganization(context.Background(), orgname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.DeleteAdminedOrganization``: %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. +**orgname** | **string** | The name of the organization | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAdminedOrganizationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteOrganizationApplication + +> DeleteOrganizationApplication(ctx, orgname, clientId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + clientId := "clientId_example" // string | The OAuth client ID + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.DeleteOrganizationApplication(context.Background(), orgname, clientId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.DeleteOrganizationApplication``: %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. +**orgname** | **string** | The name of the organization | +**clientId** | **string** | The OAuth client ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteOrganizationApplicationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetApplicationInformation + +> GetApplicationInformation(ctx, clientId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + clientId := "clientId_example" // string | The OAuth client ID + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.GetApplicationInformation(context.Background(), clientId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetApplicationInformation``: %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. +**clientId** | **string** | The OAuth client ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetApplicationInformationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### 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) + + +## GetOrganization + +> GetOrganization(ctx, orgname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.GetOrganization(context.Background(), orgname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetOrganization``: %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. +**orgname** | **string** | The name of the organization | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrganizationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### 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) + + +## GetOrganizationApplication + +> GetOrganizationApplication(ctx, orgname, clientId).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + clientId := "clientId_example" // string | The OAuth client ID + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.GetOrganizationApplication(context.Background(), orgname, clientId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetOrganizationApplication``: %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. +**orgname** | **string** | The name of the organization | +**clientId** | **string** | The OAuth client ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrganizationApplicationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetOrganizationApplications + +> GetOrganizationApplications(ctx, orgname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.GetOrganizationApplications(context.Background(), orgname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetOrganizationApplications``: %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. +**orgname** | **string** | The name of the organization | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrganizationApplicationsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetOrganizationCollaborators + +> GetOrganizationCollaborators(ctx, orgname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.GetOrganizationCollaborators(context.Background(), orgname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetOrganizationCollaborators``: %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. +**orgname** | **string** | The name of the organization | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrganizationCollaboratorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetOrganizationMember + +> GetOrganizationMember(ctx, orgname, membername).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + membername := "membername_example" // string | The username of the organization member + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.GetOrganizationMember(context.Background(), orgname, membername).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetOrganizationMember``: %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. +**orgname** | **string** | The name of the organization | +**membername** | **string** | The username of the organization member | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrganizationMemberRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetOrganizationMembers + +> GetOrganizationMembers(ctx, orgname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.GetOrganizationMembers(context.Background(), orgname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.GetOrganizationMembers``: %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. +**orgname** | **string** | The name of the organization | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrganizationMembersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## RemoveOrganizationMember + +> RemoveOrganizationMember(ctx, orgname, membername).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + membername := "membername_example" // string | The username of the organization member + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.RemoveOrganizationMember(context.Background(), orgname, membername).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.RemoveOrganizationMember``: %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. +**orgname** | **string** | The name of the organization | +**membername** | **string** | The username of the organization member | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveOrganizationMemberRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## UpdateOrganizationApplication + +> UpdateOrganizationApplication(ctx, orgname, clientId).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + clientId := "clientId_example" // string | The OAuth client ID + body := *openapiclient.NewUpdateApp("Name_example", "RedirectUri_example", "ApplicationUri_example") // UpdateApp | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrganizationAPI.UpdateOrganizationApplication(context.Background(), orgname, clientId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrganizationAPI.UpdateOrganizationApplication``: %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. +**orgname** | **string** | The name of the organization | +**clientId** | **string** | The OAuth client ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateOrganizationApplicationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | [**UpdateApp**](UpdateApp.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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/quay_api/docs/PermissionAPI.md b/quay_api/docs/PermissionAPI.md new file mode 100644 index 0000000..b51e812 --- /dev/null +++ b/quay_api/docs/PermissionAPI.md @@ -0,0 +1,654 @@ +# \PermissionAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ChangeTeamPermissions**](PermissionAPI.md#ChangeTeamPermissions) | **Put** /api/v1/repository/{repository}/permissions/team/{teamname} | +[**ChangeUserPermissions**](PermissionAPI.md#ChangeUserPermissions) | **Put** /api/v1/repository/{repository}/permissions/user/{username} | +[**DeleteTeamPermissions**](PermissionAPI.md#DeleteTeamPermissions) | **Delete** /api/v1/repository/{repository}/permissions/team/{teamname} | +[**DeleteUserPermissions**](PermissionAPI.md#DeleteUserPermissions) | **Delete** /api/v1/repository/{repository}/permissions/user/{username} | +[**GetTeamPermissions**](PermissionAPI.md#GetTeamPermissions) | **Get** /api/v1/repository/{repository}/permissions/team/{teamname} | +[**GetUserPermissions**](PermissionAPI.md#GetUserPermissions) | **Get** /api/v1/repository/{repository}/permissions/user/{username} | +[**GetUserTransitivePermission**](PermissionAPI.md#GetUserTransitivePermission) | **Get** /api/v1/repository/{repository}/permissions/user/{username}/transitive | +[**ListRepoTeamPermissions**](PermissionAPI.md#ListRepoTeamPermissions) | **Get** /api/v1/repository/{repository}/permissions/team/ | +[**ListRepoUserPermissions**](PermissionAPI.md#ListRepoUserPermissions) | **Get** /api/v1/repository/{repository}/permissions/user/ | + + + +## ChangeTeamPermissions + +> ChangeTeamPermissions(ctx, repository, teamname).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + teamname := "teamname_example" // string | The name of the team to which the permission applies + body := *openapiclient.NewTeamPermission("Role_example") // TeamPermission | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.PermissionAPI.ChangeTeamPermissions(context.Background(), repository, teamname).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PermissionAPI.ChangeTeamPermissions``: %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** | The full path of the repository. e.g. namespace/name | +**teamname** | **string** | The name of the team to which the permission applies | + +### Other Parameters + +Other parameters are passed through a pointer to a apiChangeTeamPermissionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | [**TeamPermission**](TeamPermission.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ChangeUserPermissions + +> ChangeUserPermissions(ctx, repository, username).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + username := "username_example" // string | The username of the user to which the permission applies + body := *openapiclient.NewUserPermission("Role_example") // UserPermission | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.PermissionAPI.ChangeUserPermissions(context.Background(), repository, username).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PermissionAPI.ChangeUserPermissions``: %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** | The full path of the repository. e.g. namespace/name | +**username** | **string** | The username of the user to which the permission applies | + +### Other Parameters + +Other parameters are passed through a pointer to a apiChangeUserPermissionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | [**UserPermission**](UserPermission.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteTeamPermissions + +> DeleteTeamPermissions(ctx, repository, teamname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + teamname := "teamname_example" // string | The name of the team to which the permission applies + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.PermissionAPI.DeleteTeamPermissions(context.Background(), repository, teamname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PermissionAPI.DeleteTeamPermissions``: %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** | The full path of the repository. e.g. namespace/name | +**teamname** | **string** | The name of the team to which the permission applies | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteTeamPermissionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteUserPermissions + +> DeleteUserPermissions(ctx, repository, username).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + username := "username_example" // string | The username of the user to which the permission applies + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.PermissionAPI.DeleteUserPermissions(context.Background(), repository, username).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PermissionAPI.DeleteUserPermissions``: %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** | The full path of the repository. e.g. namespace/name | +**username** | **string** | The username of the user to which the permission applies | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteUserPermissionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetTeamPermissions + +> GetTeamPermissions(ctx, repository, teamname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + teamname := "teamname_example" // string | The name of the team to which the permission applies + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.PermissionAPI.GetTeamPermissions(context.Background(), repository, teamname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PermissionAPI.GetTeamPermissions``: %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** | The full path of the repository. e.g. namespace/name | +**teamname** | **string** | The name of the team to which the permission applies | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTeamPermissionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetUserPermissions + +> GetUserPermissions(ctx, repository, username).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + username := "username_example" // string | The username of the user to which the permission applies + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.PermissionAPI.GetUserPermissions(context.Background(), repository, username).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PermissionAPI.GetUserPermissions``: %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** | The full path of the repository. e.g. namespace/name | +**username** | **string** | The username of the user to which the permission applies | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserPermissionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetUserTransitivePermission + +> GetUserTransitivePermission(ctx, repository, username).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + username := "username_example" // string | The username of the user to which the permissions apply + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.PermissionAPI.GetUserTransitivePermission(context.Background(), repository, username).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PermissionAPI.GetUserTransitivePermission``: %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** | The full path of the repository. e.g. namespace/name | +**username** | **string** | The username of the user to which the permissions apply | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserTransitivePermissionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListRepoTeamPermissions + +> ListRepoTeamPermissions(ctx, repository).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.PermissionAPI.ListRepoTeamPermissions(context.Background(), repository).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PermissionAPI.ListRepoTeamPermissions``: %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** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListRepoTeamPermissionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListRepoUserPermissions + +> ListRepoUserPermissions(ctx, repository).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.PermissionAPI.ListRepoUserPermissions(context.Background(), repository).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PermissionAPI.ListRepoUserPermissions``: %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** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListRepoUserPermissionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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/quay_api/docs/PrototypeAPI.md b/quay_api/docs/PrototypeAPI.md new file mode 100644 index 0000000..141974e --- /dev/null +++ b/quay_api/docs/PrototypeAPI.md @@ -0,0 +1,294 @@ +# \PrototypeAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateOrganizationPrototypePermission**](PrototypeAPI.md#CreateOrganizationPrototypePermission) | **Post** /api/v1/organization/{orgname}/prototypes | +[**DeleteOrganizationPrototypePermission**](PrototypeAPI.md#DeleteOrganizationPrototypePermission) | **Delete** /api/v1/organization/{orgname}/prototypes/{prototypeid} | +[**GetOrganizationPrototypePermissions**](PrototypeAPI.md#GetOrganizationPrototypePermissions) | **Get** /api/v1/organization/{orgname}/prototypes | +[**UpdateOrganizationPrototypePermission**](PrototypeAPI.md#UpdateOrganizationPrototypePermission) | **Put** /api/v1/organization/{orgname}/prototypes/{prototypeid} | + + + +## CreateOrganizationPrototypePermission + +> CreateOrganizationPrototypePermission(ctx, orgname).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + body := *openapiclient.NewNewPrototype("Role_example", *openapiclient.NewNewPrototypeDelegate("Name_example", "Kind_example")) // NewPrototype | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.PrototypeAPI.CreateOrganizationPrototypePermission(context.Background(), orgname).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PrototypeAPI.CreateOrganizationPrototypePermission``: %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. +**orgname** | **string** | The name of the organization | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateOrganizationPrototypePermissionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**NewPrototype**](NewPrototype.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteOrganizationPrototypePermission + +> DeleteOrganizationPrototypePermission(ctx, orgname, prototypeid).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + prototypeid := "prototypeid_example" // string | The ID of the prototype + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.PrototypeAPI.DeleteOrganizationPrototypePermission(context.Background(), orgname, prototypeid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PrototypeAPI.DeleteOrganizationPrototypePermission``: %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. +**orgname** | **string** | The name of the organization | +**prototypeid** | **string** | The ID of the prototype | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteOrganizationPrototypePermissionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetOrganizationPrototypePermissions + +> GetOrganizationPrototypePermissions(ctx, orgname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.PrototypeAPI.GetOrganizationPrototypePermissions(context.Background(), orgname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PrototypeAPI.GetOrganizationPrototypePermissions``: %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. +**orgname** | **string** | The name of the organization | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrganizationPrototypePermissionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## UpdateOrganizationPrototypePermission + +> UpdateOrganizationPrototypePermission(ctx, orgname, prototypeid).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + prototypeid := "prototypeid_example" // string | The ID of the prototype + body := *openapiclient.NewPrototypeUpdate("Role_example") // PrototypeUpdate | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.PrototypeAPI.UpdateOrganizationPrototypePermission(context.Background(), orgname, prototypeid).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PrototypeAPI.UpdateOrganizationPrototypePermission``: %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. +**orgname** | **string** | The name of the organization | +**prototypeid** | **string** | The ID of the prototype | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateOrganizationPrototypePermissionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | [**PrototypeUpdate**](PrototypeUpdate.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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/quay_api/docs/PrototypeUpdate.md b/quay_api/docs/PrototypeUpdate.md new file mode 100644 index 0000000..9dbe867 --- /dev/null +++ b/quay_api/docs/PrototypeUpdate.md @@ -0,0 +1,51 @@ +# PrototypeUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Role** | **string** | Role that should be applied to the permission | + +## Methods + +### NewPrototypeUpdate + +`func NewPrototypeUpdate(role string, ) *PrototypeUpdate` + +NewPrototypeUpdate instantiates a new PrototypeUpdate 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 + +### NewPrototypeUpdateWithDefaults + +`func NewPrototypeUpdateWithDefaults() *PrototypeUpdate` + +NewPrototypeUpdateWithDefaults instantiates a new PrototypeUpdate 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 + +### GetRole + +`func (o *PrototypeUpdate) GetRole() string` + +GetRole returns the Role field if non-nil, zero value otherwise. + +### GetRoleOk + +`func (o *PrototypeUpdate) GetRoleOk() (*string, bool)` + +GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRole + +`func (o *PrototypeUpdate) SetRole(v string)` + +SetRole sets Role 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/quay_api/docs/PutServiceKey.md b/quay_api/docs/PutServiceKey.md new file mode 100644 index 0000000..b05e657 --- /dev/null +++ b/quay_api/docs/PutServiceKey.md @@ -0,0 +1,108 @@ +# PutServiceKey + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | The friendly name of a service key | [optional] +**Metadata** | Pointer to **map[string]interface{}** | The key/value pairs of this key's metadata | [optional] +**Expiration** | Pointer to **map[string]interface{}** | The expiration date as a unix timestamp | [optional] + +## Methods + +### NewPutServiceKey + +`func NewPutServiceKey() *PutServiceKey` + +NewPutServiceKey instantiates a new PutServiceKey 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 + +### NewPutServiceKeyWithDefaults + +`func NewPutServiceKeyWithDefaults() *PutServiceKey` + +NewPutServiceKeyWithDefaults instantiates a new PutServiceKey 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 *PutServiceKey) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PutServiceKey) 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 *PutServiceKey) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PutServiceKey) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetMetadata + +`func (o *PutServiceKey) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *PutServiceKey) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *PutServiceKey) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *PutServiceKey) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### GetExpiration + +`func (o *PutServiceKey) GetExpiration() map[string]interface{}` + +GetExpiration returns the Expiration field if non-nil, zero value otherwise. + +### GetExpirationOk + +`func (o *PutServiceKey) GetExpirationOk() (*map[string]interface{}, bool)` + +GetExpirationOk returns a tuple with the Expiration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiration + +`func (o *PutServiceKey) SetExpiration(v map[string]interface{})` + +SetExpiration sets Expiration field to given value. + +### HasExpiration + +`func (o *PutServiceKey) HasExpiration() bool` + +HasExpiration 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/quay_api/docs/RepoUpdate.md b/quay_api/docs/RepoUpdate.md new file mode 100644 index 0000000..0d0bb66 --- /dev/null +++ b/quay_api/docs/RepoUpdate.md @@ -0,0 +1,51 @@ +# RepoUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | **string** | Markdown encoded description for the repository | + +## Methods + +### NewRepoUpdate + +`func NewRepoUpdate(description string, ) *RepoUpdate` + +NewRepoUpdate instantiates a new RepoUpdate 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 + +### NewRepoUpdateWithDefaults + +`func NewRepoUpdateWithDefaults() *RepoUpdate` + +NewRepoUpdateWithDefaults instantiates a new RepoUpdate 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 *RepoUpdate) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *RepoUpdate) 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 *RepoUpdate) SetDescription(v string)` + +SetDescription sets Description 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/quay_api/docs/RepositoryAPI.md b/quay_api/docs/RepositoryAPI.md new file mode 100644 index 0000000..f430c38 --- /dev/null +++ b/quay_api/docs/RepositoryAPI.md @@ -0,0 +1,434 @@ +# \RepositoryAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ChangeRepoVisibility**](RepositoryAPI.md#ChangeRepoVisibility) | **Post** /api/v1/repository/{repository}/changevisibility | +[**CreateRepo**](RepositoryAPI.md#CreateRepo) | **Post** /api/v1/repository | +[**DeleteRepository**](RepositoryAPI.md#DeleteRepository) | **Delete** /api/v1/repository/{repository} | +[**GetRepo**](RepositoryAPI.md#GetRepo) | **Get** /api/v1/repository/{repository} | +[**ListRepos**](RepositoryAPI.md#ListRepos) | **Get** /api/v1/repository | +[**UpdateRepo**](RepositoryAPI.md#UpdateRepo) | **Put** /api/v1/repository/{repository} | + + + +## ChangeRepoVisibility + +> ChangeRepoVisibility(ctx, repository).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + body := *openapiclient.NewChangeVisibility("Visibility_example") // ChangeVisibility | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RepositoryAPI.ChangeRepoVisibility(context.Background(), repository).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RepositoryAPI.ChangeRepoVisibility``: %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** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiChangeRepoVisibilityRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**ChangeVisibility**](ChangeVisibility.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## CreateRepo + +> CreateRepo(ctx).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + body := *openapiclient.NewNewRepo("Repository_example", "Visibility_example", "Description_example") // NewRepo | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RepositoryAPI.CreateRepo(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RepositoryAPI.CreateRepo``: %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 apiCreateRepoRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**NewRepo**](NewRepo.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteRepository + +> DeleteRepository(ctx, repository).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RepositoryAPI.DeleteRepository(context.Background(), repository).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RepositoryAPI.DeleteRepository``: %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** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteRepositoryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetRepo + +> GetRepo(ctx, repository).IncludeTags(includeTags).IncludeStats(includeStats).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + includeTags := true // bool | Whether to include repository tags (optional) + includeStats := true // bool | Whether to include action statistics (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RepositoryAPI.GetRepo(context.Background(), repository).IncludeTags(includeTags).IncludeStats(includeStats).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RepositoryAPI.GetRepo``: %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** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRepoRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **includeTags** | **bool** | Whether to include repository tags | + **includeStats** | **bool** | Whether to include action statistics | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListRepos + +> ListRepos(ctx).NextPage(nextPage).RepoKind(repoKind).Popularity(popularity).LastModified(lastModified).Public(public).Starred(starred).Namespace(namespace).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + nextPage := "nextPage_example" // string | The page token for the next page (optional) + repoKind := "repoKind_example" // string | The kind of repositories to return (optional) + popularity := true // bool | Whether to include the repository's popularity metric. (optional) + lastModified := true // bool | Whether to include when the repository was last modified. (optional) + public := true // bool | Adds any repositories visible to the user by virtue of being public (optional) + starred := true // bool | Filters the repositories returned to those starred by the user (optional) + namespace := "namespace_example" // string | Filters the repositories returned to this namespace (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RepositoryAPI.ListRepos(context.Background()).NextPage(nextPage).RepoKind(repoKind).Popularity(popularity).LastModified(lastModified).Public(public).Starred(starred).Namespace(namespace).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RepositoryAPI.ListRepos``: %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 apiListReposRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **nextPage** | **string** | The page token for the next page | + **repoKind** | **string** | The kind of repositories to return | + **popularity** | **bool** | Whether to include the repository's popularity metric. | + **lastModified** | **bool** | Whether to include when the repository was last modified. | + **public** | **bool** | Adds any repositories visible to the user by virtue of being public | + **starred** | **bool** | Filters the repositories returned to those starred by the user | + **namespace** | **string** | Filters the repositories returned to this namespace | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## UpdateRepo + +> UpdateRepo(ctx, repository).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + body := *openapiclient.NewRepoUpdate("Description_example") // RepoUpdate | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RepositoryAPI.UpdateRepo(context.Background(), repository).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RepositoryAPI.UpdateRepo``: %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** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateRepoRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**RepoUpdate**](RepoUpdate.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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/quay_api/docs/RepositoryBuildRequest.md b/quay_api/docs/RepositoryBuildRequest.md new file mode 100644 index 0000000..9ee4d0d --- /dev/null +++ b/quay_api/docs/RepositoryBuildRequest.md @@ -0,0 +1,212 @@ +# RepositoryBuildRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FileId** | Pointer to **string** | The file id that was generated when the build spec was uploaded | [optional] +**ArchiveUrl** | Pointer to **string** | The URL of the .tar.gz to build. Must start with \"http\" or \"https\". | [optional] +**Subdirectory** | Pointer to **string** | Subdirectory in which the Dockerfile can be found. You can only specify this or dockerfile_path | [optional] +**DockerfilePath** | Pointer to **string** | Path to a dockerfile. You can only specify this or subdirectory. | [optional] +**Context** | Pointer to **string** | Pass in the context for the dockerfile. This is optional. | [optional] +**PullRobot** | Pointer to **string** | Username of a Quay robot account to use as pull credentials | [optional] +**DockerTags** | Pointer to **[]string** | The tags to which the built images will be pushed. If none specified, \"latest\" is used. | [optional] + +## Methods + +### NewRepositoryBuildRequest + +`func NewRepositoryBuildRequest() *RepositoryBuildRequest` + +NewRepositoryBuildRequest instantiates a new RepositoryBuildRequest 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 + +### NewRepositoryBuildRequestWithDefaults + +`func NewRepositoryBuildRequestWithDefaults() *RepositoryBuildRequest` + +NewRepositoryBuildRequestWithDefaults instantiates a new RepositoryBuildRequest 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 + +### GetFileId + +`func (o *RepositoryBuildRequest) GetFileId() string` + +GetFileId returns the FileId field if non-nil, zero value otherwise. + +### GetFileIdOk + +`func (o *RepositoryBuildRequest) GetFileIdOk() (*string, bool)` + +GetFileIdOk returns a tuple with the FileId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFileId + +`func (o *RepositoryBuildRequest) SetFileId(v string)` + +SetFileId sets FileId field to given value. + +### HasFileId + +`func (o *RepositoryBuildRequest) HasFileId() bool` + +HasFileId returns a boolean if a field has been set. + +### GetArchiveUrl + +`func (o *RepositoryBuildRequest) GetArchiveUrl() string` + +GetArchiveUrl returns the ArchiveUrl field if non-nil, zero value otherwise. + +### GetArchiveUrlOk + +`func (o *RepositoryBuildRequest) GetArchiveUrlOk() (*string, bool)` + +GetArchiveUrlOk returns a tuple with the ArchiveUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArchiveUrl + +`func (o *RepositoryBuildRequest) SetArchiveUrl(v string)` + +SetArchiveUrl sets ArchiveUrl field to given value. + +### HasArchiveUrl + +`func (o *RepositoryBuildRequest) HasArchiveUrl() bool` + +HasArchiveUrl returns a boolean if a field has been set. + +### GetSubdirectory + +`func (o *RepositoryBuildRequest) GetSubdirectory() string` + +GetSubdirectory returns the Subdirectory field if non-nil, zero value otherwise. + +### GetSubdirectoryOk + +`func (o *RepositoryBuildRequest) GetSubdirectoryOk() (*string, bool)` + +GetSubdirectoryOk returns a tuple with the Subdirectory field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubdirectory + +`func (o *RepositoryBuildRequest) SetSubdirectory(v string)` + +SetSubdirectory sets Subdirectory field to given value. + +### HasSubdirectory + +`func (o *RepositoryBuildRequest) HasSubdirectory() bool` + +HasSubdirectory returns a boolean if a field has been set. + +### GetDockerfilePath + +`func (o *RepositoryBuildRequest) GetDockerfilePath() string` + +GetDockerfilePath returns the DockerfilePath field if non-nil, zero value otherwise. + +### GetDockerfilePathOk + +`func (o *RepositoryBuildRequest) GetDockerfilePathOk() (*string, bool)` + +GetDockerfilePathOk returns a tuple with the DockerfilePath field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDockerfilePath + +`func (o *RepositoryBuildRequest) SetDockerfilePath(v string)` + +SetDockerfilePath sets DockerfilePath field to given value. + +### HasDockerfilePath + +`func (o *RepositoryBuildRequest) HasDockerfilePath() bool` + +HasDockerfilePath returns a boolean if a field has been set. + +### GetContext + +`func (o *RepositoryBuildRequest) GetContext() string` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *RepositoryBuildRequest) GetContextOk() (*string, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *RepositoryBuildRequest) SetContext(v string)` + +SetContext sets Context field to given value. + +### HasContext + +`func (o *RepositoryBuildRequest) HasContext() bool` + +HasContext returns a boolean if a field has been set. + +### GetPullRobot + +`func (o *RepositoryBuildRequest) GetPullRobot() string` + +GetPullRobot returns the PullRobot field if non-nil, zero value otherwise. + +### GetPullRobotOk + +`func (o *RepositoryBuildRequest) GetPullRobotOk() (*string, bool)` + +GetPullRobotOk returns a tuple with the PullRobot field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPullRobot + +`func (o *RepositoryBuildRequest) SetPullRobot(v string)` + +SetPullRobot sets PullRobot field to given value. + +### HasPullRobot + +`func (o *RepositoryBuildRequest) HasPullRobot() bool` + +HasPullRobot returns a boolean if a field has been set. + +### GetDockerTags + +`func (o *RepositoryBuildRequest) GetDockerTags() []string` + +GetDockerTags returns the DockerTags field if non-nil, zero value otherwise. + +### GetDockerTagsOk + +`func (o *RepositoryBuildRequest) GetDockerTagsOk() (*[]string, bool)` + +GetDockerTagsOk returns a tuple with the DockerTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDockerTags + +`func (o *RepositoryBuildRequest) SetDockerTags(v []string)` + +SetDockerTags sets DockerTags field to given value. + +### HasDockerTags + +`func (o *RepositoryBuildRequest) HasDockerTags() bool` + +HasDockerTags 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/quay_api/docs/RepositorynotificationAPI.md b/quay_api/docs/RepositorynotificationAPI.md new file mode 100644 index 0000000..f560b48 --- /dev/null +++ b/quay_api/docs/RepositorynotificationAPI.md @@ -0,0 +1,434 @@ +# \RepositorynotificationAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateRepoNotification**](RepositorynotificationAPI.md#CreateRepoNotification) | **Post** /api/v1/repository/{repository}/notification/ | +[**DeleteRepoNotification**](RepositorynotificationAPI.md#DeleteRepoNotification) | **Delete** /api/v1/repository/{repository}/notification/{uuid} | +[**GetRepoNotification**](RepositorynotificationAPI.md#GetRepoNotification) | **Get** /api/v1/repository/{repository}/notification/{uuid} | +[**ListRepoNotifications**](RepositorynotificationAPI.md#ListRepoNotifications) | **Get** /api/v1/repository/{repository}/notification/ | +[**ResetRepositoryNotificationFailures**](RepositorynotificationAPI.md#ResetRepositoryNotificationFailures) | **Post** /api/v1/repository/{repository}/notification/{uuid} | +[**TestRepoNotification**](RepositorynotificationAPI.md#TestRepoNotification) | **Post** /api/v1/repository/{repository}/notification/{uuid}/test | + + + +## CreateRepoNotification + +> CreateRepoNotification(ctx, repository).Body(body).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + body := *openapiclient.NewNotificationCreateRequest("Event_example", "Method_example", map[string]interface{}(123), map[string]interface{}(123)) // NotificationCreateRequest | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RepositorynotificationAPI.CreateRepoNotification(context.Background(), repository).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RepositorynotificationAPI.CreateRepoNotification``: %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** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateRepoNotificationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**NotificationCreateRequest**](NotificationCreateRequest.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteRepoNotification + +> DeleteRepoNotification(ctx, repository, uuid).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + uuid := "uuid_example" // string | The UUID of the notification + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RepositorynotificationAPI.DeleteRepoNotification(context.Background(), repository, uuid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RepositorynotificationAPI.DeleteRepoNotification``: %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** | The full path of the repository. e.g. namespace/name | +**uuid** | **string** | The UUID of the notification | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteRepoNotificationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetRepoNotification + +> GetRepoNotification(ctx, repository, uuid).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + uuid := "uuid_example" // string | The UUID of the notification + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RepositorynotificationAPI.GetRepoNotification(context.Background(), repository, uuid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RepositorynotificationAPI.GetRepoNotification``: %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** | The full path of the repository. e.g. namespace/name | +**uuid** | **string** | The UUID of the notification | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRepoNotificationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListRepoNotifications + +> ListRepoNotifications(ctx, repository).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RepositorynotificationAPI.ListRepoNotifications(context.Background(), repository).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RepositorynotificationAPI.ListRepoNotifications``: %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** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListRepoNotificationsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ResetRepositoryNotificationFailures + +> ResetRepositoryNotificationFailures(ctx, repository, uuid).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + uuid := "uuid_example" // string | The UUID of the notification + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RepositorynotificationAPI.ResetRepositoryNotificationFailures(context.Background(), repository, uuid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RepositorynotificationAPI.ResetRepositoryNotificationFailures``: %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** | The full path of the repository. e.g. namespace/name | +**uuid** | **string** | The UUID of the notification | + +### Other Parameters + +Other parameters are passed through a pointer to a apiResetRepositoryNotificationFailuresRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## TestRepoNotification + +> TestRepoNotification(ctx, repository, uuid).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + uuid := "uuid_example" // string | The UUID of the notification + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RepositorynotificationAPI.TestRepoNotification(context.Background(), repository, uuid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RepositorynotificationAPI.TestRepoNotification``: %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** | The full path of the repository. e.g. namespace/name | +**uuid** | **string** | The UUID of the notification | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestRepoNotificationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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/quay_api/docs/RepotokenAPI.md b/quay_api/docs/RepotokenAPI.md new file mode 100644 index 0000000..f1e52fc --- /dev/null +++ b/quay_api/docs/RepotokenAPI.md @@ -0,0 +1,366 @@ +# \RepotokenAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ChangeToken**](RepotokenAPI.md#ChangeToken) | **Put** /api/v1/repository/{repository}/tokens/{code} | +[**CreateToken**](RepotokenAPI.md#CreateToken) | **Post** /api/v1/repository/{repository}/tokens/ | +[**DeleteToken**](RepotokenAPI.md#DeleteToken) | **Delete** /api/v1/repository/{repository}/tokens/{code} | +[**GetTokens**](RepotokenAPI.md#GetTokens) | **Get** /api/v1/repository/{repository}/tokens/{code} | +[**ListRepoTokens**](RepotokenAPI.md#ListRepoTokens) | **Get** /api/v1/repository/{repository}/tokens/ | + + + +## ChangeToken + +> ChangeToken(ctx, repository, code).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + code := "code_example" // string | The token code + body := *openapiclient.NewTokenPermission("Role_example") // TokenPermission | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RepotokenAPI.ChangeToken(context.Background(), repository, code).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RepotokenAPI.ChangeToken``: %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** | The full path of the repository. e.g. namespace/name | +**code** | **string** | The token code | + +### Other Parameters + +Other parameters are passed through a pointer to a apiChangeTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | [**TokenPermission**](TokenPermission.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## CreateToken + +> CreateToken(ctx, repository).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + body := *openapiclient.NewNewToken("FriendlyName_example") // NewToken | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RepotokenAPI.CreateToken(context.Background(), repository).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RepotokenAPI.CreateToken``: %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** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**NewToken**](NewToken.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteToken + +> DeleteToken(ctx, repository, code).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + code := "code_example" // string | The token code + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RepotokenAPI.DeleteToken(context.Background(), repository, code).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RepotokenAPI.DeleteToken``: %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** | The full path of the repository. e.g. namespace/name | +**code** | **string** | The token code | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetTokens + +> GetTokens(ctx, repository, code).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + code := "code_example" // string | The token code + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RepotokenAPI.GetTokens(context.Background(), repository, code).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RepotokenAPI.GetTokens``: %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** | The full path of the repository. e.g. namespace/name | +**code** | **string** | The token code | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTokensRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListRepoTokens + +> ListRepoTokens(ctx, repository).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RepotokenAPI.ListRepoTokens(context.Background(), repository).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RepotokenAPI.ListRepoTokens``: %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** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListRepoTokensRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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/quay_api/docs/RestoreTag.md b/quay_api/docs/RestoreTag.md new file mode 100644 index 0000000..5e428e5 --- /dev/null +++ b/quay_api/docs/RestoreTag.md @@ -0,0 +1,56 @@ +# RestoreTag + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ManifestDigest** | Pointer to **string** | If specified, the manifest digest that should be used | [optional] + +## Methods + +### NewRestoreTag + +`func NewRestoreTag() *RestoreTag` + +NewRestoreTag instantiates a new RestoreTag 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 + +### NewRestoreTagWithDefaults + +`func NewRestoreTagWithDefaults() *RestoreTag` + +NewRestoreTagWithDefaults instantiates a new RestoreTag 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 + +### GetManifestDigest + +`func (o *RestoreTag) GetManifestDigest() string` + +GetManifestDigest returns the ManifestDigest field if non-nil, zero value otherwise. + +### GetManifestDigestOk + +`func (o *RestoreTag) GetManifestDigestOk() (*string, bool)` + +GetManifestDigestOk returns a tuple with the ManifestDigest field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetManifestDigest + +`func (o *RestoreTag) SetManifestDigest(v string)` + +SetManifestDigest sets ManifestDigest field to given value. + +### HasManifestDigest + +`func (o *RestoreTag) HasManifestDigest() bool` + +HasManifestDigest 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/quay_api/docs/RobotAPI.md b/quay_api/docs/RobotAPI.md new file mode 100644 index 0000000..ea837e5 --- /dev/null +++ b/quay_api/docs/RobotAPI.md @@ -0,0 +1,861 @@ +# \RobotAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateOrgRobot**](RobotAPI.md#CreateOrgRobot) | **Put** /api/v1/organization/{orgname}/robots/{robot_shortname} | +[**CreateUserRobot**](RobotAPI.md#CreateUserRobot) | **Put** /api/v1/user/robots/{robot_shortname} | +[**DeleteOrgRobot**](RobotAPI.md#DeleteOrgRobot) | **Delete** /api/v1/organization/{orgname}/robots/{robot_shortname} | +[**DeleteUserRobot**](RobotAPI.md#DeleteUserRobot) | **Delete** /api/v1/user/robots/{robot_shortname} | +[**GetOrgRobot**](RobotAPI.md#GetOrgRobot) | **Get** /api/v1/organization/{orgname}/robots/{robot_shortname} | +[**GetOrgRobotPermissions**](RobotAPI.md#GetOrgRobotPermissions) | **Get** /api/v1/organization/{orgname}/robots/{robot_shortname}/permissions | +[**GetOrgRobots**](RobotAPI.md#GetOrgRobots) | **Get** /api/v1/organization/{orgname}/robots | +[**GetUserRobot**](RobotAPI.md#GetUserRobot) | **Get** /api/v1/user/robots/{robot_shortname} | +[**GetUserRobotPermissions**](RobotAPI.md#GetUserRobotPermissions) | **Get** /api/v1/user/robots/{robot_shortname}/permissions | +[**GetUserRobots**](RobotAPI.md#GetUserRobots) | **Get** /api/v1/user/robots | +[**RegenerateOrgRobotToken**](RobotAPI.md#RegenerateOrgRobotToken) | **Post** /api/v1/organization/{orgname}/robots/{robot_shortname}/regenerate | +[**RegenerateUserRobotToken**](RobotAPI.md#RegenerateUserRobotToken) | **Post** /api/v1/user/robots/{robot_shortname}/regenerate | + + + +## CreateOrgRobot + +> CreateOrgRobot(ctx, orgname, robotShortname).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + robotShortname := "robotShortname_example" // string | The short name for the robot, without any user or organization prefix + body := *openapiclient.NewCreateRobot() // CreateRobot | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RobotAPI.CreateOrgRobot(context.Background(), orgname, robotShortname).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RobotAPI.CreateOrgRobot``: %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. +**orgname** | **string** | The name of the organization | +**robotShortname** | **string** | The short name for the robot, without any user or organization prefix | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateOrgRobotRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | [**CreateRobot**](CreateRobot.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## CreateUserRobot + +> CreateUserRobot(ctx, robotShortname).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + robotShortname := "robotShortname_example" // string | The short name for the robot, without any user or organization prefix + body := *openapiclient.NewCreateRobot() // CreateRobot | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RobotAPI.CreateUserRobot(context.Background(), robotShortname).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RobotAPI.CreateUserRobot``: %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. +**robotShortname** | **string** | The short name for the robot, without any user or organization prefix | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateUserRobotRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**CreateRobot**](CreateRobot.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteOrgRobot + +> DeleteOrgRobot(ctx, orgname, robotShortname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + robotShortname := "robotShortname_example" // string | The short name for the robot, without any user or organization prefix + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RobotAPI.DeleteOrgRobot(context.Background(), orgname, robotShortname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RobotAPI.DeleteOrgRobot``: %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. +**orgname** | **string** | The name of the organization | +**robotShortname** | **string** | The short name for the robot, without any user or organization prefix | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteOrgRobotRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteUserRobot + +> DeleteUserRobot(ctx, robotShortname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + robotShortname := "robotShortname_example" // string | The short name for the robot, without any user or organization prefix + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RobotAPI.DeleteUserRobot(context.Background(), robotShortname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RobotAPI.DeleteUserRobot``: %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. +**robotShortname** | **string** | The short name for the robot, without any user or organization prefix | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteUserRobotRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetOrgRobot + +> GetOrgRobot(ctx, orgname, robotShortname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + robotShortname := "robotShortname_example" // string | The short name for the robot, without any user or organization prefix + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RobotAPI.GetOrgRobot(context.Background(), orgname, robotShortname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RobotAPI.GetOrgRobot``: %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. +**orgname** | **string** | The name of the organization | +**robotShortname** | **string** | The short name for the robot, without any user or organization prefix | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrgRobotRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetOrgRobotPermissions + +> GetOrgRobotPermissions(ctx, orgname, robotShortname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + robotShortname := "robotShortname_example" // string | The short name for the robot, without any user or organization prefix + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RobotAPI.GetOrgRobotPermissions(context.Background(), orgname, robotShortname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RobotAPI.GetOrgRobotPermissions``: %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. +**orgname** | **string** | The name of the organization | +**robotShortname** | **string** | The short name for the robot, without any user or organization prefix | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrgRobotPermissionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetOrgRobots + +> GetOrgRobots(ctx, orgname).Limit(limit).Token(token).Permissions(permissions).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + limit := int32(56) // int32 | If specified, the number of robots to return. (optional) + token := true // bool | If false, the robot's token is not returned. (optional) + permissions := true // bool | Whether to include repostories and teams in which the robots have permission. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RobotAPI.GetOrgRobots(context.Background(), orgname).Limit(limit).Token(token).Permissions(permissions).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RobotAPI.GetOrgRobots``: %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. +**orgname** | **string** | The name of the organization | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrgRobotsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **limit** | **int32** | If specified, the number of robots to return. | + **token** | **bool** | If false, the robot's token is not returned. | + **permissions** | **bool** | Whether to include repostories and teams in which the robots have permission. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetUserRobot + +> GetUserRobot(ctx, robotShortname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + robotShortname := "robotShortname_example" // string | The short name for the robot, without any user or organization prefix + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RobotAPI.GetUserRobot(context.Background(), robotShortname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RobotAPI.GetUserRobot``: %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. +**robotShortname** | **string** | The short name for the robot, without any user or organization prefix | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserRobotRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetUserRobotPermissions + +> GetUserRobotPermissions(ctx, robotShortname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + robotShortname := "robotShortname_example" // string | The short name for the robot, without any user or organization prefix + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RobotAPI.GetUserRobotPermissions(context.Background(), robotShortname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RobotAPI.GetUserRobotPermissions``: %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. +**robotShortname** | **string** | The short name for the robot, without any user or organization prefix | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserRobotPermissionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetUserRobots + +> GetUserRobots(ctx).Limit(limit).Token(token).Permissions(permissions).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + limit := int32(56) // int32 | If specified, the number of robots to return. (optional) + token := true // bool | If false, the robot's token is not returned. (optional) + permissions := true // bool | Whether to include repositories and teams in which the robots have permission. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RobotAPI.GetUserRobots(context.Background()).Limit(limit).Token(token).Permissions(permissions).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RobotAPI.GetUserRobots``: %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 apiGetUserRobotsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int32** | If specified, the number of robots to return. | + **token** | **bool** | If false, the robot's token is not returned. | + **permissions** | **bool** | Whether to include repositories and teams in which the robots have permission. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## RegenerateOrgRobotToken + +> RegenerateOrgRobotToken(ctx, orgname, robotShortname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + robotShortname := "robotShortname_example" // string | The short name for the robot, without any user or organization prefix + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RobotAPI.RegenerateOrgRobotToken(context.Background(), orgname, robotShortname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RobotAPI.RegenerateOrgRobotToken``: %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. +**orgname** | **string** | The name of the organization | +**robotShortname** | **string** | The short name for the robot, without any user or organization prefix | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRegenerateOrgRobotTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## RegenerateUserRobotToken + +> RegenerateUserRobotToken(ctx, robotShortname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + robotShortname := "robotShortname_example" // string | The short name for the robot, without any user or organization prefix + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.RobotAPI.RegenerateUserRobotToken(context.Background(), robotShortname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `RobotAPI.RegenerateUserRobotToken``: %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. +**robotShortname** | **string** | The short name for the robot, without any user or organization prefix | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRegenerateUserRobotTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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/quay_api/docs/RunParameters.md b/quay_api/docs/RunParameters.md new file mode 100644 index 0000000..3614e10 --- /dev/null +++ b/quay_api/docs/RunParameters.md @@ -0,0 +1,82 @@ +# RunParameters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BranchName** | Pointer to **string** | (SCM only) If specified, the name of the branch to build. | [optional] +**CommitSha** | Pointer to **string** | (Custom Only) If specified, the ref/SHA1 used to checkout a git repository. | [optional] + +## Methods + +### NewRunParameters + +`func NewRunParameters() *RunParameters` + +NewRunParameters instantiates a new RunParameters 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 + +### NewRunParametersWithDefaults + +`func NewRunParametersWithDefaults() *RunParameters` + +NewRunParametersWithDefaults instantiates a new RunParameters 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 + +### GetBranchName + +`func (o *RunParameters) GetBranchName() string` + +GetBranchName returns the BranchName field if non-nil, zero value otherwise. + +### GetBranchNameOk + +`func (o *RunParameters) GetBranchNameOk() (*string, bool)` + +GetBranchNameOk returns a tuple with the BranchName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBranchName + +`func (o *RunParameters) SetBranchName(v string)` + +SetBranchName sets BranchName field to given value. + +### HasBranchName + +`func (o *RunParameters) HasBranchName() bool` + +HasBranchName returns a boolean if a field has been set. + +### GetCommitSha + +`func (o *RunParameters) GetCommitSha() string` + +GetCommitSha returns the CommitSha field if non-nil, zero value otherwise. + +### GetCommitShaOk + +`func (o *RunParameters) GetCommitShaOk() (*string, bool)` + +GetCommitShaOk returns a tuple with the CommitSha field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommitSha + +`func (o *RunParameters) SetCommitSha(v string)` + +SetCommitSha sets CommitSha field to given value. + +### HasCommitSha + +`func (o *RunParameters) HasCommitSha() bool` + +HasCommitSha 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/quay_api/docs/SearchAPI.md b/quay_api/docs/SearchAPI.md new file mode 100644 index 0000000..dcec681 --- /dev/null +++ b/quay_api/docs/SearchAPI.md @@ -0,0 +1,217 @@ +# \SearchAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ConductRepoSearch**](SearchAPI.md#ConductRepoSearch) | **Get** /api/v1/find/repositories | +[**ConductSearch**](SearchAPI.md#ConductSearch) | **Get** /api/v1/find/all | +[**GetMatchingEntities**](SearchAPI.md#GetMatchingEntities) | **Get** /api/v1/entities/{prefix} | + + + +## ConductRepoSearch + +> ConductRepoSearch(ctx).IncludeUsage(includeUsage).Page(page).Query(query).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + includeUsage := true // bool | Whether to include usage metadata (optional) + page := int32(56) // int32 | The page. (optional) + query := "query_example" // string | The search query. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SearchAPI.ConductRepoSearch(context.Background()).IncludeUsage(includeUsage).Page(page).Query(query).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SearchAPI.ConductRepoSearch``: %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 apiConductRepoSearchRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **includeUsage** | **bool** | Whether to include usage metadata | + **page** | **int32** | The page. | + **query** | **string** | The search query. | + +### Return type + + (empty response body) + +### 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) + + +## ConductSearch + +> ConductSearch(ctx).Query(query).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + query := "query_example" // string | The search query. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SearchAPI.ConductSearch(context.Background()).Query(query).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SearchAPI.ConductSearch``: %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 apiConductSearchRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **string** | The search query. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetMatchingEntities + +> GetMatchingEntities(ctx, prefix).IncludeOrgs(includeOrgs).IncludeTeams(includeTeams).Namespace(namespace).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + prefix := "prefix_example" // string | + includeOrgs := true // bool | Whether to include orgs names. (optional) + includeTeams := true // bool | Whether to include team names. (optional) + namespace := "namespace_example" // string | Namespace to use when querying for org entities. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SearchAPI.GetMatchingEntities(context.Background(), prefix).IncludeOrgs(includeOrgs).IncludeTeams(includeTeams).Namespace(namespace).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SearchAPI.GetMatchingEntities``: %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. +**prefix** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetMatchingEntitiesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **includeOrgs** | **bool** | Whether to include orgs names. | + **includeTeams** | **bool** | Whether to include team names. | + **namespace** | **string** | Namespace to use when querying for org entities. | + +### Return type + + (empty response body) + +### 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/quay_api/docs/SuperuserAPI.md b/quay_api/docs/SuperuserAPI.md new file mode 100644 index 0000000..5b6a09a --- /dev/null +++ b/quay_api/docs/SuperuserAPI.md @@ -0,0 +1,1515 @@ +# \SuperuserAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ApproveServiceKey**](SuperuserAPI.md#ApproveServiceKey) | **Post** /api/v1/superuser/approvedkeys/{kid} | +[**ChangeOrganization**](SuperuserAPI.md#ChangeOrganization) | **Put** /api/v1/superuser/organizations/{name} | +[**ChangeOrganizationQuotaSuperUser**](SuperuserAPI.md#ChangeOrganizationQuotaSuperUser) | **Put** /api/v1/superuser/organization/{namespace}/quota/{quota_id} | +[**ChangeUserQuotaSuperUser**](SuperuserAPI.md#ChangeUserQuotaSuperUser) | **Put** /api/v1/superuser/users/{namespace}/quota/{quota_id} | +[**CreateInstallUser**](SuperuserAPI.md#CreateInstallUser) | **Post** /api/v1/superuser/users/ | +[**CreateOrganizationQuotaSuperUser**](SuperuserAPI.md#CreateOrganizationQuotaSuperUser) | **Post** /api/v1/superuser/organization/{namespace}/quota | +[**CreateServiceKey**](SuperuserAPI.md#CreateServiceKey) | **Post** /api/v1/superuser/keys | +[**CreateUserQuotaSuperUser**](SuperuserAPI.md#CreateUserQuotaSuperUser) | **Post** /api/v1/superuser/users/{namespace}/quota | +[**DeleteOrganization**](SuperuserAPI.md#DeleteOrganization) | **Delete** /api/v1/superuser/organizations/{name} | +[**DeleteOrganizationQuotaSuperUser**](SuperuserAPI.md#DeleteOrganizationQuotaSuperUser) | **Delete** /api/v1/superuser/organization/{namespace}/quota/{quota_id} | +[**DeleteServiceKey**](SuperuserAPI.md#DeleteServiceKey) | **Delete** /api/v1/superuser/keys/{kid} | +[**DeleteUserQuotaSuperUser**](SuperuserAPI.md#DeleteUserQuotaSuperUser) | **Delete** /api/v1/superuser/users/{namespace}/quota/{quota_id} | +[**GetRepoBuildLogsSuperUser**](SuperuserAPI.md#GetRepoBuildLogsSuperUser) | **Get** /api/v1/superuser/{build_uuid}/logs | +[**GetRepoBuildStatusSuperUser**](SuperuserAPI.md#GetRepoBuildStatusSuperUser) | **Get** /api/v1/superuser/{build_uuid}/status | +[**GetRepoBuildSuperUser**](SuperuserAPI.md#GetRepoBuildSuperUser) | **Get** /api/v1/superuser/{build_uuid}/build | +[**GetServiceKey**](SuperuserAPI.md#GetServiceKey) | **Get** /api/v1/superuser/keys/{kid} | +[**ListAllLogs**](SuperuserAPI.md#ListAllLogs) | **Get** /api/v1/superuser/logs | +[**ListAllUsers**](SuperuserAPI.md#ListAllUsers) | **Get** /api/v1/superuser/users/ | +[**ListOrganizationQuotaSuperUser**](SuperuserAPI.md#ListOrganizationQuotaSuperUser) | **Get** /api/v1/superuser/organization/{namespace}/quota | +[**ListServiceKeys**](SuperuserAPI.md#ListServiceKeys) | **Get** /api/v1/superuser/keys | +[**ListUserQuotaSuperUser**](SuperuserAPI.md#ListUserQuotaSuperUser) | **Get** /api/v1/superuser/users/{namespace}/quota | +[**UpdateServiceKey**](SuperuserAPI.md#UpdateServiceKey) | **Put** /api/v1/superuser/keys/{kid} | + + + +## ApproveServiceKey + +> ApproveServiceKey(ctx, kid).Body(body).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + kid := "kid_example" // string | The unique identifier for a service key + body := *openapiclient.NewApproveServiceKey() // ApproveServiceKey | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.ApproveServiceKey(context.Background(), kid).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.ApproveServiceKey``: %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. +**kid** | **string** | The unique identifier for a service key | + +### Other Parameters + +Other parameters are passed through a pointer to a apiApproveServiceKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**ApproveServiceKey**](ApproveServiceKey.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ChangeOrganization + +> ChangeOrganization(ctx, name).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + name := "name_example" // string | The name of the organizaton being managed + body := *openapiclient.NewUpdateOrg() // UpdateOrg | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.ChangeOrganization(context.Background(), name).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.ChangeOrganization``: %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. +**name** | **string** | The name of the organizaton being managed | + +### Other Parameters + +Other parameters are passed through a pointer to a apiChangeOrganizationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**UpdateOrg**](UpdateOrg.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ChangeOrganizationQuotaSuperUser + +> ChangeOrganizationQuotaSuperUser(ctx, quotaId, namespace).Body(body).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + quotaId := "quotaId_example" // string | + namespace := "namespace_example" // string | + body := *openapiclient.NewUpdateNamespaceQuota() // UpdateNamespaceQuota | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.ChangeOrganizationQuotaSuperUser(context.Background(), quotaId, namespace).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.ChangeOrganizationQuotaSuperUser``: %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. +**quotaId** | **string** | | +**namespace** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiChangeOrganizationQuotaSuperUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | [**UpdateNamespaceQuota**](UpdateNamespaceQuota.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ChangeUserQuotaSuperUser + +> ChangeUserQuotaSuperUser(ctx, quotaId, namespace).Body(body).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + quotaId := "quotaId_example" // string | + namespace := "namespace_example" // string | + body := *openapiclient.NewUpdateNamespaceQuota() // UpdateNamespaceQuota | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.ChangeUserQuotaSuperUser(context.Background(), quotaId, namespace).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.ChangeUserQuotaSuperUser``: %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. +**quotaId** | **string** | | +**namespace** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiChangeUserQuotaSuperUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | [**UpdateNamespaceQuota**](UpdateNamespaceQuota.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## CreateInstallUser + +> CreateInstallUser(ctx).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + body := *openapiclient.NewCreateInstallUser("Username_example") // CreateInstallUser | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.CreateInstallUser(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.CreateInstallUser``: %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 apiCreateInstallUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateInstallUser**](CreateInstallUser.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## CreateOrganizationQuotaSuperUser + +> CreateOrganizationQuotaSuperUser(ctx, namespace).Body(body).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + namespace := "namespace_example" // string | + body := *openapiclient.NewNewNamespaceQuota(int32(123)) // NewNamespaceQuota | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.CreateOrganizationQuotaSuperUser(context.Background(), namespace).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.CreateOrganizationQuotaSuperUser``: %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. +**namespace** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateOrganizationQuotaSuperUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**NewNamespaceQuota**](NewNamespaceQuota.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## CreateServiceKey + +> CreateServiceKey(ctx).Body(body).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + body := *openapiclient.NewCreateServiceKey("Service_example", map[string]interface{}(123)) // CreateServiceKey | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.CreateServiceKey(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.CreateServiceKey``: %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 apiCreateServiceKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateServiceKey**](CreateServiceKey.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## CreateUserQuotaSuperUser + +> CreateUserQuotaSuperUser(ctx, namespace).Body(body).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + namespace := "namespace_example" // string | + body := *openapiclient.NewNewNamespaceQuota(int32(123)) // NewNamespaceQuota | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.CreateUserQuotaSuperUser(context.Background(), namespace).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.CreateUserQuotaSuperUser``: %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. +**namespace** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateUserQuotaSuperUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**NewNamespaceQuota**](NewNamespaceQuota.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteOrganization + +> DeleteOrganization(ctx, name).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + name := "name_example" // string | The name of the organizaton being managed + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.DeleteOrganization(context.Background(), name).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.DeleteOrganization``: %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. +**name** | **string** | The name of the organizaton being managed | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteOrganizationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteOrganizationQuotaSuperUser + +> DeleteOrganizationQuotaSuperUser(ctx, quotaId, namespace).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + quotaId := "quotaId_example" // string | + namespace := "namespace_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.DeleteOrganizationQuotaSuperUser(context.Background(), quotaId, namespace).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.DeleteOrganizationQuotaSuperUser``: %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. +**quotaId** | **string** | | +**namespace** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteOrganizationQuotaSuperUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteServiceKey + +> DeleteServiceKey(ctx, kid).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + kid := "kid_example" // string | The unique identifier for a service key + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.DeleteServiceKey(context.Background(), kid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.DeleteServiceKey``: %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. +**kid** | **string** | The unique identifier for a service key | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteServiceKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteUserQuotaSuperUser + +> DeleteUserQuotaSuperUser(ctx, quotaId, namespace).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + quotaId := "quotaId_example" // string | + namespace := "namespace_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.DeleteUserQuotaSuperUser(context.Background(), quotaId, namespace).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.DeleteUserQuotaSuperUser``: %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. +**quotaId** | **string** | | +**namespace** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteUserQuotaSuperUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetRepoBuildLogsSuperUser + +> GetRepoBuildLogsSuperUser(ctx, buildUuid).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + buildUuid := "buildUuid_example" // string | The UUID of the build + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.GetRepoBuildLogsSuperUser(context.Background(), buildUuid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.GetRepoBuildLogsSuperUser``: %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. +**buildUuid** | **string** | The UUID of the build | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRepoBuildLogsSuperUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetRepoBuildStatusSuperUser + +> GetRepoBuildStatusSuperUser(ctx, repository, buildUuid).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + buildUuid := "buildUuid_example" // string | The UUID of the build + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.GetRepoBuildStatusSuperUser(context.Background(), repository, buildUuid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.GetRepoBuildStatusSuperUser``: %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** | The full path of the repository. e.g. namespace/name | +**buildUuid** | **string** | The UUID of the build | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRepoBuildStatusSuperUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetRepoBuildSuperUser + +> GetRepoBuildSuperUser(ctx, repository, buildUuid).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + buildUuid := "buildUuid_example" // string | The UUID of the build + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.GetRepoBuildSuperUser(context.Background(), repository, buildUuid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.GetRepoBuildSuperUser``: %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** | The full path of the repository. e.g. namespace/name | +**buildUuid** | **string** | The UUID of the build | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetRepoBuildSuperUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetServiceKey + +> GetServiceKey(ctx, kid).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + kid := "kid_example" // string | The unique identifier for a service key + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.GetServiceKey(context.Background(), kid).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.GetServiceKey``: %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. +**kid** | **string** | The unique identifier for a service key | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetServiceKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListAllLogs + +> ListAllLogs(ctx).NextPage(nextPage).Page(page).Endtime(endtime).Starttime(starttime).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + nextPage := "nextPage_example" // string | The page token for the next page (optional) + page := int32(56) // int32 | The page number for the logs (optional) + endtime := "endtime_example" // string | Latest time to which to get logs (%m/%d/%Y %Z) (optional) + starttime := "starttime_example" // string | Earliest time from which to get logs (%m/%d/%Y %Z) (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.ListAllLogs(context.Background()).NextPage(nextPage).Page(page).Endtime(endtime).Starttime(starttime).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.ListAllLogs``: %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 apiListAllLogsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **nextPage** | **string** | The page token for the next page | + **page** | **int32** | The page number for the logs | + **endtime** | **string** | Latest time to which to get logs (%m/%d/%Y %Z) | + **starttime** | **string** | Earliest time from which to get logs (%m/%d/%Y %Z) | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListAllUsers + +> ListAllUsers(ctx).NextPage(nextPage).Limit(limit).Disabled(disabled).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + nextPage := "nextPage_example" // string | The page token for the next page (optional) + limit := int32(56) // int32 | Limit to the number of results to return per page. Max 100. (optional) + disabled := true // bool | If false, only enabled users will be returned. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.ListAllUsers(context.Background()).NextPage(nextPage).Limit(limit).Disabled(disabled).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.ListAllUsers``: %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 apiListAllUsersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **nextPage** | **string** | The page token for the next page | + **limit** | **int32** | Limit to the number of results to return per page. Max 100. | + **disabled** | **bool** | If false, only enabled users will be returned. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListOrganizationQuotaSuperUser + +> ListOrganizationQuotaSuperUser(ctx, namespace).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + namespace := "namespace_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.ListOrganizationQuotaSuperUser(context.Background(), namespace).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.ListOrganizationQuotaSuperUser``: %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. +**namespace** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListOrganizationQuotaSuperUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListServiceKeys + +> ListServiceKeys(ctx).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.ListServiceKeys(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.ListServiceKeys``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiListServiceKeysRequest struct via the builder pattern + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListUserQuotaSuperUser + +> ListUserQuotaSuperUser(ctx, namespace).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + namespace := "namespace_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.ListUserQuotaSuperUser(context.Background(), namespace).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.ListUserQuotaSuperUser``: %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. +**namespace** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListUserQuotaSuperUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## UpdateServiceKey + +> UpdateServiceKey(ctx, kid).Body(body).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + kid := "kid_example" // string | The unique identifier for a service key + body := *openapiclient.NewPutServiceKey() // PutServiceKey | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.SuperuserAPI.UpdateServiceKey(context.Background(), kid).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SuperuserAPI.UpdateServiceKey``: %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. +**kid** | **string** | The unique identifier for a service key | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateServiceKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**PutServiceKey**](PutServiceKey.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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/quay_api/docs/TagAPI.md b/quay_api/docs/TagAPI.md new file mode 100644 index 0000000..b60a6b8 --- /dev/null +++ b/quay_api/docs/TagAPI.md @@ -0,0 +1,305 @@ +# \TagAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ChangeTag**](TagAPI.md#ChangeTag) | **Put** /api/v1/repository/{repository}/tag/{tag} | +[**DeleteFullTag**](TagAPI.md#DeleteFullTag) | **Delete** /api/v1/repository/{repository}/tag/{tag} | +[**ListRepoTags**](TagAPI.md#ListRepoTags) | **Get** /api/v1/repository/{repository}/tag/ | +[**RestoreTag**](TagAPI.md#RestoreTag) | **Post** /api/v1/repository/{repository}/tag/{tag}/restore | + + + +## ChangeTag + +> ChangeTag(ctx, repository, tag).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + tag := "tag_example" // string | The name of the tag + body := map[string]interface{}{ ... } // map[string]interface{} | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TagAPI.ChangeTag(context.Background(), repository, tag).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TagAPI.ChangeTag``: %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** | The full path of the repository. e.g. namespace/name | +**tag** | **string** | The name of the tag | + +### Other Parameters + +Other parameters are passed through a pointer to a apiChangeTagRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | **map[string]interface{}** | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteFullTag + +> DeleteFullTag(ctx, repository, tag).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + tag := "tag_example" // string | The name of the tag + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TagAPI.DeleteFullTag(context.Background(), repository, tag).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TagAPI.DeleteFullTag``: %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** | The full path of the repository. e.g. namespace/name | +**tag** | **string** | The name of the tag | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteFullTagRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListRepoTags + +> ListRepoTags(ctx, repository).OnlyActiveTags(onlyActiveTags).Page(page).Limit(limit).FilterTagName(filterTagName).SpecificTag(specificTag).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + onlyActiveTags := true // bool | Filter to only active tags. (optional) + page := int32(56) // int32 | Page index for the results. Default 1. (optional) + limit := int32(56) // int32 | Limit to the number of results to return per page. Max 100. (optional) + filterTagName := "filterTagName_example" // string | Syntax: : Filters the tag names based on the operation. can be 'like' or 'eq'. (optional) + specificTag := "specificTag_example" // string | Filters the tags to the specific tag. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TagAPI.ListRepoTags(context.Background(), repository).OnlyActiveTags(onlyActiveTags).Page(page).Limit(limit).FilterTagName(filterTagName).SpecificTag(specificTag).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TagAPI.ListRepoTags``: %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** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListRepoTagsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **onlyActiveTags** | **bool** | Filter to only active tags. | + **page** | **int32** | Page index for the results. Default 1. | + **limit** | **int32** | Limit to the number of results to return per page. Max 100. | + **filterTagName** | **string** | Syntax: <op>:<name> Filters the tag names based on the operation.<op> can be 'like' or 'eq'. | + **specificTag** | **string** | Filters the tags to the specific tag. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## RestoreTag + +> RestoreTag(ctx, repository, tag).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + tag := "tag_example" // string | The name of the tag + body := *openapiclient.NewRestoreTag() // RestoreTag | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TagAPI.RestoreTag(context.Background(), repository, tag).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TagAPI.RestoreTag``: %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** | The full path of the repository. e.g. namespace/name | +**tag** | **string** | The name of the tag | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRestoreTagRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | [**RestoreTag**](RestoreTag.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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/quay_api/docs/TeamAPI.md b/quay_api/docs/TeamAPI.md new file mode 100644 index 0000000..b766b38 --- /dev/null +++ b/quay_api/docs/TeamAPI.md @@ -0,0 +1,740 @@ +# \TeamAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteOrganizationTeam**](TeamAPI.md#DeleteOrganizationTeam) | **Delete** /api/v1/organization/{orgname}/team/{teamname} | +[**DeleteOrganizationTeamMember**](TeamAPI.md#DeleteOrganizationTeamMember) | **Delete** /api/v1/organization/{orgname}/team/{teamname}/members/{membername} | +[**DeleteTeamMemberEmailInvite**](TeamAPI.md#DeleteTeamMemberEmailInvite) | **Delete** /api/v1/organization/{orgname}/team/{teamname}/invite/{email} | +[**DisableOrganizationTeamSync**](TeamAPI.md#DisableOrganizationTeamSync) | **Delete** /api/v1/organization/{orgname}/team/{teamname}/syncing | +[**EnableOrganizationTeamSync**](TeamAPI.md#EnableOrganizationTeamSync) | **Post** /api/v1/organization/{orgname}/team/{teamname}/syncing | +[**GetOrganizationTeamMembers**](TeamAPI.md#GetOrganizationTeamMembers) | **Get** /api/v1/organization/{orgname}/team/{teamname}/members | +[**GetOrganizationTeamPermissions**](TeamAPI.md#GetOrganizationTeamPermissions) | **Get** /api/v1/organization/{orgname}/team/{teamname}/permissions | +[**InviteTeamMemberEmail**](TeamAPI.md#InviteTeamMemberEmail) | **Put** /api/v1/organization/{orgname}/team/{teamname}/invite/{email} | +[**UpdateOrganizationTeam**](TeamAPI.md#UpdateOrganizationTeam) | **Put** /api/v1/organization/{orgname}/team/{teamname} | +[**UpdateOrganizationTeamMember**](TeamAPI.md#UpdateOrganizationTeamMember) | **Put** /api/v1/organization/{orgname}/team/{teamname}/members/{membername} | + + + +## DeleteOrganizationTeam + +> DeleteOrganizationTeam(ctx, orgname, teamname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + teamname := "teamname_example" // string | The name of the team + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TeamAPI.DeleteOrganizationTeam(context.Background(), orgname, teamname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TeamAPI.DeleteOrganizationTeam``: %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. +**orgname** | **string** | The name of the organization | +**teamname** | **string** | The name of the team | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteOrganizationTeamRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteOrganizationTeamMember + +> DeleteOrganizationTeamMember(ctx, orgname, membername, teamname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + membername := "membername_example" // string | The username of the team member + teamname := "teamname_example" // string | The name of the team + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TeamAPI.DeleteOrganizationTeamMember(context.Background(), orgname, membername, teamname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TeamAPI.DeleteOrganizationTeamMember``: %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. +**orgname** | **string** | The name of the organization | +**membername** | **string** | The username of the team member | +**teamname** | **string** | The name of the team | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteOrganizationTeamMemberRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteTeamMemberEmailInvite + +> DeleteTeamMemberEmailInvite(ctx, orgname, email, teamname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | + email := "email_example" // string | + teamname := "teamname_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TeamAPI.DeleteTeamMemberEmailInvite(context.Background(), orgname, email, teamname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TeamAPI.DeleteTeamMemberEmailInvite``: %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. +**orgname** | **string** | | +**email** | **string** | | +**teamname** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteTeamMemberEmailInviteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DisableOrganizationTeamSync + +> DisableOrganizationTeamSync(ctx, orgname, teamname).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + teamname := "teamname_example" // string | The name of the team + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TeamAPI.DisableOrganizationTeamSync(context.Background(), orgname, teamname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TeamAPI.DisableOrganizationTeamSync``: %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. +**orgname** | **string** | The name of the organization | +**teamname** | **string** | The name of the team | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDisableOrganizationTeamSyncRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## EnableOrganizationTeamSync + +> EnableOrganizationTeamSync(ctx, orgname, teamname).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + teamname := "teamname_example" // string | The name of the team + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TeamAPI.EnableOrganizationTeamSync(context.Background(), orgname, teamname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TeamAPI.EnableOrganizationTeamSync``: %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. +**orgname** | **string** | The name of the organization | +**teamname** | **string** | The name of the team | + +### Other Parameters + +Other parameters are passed through a pointer to a apiEnableOrganizationTeamSyncRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetOrganizationTeamMembers + +> GetOrganizationTeamMembers(ctx, orgname, teamname).IncludePending(includePending).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + teamname := "teamname_example" // string | The name of the team + includePending := true // bool | Whether to include pending members (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TeamAPI.GetOrganizationTeamMembers(context.Background(), orgname, teamname).IncludePending(includePending).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TeamAPI.GetOrganizationTeamMembers``: %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. +**orgname** | **string** | The name of the organization | +**teamname** | **string** | The name of the team | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrganizationTeamMembersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **includePending** | **bool** | Whether to include pending members | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetOrganizationTeamPermissions + +> GetOrganizationTeamPermissions(ctx, orgname, teamname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + teamname := "teamname_example" // string | The name of the team + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TeamAPI.GetOrganizationTeamPermissions(context.Background(), orgname, teamname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TeamAPI.GetOrganizationTeamPermissions``: %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. +**orgname** | **string** | The name of the organization | +**teamname** | **string** | The name of the team | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrganizationTeamPermissionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### 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) + + +## InviteTeamMemberEmail + +> InviteTeamMemberEmail(ctx, orgname, email, teamname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | + email := "email_example" // string | + teamname := "teamname_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TeamAPI.InviteTeamMemberEmail(context.Background(), orgname, email, teamname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TeamAPI.InviteTeamMemberEmail``: %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. +**orgname** | **string** | | +**email** | **string** | | +**teamname** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiInviteTeamMemberEmailRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## UpdateOrganizationTeam + +> UpdateOrganizationTeam(ctx, orgname, teamname).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + teamname := "teamname_example" // string | The name of the team + body := *openapiclient.NewTeamDescription("Role_example") // TeamDescription | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TeamAPI.UpdateOrganizationTeam(context.Background(), orgname, teamname).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TeamAPI.UpdateOrganizationTeam``: %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. +**orgname** | **string** | The name of the organization | +**teamname** | **string** | The name of the team | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateOrganizationTeamRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | [**TeamDescription**](TeamDescription.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## UpdateOrganizationTeamMember + +> UpdateOrganizationTeamMember(ctx, orgname, membername, teamname).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + orgname := "orgname_example" // string | The name of the organization + membername := "membername_example" // string | The username of the team member + teamname := "teamname_example" // string | The name of the team + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TeamAPI.UpdateOrganizationTeamMember(context.Background(), orgname, membername, teamname).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TeamAPI.UpdateOrganizationTeamMember``: %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. +**orgname** | **string** | The name of the organization | +**membername** | **string** | The username of the team member | +**teamname** | **string** | The name of the team | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateOrganizationTeamMemberRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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/quay_api/docs/TeamDescription.md b/quay_api/docs/TeamDescription.md new file mode 100644 index 0000000..c29ac97 --- /dev/null +++ b/quay_api/docs/TeamDescription.md @@ -0,0 +1,77 @@ +# TeamDescription + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Role** | **string** | Org wide permissions that should apply to the team | +**Description** | Pointer to **string** | Markdown description for the team | [optional] + +## Methods + +### NewTeamDescription + +`func NewTeamDescription(role string, ) *TeamDescription` + +NewTeamDescription instantiates a new TeamDescription 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 + +### NewTeamDescriptionWithDefaults + +`func NewTeamDescriptionWithDefaults() *TeamDescription` + +NewTeamDescriptionWithDefaults instantiates a new TeamDescription 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 + +### GetRole + +`func (o *TeamDescription) GetRole() string` + +GetRole returns the Role field if non-nil, zero value otherwise. + +### GetRoleOk + +`func (o *TeamDescription) GetRoleOk() (*string, bool)` + +GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRole + +`func (o *TeamDescription) SetRole(v string)` + +SetRole sets Role field to given value. + + +### GetDescription + +`func (o *TeamDescription) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *TeamDescription) 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 *TeamDescription) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *TeamDescription) 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/quay_api/docs/TeamPermission.md b/quay_api/docs/TeamPermission.md new file mode 100644 index 0000000..74498a5 --- /dev/null +++ b/quay_api/docs/TeamPermission.md @@ -0,0 +1,51 @@ +# TeamPermission + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Role** | **string** | Role to use for the team | + +## Methods + +### NewTeamPermission + +`func NewTeamPermission(role string, ) *TeamPermission` + +NewTeamPermission instantiates a new TeamPermission 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 + +### NewTeamPermissionWithDefaults + +`func NewTeamPermissionWithDefaults() *TeamPermission` + +NewTeamPermissionWithDefaults instantiates a new TeamPermission 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 + +### GetRole + +`func (o *TeamPermission) GetRole() string` + +GetRole returns the Role field if non-nil, zero value otherwise. + +### GetRoleOk + +`func (o *TeamPermission) GetRoleOk() (*string, bool)` + +GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRole + +`func (o *TeamPermission) SetRole(v string)` + +SetRole sets Role 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/quay_api/docs/TokenPermission.md b/quay_api/docs/TokenPermission.md new file mode 100644 index 0000000..f35d5cb --- /dev/null +++ b/quay_api/docs/TokenPermission.md @@ -0,0 +1,51 @@ +# TokenPermission + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Role** | **string** | Role to use for the token | + +## Methods + +### NewTokenPermission + +`func NewTokenPermission(role string, ) *TokenPermission` + +NewTokenPermission instantiates a new TokenPermission 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 + +### NewTokenPermissionWithDefaults + +`func NewTokenPermissionWithDefaults() *TokenPermission` + +NewTokenPermissionWithDefaults instantiates a new TokenPermission 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 + +### GetRole + +`func (o *TokenPermission) GetRole() string` + +GetRole returns the Role field if non-nil, zero value otherwise. + +### GetRoleOk + +`func (o *TokenPermission) GetRoleOk() (*string, bool)` + +GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRole + +`func (o *TokenPermission) SetRole(v string)` + +SetRole sets Role 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/quay_api/docs/TriggerAPI.md b/quay_api/docs/TriggerAPI.md new file mode 100644 index 0000000..bd3cdcb --- /dev/null +++ b/quay_api/docs/TriggerAPI.md @@ -0,0 +1,517 @@ +# \TriggerAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ActivateBuildTrigger**](TriggerAPI.md#ActivateBuildTrigger) | **Post** /api/v1/repository/{repository}/trigger/{trigger_uuid}/activate | +[**DeleteBuildTrigger**](TriggerAPI.md#DeleteBuildTrigger) | **Delete** /api/v1/repository/{repository}/trigger/{trigger_uuid} | +[**GetBuildTrigger**](TriggerAPI.md#GetBuildTrigger) | **Get** /api/v1/repository/{repository}/trigger/{trigger_uuid} | +[**ListBuildTriggers**](TriggerAPI.md#ListBuildTriggers) | **Get** /api/v1/repository/{repository}/trigger/ | +[**ListTriggerRecentBuilds**](TriggerAPI.md#ListTriggerRecentBuilds) | **Get** /api/v1/repository/{repository}/trigger/{trigger_uuid}/builds | +[**ManuallyStartBuildTrigger**](TriggerAPI.md#ManuallyStartBuildTrigger) | **Post** /api/v1/repository/{repository}/trigger/{trigger_uuid}/start | +[**UpdateBuildTrigger**](TriggerAPI.md#UpdateBuildTrigger) | **Put** /api/v1/repository/{repository}/trigger/{trigger_uuid} | + + + +## ActivateBuildTrigger + +> ActivateBuildTrigger(ctx, triggerUuid, repository).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + triggerUuid := "triggerUuid_example" // string | The UUID of the build trigger + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + body := *openapiclient.NewBuildTriggerActivateRequest(map[string]interface{}(123)) // BuildTriggerActivateRequest | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TriggerAPI.ActivateBuildTrigger(context.Background(), triggerUuid, repository).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TriggerAPI.ActivateBuildTrigger``: %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. +**triggerUuid** | **string** | The UUID of the build trigger | +**repository** | **string** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiActivateBuildTriggerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | [**BuildTriggerActivateRequest**](BuildTriggerActivateRequest.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteBuildTrigger + +> DeleteBuildTrigger(ctx, triggerUuid, repository).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + triggerUuid := "triggerUuid_example" // string | The UUID of the build trigger + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TriggerAPI.DeleteBuildTrigger(context.Background(), triggerUuid, repository).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TriggerAPI.DeleteBuildTrigger``: %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. +**triggerUuid** | **string** | The UUID of the build trigger | +**repository** | **string** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteBuildTriggerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetBuildTrigger + +> GetBuildTrigger(ctx, triggerUuid, repository).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + triggerUuid := "triggerUuid_example" // string | The UUID of the build trigger + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TriggerAPI.GetBuildTrigger(context.Background(), triggerUuid, repository).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TriggerAPI.GetBuildTrigger``: %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. +**triggerUuid** | **string** | The UUID of the build trigger | +**repository** | **string** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetBuildTriggerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListBuildTriggers + +> ListBuildTriggers(ctx, repository).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TriggerAPI.ListBuildTriggers(context.Background(), repository).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TriggerAPI.ListBuildTriggers``: %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** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListBuildTriggersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ListTriggerRecentBuilds + +> ListTriggerRecentBuilds(ctx, triggerUuid, repository).Limit(limit).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + triggerUuid := "triggerUuid_example" // string | The UUID of the build trigger + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + limit := int32(56) // int32 | The maximum number of builds to return (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TriggerAPI.ListTriggerRecentBuilds(context.Background(), triggerUuid, repository).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TriggerAPI.ListTriggerRecentBuilds``: %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. +**triggerUuid** | **string** | The UUID of the build trigger | +**repository** | **string** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListTriggerRecentBuildsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **limit** | **int32** | The maximum number of builds to return | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## ManuallyStartBuildTrigger + +> ManuallyStartBuildTrigger(ctx, triggerUuid, repository).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + triggerUuid := "triggerUuid_example" // string | The UUID of the build trigger + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + body := *openapiclient.NewRunParameters() // RunParameters | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TriggerAPI.ManuallyStartBuildTrigger(context.Background(), triggerUuid, repository).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TriggerAPI.ManuallyStartBuildTrigger``: %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. +**triggerUuid** | **string** | The UUID of the build trigger | +**repository** | **string** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiManuallyStartBuildTriggerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | [**RunParameters**](RunParameters.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## UpdateBuildTrigger + +> UpdateBuildTrigger(ctx, triggerUuid, repository).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + triggerUuid := "triggerUuid_example" // string | The UUID of the build trigger + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + body := *openapiclient.NewUpdateTrigger(false) // UpdateTrigger | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.TriggerAPI.UpdateBuildTrigger(context.Background(), triggerUuid, repository).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TriggerAPI.UpdateBuildTrigger``: %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. +**triggerUuid** | **string** | The UUID of the build trigger | +**repository** | **string** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateBuildTriggerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | [**UpdateTrigger**](UpdateTrigger.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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/quay_api/docs/UpdateApp.md b/quay_api/docs/UpdateApp.md new file mode 100644 index 0000000..769aa8e --- /dev/null +++ b/quay_api/docs/UpdateApp.md @@ -0,0 +1,145 @@ +# UpdateApp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the application | +**RedirectUri** | **string** | The URI for the application's OAuth redirect | +**ApplicationUri** | **string** | The URI for the application's homepage | +**Description** | Pointer to **string** | The human-readable description for the application | [optional] +**AvatarEmail** | Pointer to **string** | The e-mail address of the avatar to use for the application | [optional] + +## Methods + +### NewUpdateApp + +`func NewUpdateApp(name string, redirectUri string, applicationUri string, ) *UpdateApp` + +NewUpdateApp instantiates a new UpdateApp 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 + +### NewUpdateAppWithDefaults + +`func NewUpdateAppWithDefaults() *UpdateApp` + +NewUpdateAppWithDefaults instantiates a new UpdateApp 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 *UpdateApp) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UpdateApp) 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 *UpdateApp) SetName(v string)` + +SetName sets Name field to given value. + + +### GetRedirectUri + +`func (o *UpdateApp) GetRedirectUri() string` + +GetRedirectUri returns the RedirectUri field if non-nil, zero value otherwise. + +### GetRedirectUriOk + +`func (o *UpdateApp) GetRedirectUriOk() (*string, bool)` + +GetRedirectUriOk returns a tuple with the RedirectUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRedirectUri + +`func (o *UpdateApp) SetRedirectUri(v string)` + +SetRedirectUri sets RedirectUri field to given value. + + +### GetApplicationUri + +`func (o *UpdateApp) GetApplicationUri() string` + +GetApplicationUri returns the ApplicationUri field if non-nil, zero value otherwise. + +### GetApplicationUriOk + +`func (o *UpdateApp) GetApplicationUriOk() (*string, bool)` + +GetApplicationUriOk returns a tuple with the ApplicationUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApplicationUri + +`func (o *UpdateApp) SetApplicationUri(v string)` + +SetApplicationUri sets ApplicationUri field to given value. + + +### GetDescription + +`func (o *UpdateApp) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *UpdateApp) 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 *UpdateApp) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *UpdateApp) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetAvatarEmail + +`func (o *UpdateApp) GetAvatarEmail() string` + +GetAvatarEmail returns the AvatarEmail field if non-nil, zero value otherwise. + +### GetAvatarEmailOk + +`func (o *UpdateApp) GetAvatarEmailOk() (*string, bool)` + +GetAvatarEmailOk returns a tuple with the AvatarEmail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAvatarEmail + +`func (o *UpdateApp) SetAvatarEmail(v string)` + +SetAvatarEmail sets AvatarEmail field to given value. + +### HasAvatarEmail + +`func (o *UpdateApp) HasAvatarEmail() bool` + +HasAvatarEmail 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/quay_api/docs/UpdateNamespaceQuota.md b/quay_api/docs/UpdateNamespaceQuota.md new file mode 100644 index 0000000..d62dd29 --- /dev/null +++ b/quay_api/docs/UpdateNamespaceQuota.md @@ -0,0 +1,56 @@ +# UpdateNamespaceQuota + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LimitBytes** | Pointer to **int32** | Number of bytes the organization is allowed | [optional] + +## Methods + +### NewUpdateNamespaceQuota + +`func NewUpdateNamespaceQuota() *UpdateNamespaceQuota` + +NewUpdateNamespaceQuota instantiates a new UpdateNamespaceQuota 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 + +### NewUpdateNamespaceQuotaWithDefaults + +`func NewUpdateNamespaceQuotaWithDefaults() *UpdateNamespaceQuota` + +NewUpdateNamespaceQuotaWithDefaults instantiates a new UpdateNamespaceQuota 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 + +### GetLimitBytes + +`func (o *UpdateNamespaceQuota) GetLimitBytes() int32` + +GetLimitBytes returns the LimitBytes field if non-nil, zero value otherwise. + +### GetLimitBytesOk + +`func (o *UpdateNamespaceQuota) GetLimitBytesOk() (*int32, bool)` + +GetLimitBytesOk returns a tuple with the LimitBytes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimitBytes + +`func (o *UpdateNamespaceQuota) SetLimitBytes(v int32)` + +SetLimitBytes sets LimitBytes field to given value. + +### HasLimitBytes + +`func (o *UpdateNamespaceQuota) HasLimitBytes() bool` + +HasLimitBytes 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/quay_api/docs/UpdateOrg.md b/quay_api/docs/UpdateOrg.md new file mode 100644 index 0000000..81a869f --- /dev/null +++ b/quay_api/docs/UpdateOrg.md @@ -0,0 +1,82 @@ +# UpdateOrg + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | The new name for the organization | [optional] +**Email** | Pointer to **string** | Organization contact email | [optional] + +## Methods + +### NewUpdateOrg + +`func NewUpdateOrg() *UpdateOrg` + +NewUpdateOrg instantiates a new UpdateOrg 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 + +### NewUpdateOrgWithDefaults + +`func NewUpdateOrgWithDefaults() *UpdateOrg` + +NewUpdateOrgWithDefaults instantiates a new UpdateOrg 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 *UpdateOrg) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UpdateOrg) 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 *UpdateOrg) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *UpdateOrg) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetEmail + +`func (o *UpdateOrg) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *UpdateOrg) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *UpdateOrg) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *UpdateOrg) HasEmail() bool` + +HasEmail 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/quay_api/docs/UpdateOrgQuota.md b/quay_api/docs/UpdateOrgQuota.md new file mode 100644 index 0000000..b1612e0 --- /dev/null +++ b/quay_api/docs/UpdateOrgQuota.md @@ -0,0 +1,56 @@ +# UpdateOrgQuota + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LimitBytes** | Pointer to **int32** | Number of bytes the organization is allowed | [optional] + +## Methods + +### NewUpdateOrgQuota + +`func NewUpdateOrgQuota() *UpdateOrgQuota` + +NewUpdateOrgQuota instantiates a new UpdateOrgQuota 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 + +### NewUpdateOrgQuotaWithDefaults + +`func NewUpdateOrgQuotaWithDefaults() *UpdateOrgQuota` + +NewUpdateOrgQuotaWithDefaults instantiates a new UpdateOrgQuota 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 + +### GetLimitBytes + +`func (o *UpdateOrgQuota) GetLimitBytes() int32` + +GetLimitBytes returns the LimitBytes field if non-nil, zero value otherwise. + +### GetLimitBytesOk + +`func (o *UpdateOrgQuota) GetLimitBytesOk() (*int32, bool)` + +GetLimitBytesOk returns a tuple with the LimitBytes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimitBytes + +`func (o *UpdateOrgQuota) SetLimitBytes(v int32)` + +SetLimitBytes sets LimitBytes field to given value. + +### HasLimitBytes + +`func (o *UpdateOrgQuota) HasLimitBytes() bool` + +HasLimitBytes 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/quay_api/docs/UpdateOrgQuotaLimit.md b/quay_api/docs/UpdateOrgQuotaLimit.md new file mode 100644 index 0000000..4e44ffb --- /dev/null +++ b/quay_api/docs/UpdateOrgQuotaLimit.md @@ -0,0 +1,82 @@ +# UpdateOrgQuotaLimit + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | Type of quota limit: \"Warning\" or \"Reject\" | [optional] +**ThresholdPercent** | Pointer to **int32** | Quota threshold, in percent of quota | [optional] + +## Methods + +### NewUpdateOrgQuotaLimit + +`func NewUpdateOrgQuotaLimit() *UpdateOrgQuotaLimit` + +NewUpdateOrgQuotaLimit instantiates a new UpdateOrgQuotaLimit 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 + +### NewUpdateOrgQuotaLimitWithDefaults + +`func NewUpdateOrgQuotaLimitWithDefaults() *UpdateOrgQuotaLimit` + +NewUpdateOrgQuotaLimitWithDefaults instantiates a new UpdateOrgQuotaLimit 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 *UpdateOrgQuotaLimit) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *UpdateOrgQuotaLimit) 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 *UpdateOrgQuotaLimit) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *UpdateOrgQuotaLimit) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetThresholdPercent + +`func (o *UpdateOrgQuotaLimit) GetThresholdPercent() int32` + +GetThresholdPercent returns the ThresholdPercent field if non-nil, zero value otherwise. + +### GetThresholdPercentOk + +`func (o *UpdateOrgQuotaLimit) GetThresholdPercentOk() (*int32, bool)` + +GetThresholdPercentOk returns a tuple with the ThresholdPercent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThresholdPercent + +`func (o *UpdateOrgQuotaLimit) SetThresholdPercent(v int32)` + +SetThresholdPercent sets ThresholdPercent field to given value. + +### HasThresholdPercent + +`func (o *UpdateOrgQuotaLimit) HasThresholdPercent() bool` + +HasThresholdPercent 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/quay_api/docs/UpdateTrigger.md b/quay_api/docs/UpdateTrigger.md new file mode 100644 index 0000000..2224cbc --- /dev/null +++ b/quay_api/docs/UpdateTrigger.md @@ -0,0 +1,51 @@ +# UpdateTrigger + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Whether the build trigger is enabled | + +## Methods + +### NewUpdateTrigger + +`func NewUpdateTrigger(enabled bool, ) *UpdateTrigger` + +NewUpdateTrigger instantiates a new UpdateTrigger 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 + +### NewUpdateTriggerWithDefaults + +`func NewUpdateTriggerWithDefaults() *UpdateTrigger` + +NewUpdateTriggerWithDefaults instantiates a new UpdateTrigger 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 + +### GetEnabled + +`func (o *UpdateTrigger) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *UpdateTrigger) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *UpdateTrigger) SetEnabled(v bool)` + +SetEnabled sets Enabled 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/quay_api/docs/UpdateUser.md b/quay_api/docs/UpdateUser.md new file mode 100644 index 0000000..a83b275 --- /dev/null +++ b/quay_api/docs/UpdateUser.md @@ -0,0 +1,160 @@ +# UpdateUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Password** | Pointer to **string** | The user's password | [optional] +**InvoiceEmail** | Pointer to **bool** | Whether the user desires to receive an invoice email. | [optional] +**Email** | Pointer to **string** | The user's email address | [optional] +**TagExpirationS** | Pointer to **int32** | The number of seconds for tag expiration | [optional] +**Username** | Pointer to **string** | The user's username | [optional] + +## Methods + +### NewUpdateUser + +`func NewUpdateUser() *UpdateUser` + +NewUpdateUser instantiates a new UpdateUser 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 + +### NewUpdateUserWithDefaults + +`func NewUpdateUserWithDefaults() *UpdateUser` + +NewUpdateUserWithDefaults instantiates a new UpdateUser 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 + +### GetPassword + +`func (o *UpdateUser) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *UpdateUser) GetPasswordOk() (*string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassword + +`func (o *UpdateUser) SetPassword(v string)` + +SetPassword sets Password field to given value. + +### HasPassword + +`func (o *UpdateUser) HasPassword() bool` + +HasPassword returns a boolean if a field has been set. + +### GetInvoiceEmail + +`func (o *UpdateUser) GetInvoiceEmail() bool` + +GetInvoiceEmail returns the InvoiceEmail field if non-nil, zero value otherwise. + +### GetInvoiceEmailOk + +`func (o *UpdateUser) GetInvoiceEmailOk() (*bool, bool)` + +GetInvoiceEmailOk returns a tuple with the InvoiceEmail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInvoiceEmail + +`func (o *UpdateUser) SetInvoiceEmail(v bool)` + +SetInvoiceEmail sets InvoiceEmail field to given value. + +### HasInvoiceEmail + +`func (o *UpdateUser) HasInvoiceEmail() bool` + +HasInvoiceEmail returns a boolean if a field has been set. + +### GetEmail + +`func (o *UpdateUser) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *UpdateUser) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *UpdateUser) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *UpdateUser) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### GetTagExpirationS + +`func (o *UpdateUser) GetTagExpirationS() int32` + +GetTagExpirationS returns the TagExpirationS field if non-nil, zero value otherwise. + +### GetTagExpirationSOk + +`func (o *UpdateUser) GetTagExpirationSOk() (*int32, bool)` + +GetTagExpirationSOk returns a tuple with the TagExpirationS field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTagExpirationS + +`func (o *UpdateUser) SetTagExpirationS(v int32)` + +SetTagExpirationS sets TagExpirationS field to given value. + +### HasTagExpirationS + +`func (o *UpdateUser) HasTagExpirationS() bool` + +HasTagExpirationS returns a boolean if a field has been set. + +### GetUsername + +`func (o *UpdateUser) GetUsername() string` + +GetUsername returns the Username field if non-nil, zero value otherwise. + +### GetUsernameOk + +`func (o *UpdateUser) GetUsernameOk() (*string, bool)` + +GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUsername + +`func (o *UpdateUser) SetUsername(v string)` + +SetUsername sets Username field to given value. + +### HasUsername + +`func (o *UpdateUser) HasUsername() bool` + +HasUsername 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/quay_api/docs/UserAPI.md b/quay_api/docs/UserAPI.md new file mode 100644 index 0000000..43bc09e --- /dev/null +++ b/quay_api/docs/UserAPI.md @@ -0,0 +1,338 @@ +# \UserAPI + +All URIs are relative to *https://quay.example.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateStar**](UserAPI.md#CreateStar) | **Post** /api/v1/user/starred | +[**DeleteStar**](UserAPI.md#DeleteStar) | **Delete** /api/v1/user/starred/{repository} | +[**GetLoggedInUser**](UserAPI.md#GetLoggedInUser) | **Get** /api/v1/user/ | +[**GetUserInformation**](UserAPI.md#GetUserInformation) | **Get** /api/v1/users/{username} | +[**ListStarredRepos**](UserAPI.md#ListStarredRepos) | **Get** /api/v1/user/starred | + + + +## CreateStar + +> CreateStar(ctx).Body(body).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + body := *openapiclient.NewNewStarredRepository("Namespace_example", "Repository_example") // NewStarredRepository | Request body contents. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.UserAPI.CreateStar(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.CreateStar``: %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 apiCreateStarRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**NewStarredRepository**](NewStarredRepository.md) | Request body contents. | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## DeleteStar + +> DeleteStar(ctx, repository).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + repository := "repository_example" // string | The full path of the repository. e.g. namespace/name + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.UserAPI.DeleteStar(context.Background(), repository).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.DeleteStar``: %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** | The full path of the repository. e.g. namespace/name | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteStarRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetLoggedInUser + +> UserView GetLoggedInUser(ctx).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserAPI.GetLoggedInUser(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.GetLoggedInUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetLoggedInUser`: UserView + fmt.Fprintf(os.Stdout, "Response from `UserAPI.GetLoggedInUser`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetLoggedInUserRequest struct via the builder pattern + + +### Return type + +[**UserView**](UserView.md) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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) + + +## GetUserInformation + +> GetUserInformation(ctx, username).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + username := "username_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.UserAPI.GetUserInformation(context.Background(), username).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.GetUserInformation``: %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. +**username** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserInformationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### 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) + + +## ListStarredRepos + +> ListStarredRepos(ctx).NextPage(nextPage).Execute() + + + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" +) + +func main() { + nextPage := "nextPage_example" // string | The page token for the next page (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.UserAPI.ListStarredRepos(context.Background()).NextPage(nextPage).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAPI.ListStarredRepos``: %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 apiListStarredReposRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **nextPage** | **string** | The page token for the next page | + +### Return type + + (empty response body) + +### Authorization + +[oauth2_implicit](../README.md#oauth2_implicit) + +### 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/quay_api/docs/UserPermission.md b/quay_api/docs/UserPermission.md new file mode 100644 index 0000000..580b96a --- /dev/null +++ b/quay_api/docs/UserPermission.md @@ -0,0 +1,51 @@ +# UserPermission + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Role** | **string** | Role to use for the user | + +## Methods + +### NewUserPermission + +`func NewUserPermission(role string, ) *UserPermission` + +NewUserPermission instantiates a new UserPermission 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 + +### NewUserPermissionWithDefaults + +`func NewUserPermissionWithDefaults() *UserPermission` + +NewUserPermissionWithDefaults instantiates a new UserPermission 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 + +### GetRole + +`func (o *UserPermission) GetRole() string` + +GetRole returns the Role field if non-nil, zero value otherwise. + +### GetRoleOk + +`func (o *UserPermission) GetRoleOk() (*string, bool)` + +GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRole + +`func (o *UserPermission) SetRole(v string)` + +SetRole sets Role 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/quay_api/docs/UserView.md b/quay_api/docs/UserView.md new file mode 100644 index 0000000..3af6f84 --- /dev/null +++ b/quay_api/docs/UserView.md @@ -0,0 +1,228 @@ +# UserView + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Verified** | Pointer to **bool** | Whether the user's email address has been verified | [optional] +**Anonymous** | **bool** | true if this user data represents a guest user | +**Email** | Pointer to **string** | The user's email address | [optional] +**Avatar** | **map[string]interface{}** | Avatar data representing the user's icon | +**Organizations** | Pointer to **[]map[string]interface{}** | Information about the organizations in which the user is a member | [optional] +**Logins** | Pointer to **[]map[string]interface{}** | The list of external login providers against which the user has authenticated | [optional] +**CanCreateRepo** | Pointer to **bool** | Whether the user has permission to create repositories | [optional] +**PreferredNamespace** | Pointer to **bool** | If true, the user's namespace is the preferred namespace to display | [optional] + +## Methods + +### NewUserView + +`func NewUserView(anonymous bool, avatar map[string]interface{}, ) *UserView` + +NewUserView instantiates a new UserView 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 + +### NewUserViewWithDefaults + +`func NewUserViewWithDefaults() *UserView` + +NewUserViewWithDefaults instantiates a new UserView 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 + +### GetVerified + +`func (o *UserView) GetVerified() bool` + +GetVerified returns the Verified field if non-nil, zero value otherwise. + +### GetVerifiedOk + +`func (o *UserView) GetVerifiedOk() (*bool, bool)` + +GetVerifiedOk returns a tuple with the Verified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVerified + +`func (o *UserView) SetVerified(v bool)` + +SetVerified sets Verified field to given value. + +### HasVerified + +`func (o *UserView) HasVerified() bool` + +HasVerified returns a boolean if a field has been set. + +### GetAnonymous + +`func (o *UserView) GetAnonymous() bool` + +GetAnonymous returns the Anonymous field if non-nil, zero value otherwise. + +### GetAnonymousOk + +`func (o *UserView) GetAnonymousOk() (*bool, bool)` + +GetAnonymousOk returns a tuple with the Anonymous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAnonymous + +`func (o *UserView) SetAnonymous(v bool)` + +SetAnonymous sets Anonymous field to given value. + + +### GetEmail + +`func (o *UserView) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *UserView) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *UserView) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *UserView) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### GetAvatar + +`func (o *UserView) GetAvatar() map[string]interface{}` + +GetAvatar returns the Avatar field if non-nil, zero value otherwise. + +### GetAvatarOk + +`func (o *UserView) GetAvatarOk() (*map[string]interface{}, bool)` + +GetAvatarOk returns a tuple with the Avatar field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAvatar + +`func (o *UserView) SetAvatar(v map[string]interface{})` + +SetAvatar sets Avatar field to given value. + + +### GetOrganizations + +`func (o *UserView) GetOrganizations() []map[string]interface{}` + +GetOrganizations returns the Organizations field if non-nil, zero value otherwise. + +### GetOrganizationsOk + +`func (o *UserView) GetOrganizationsOk() (*[]map[string]interface{}, bool)` + +GetOrganizationsOk returns a tuple with the Organizations field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizations + +`func (o *UserView) SetOrganizations(v []map[string]interface{})` + +SetOrganizations sets Organizations field to given value. + +### HasOrganizations + +`func (o *UserView) HasOrganizations() bool` + +HasOrganizations returns a boolean if a field has been set. + +### GetLogins + +`func (o *UserView) GetLogins() []map[string]interface{}` + +GetLogins returns the Logins field if non-nil, zero value otherwise. + +### GetLoginsOk + +`func (o *UserView) GetLoginsOk() (*[]map[string]interface{}, bool)` + +GetLoginsOk returns a tuple with the Logins field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogins + +`func (o *UserView) SetLogins(v []map[string]interface{})` + +SetLogins sets Logins field to given value. + +### HasLogins + +`func (o *UserView) HasLogins() bool` + +HasLogins returns a boolean if a field has been set. + +### GetCanCreateRepo + +`func (o *UserView) GetCanCreateRepo() bool` + +GetCanCreateRepo returns the CanCreateRepo field if non-nil, zero value otherwise. + +### GetCanCreateRepoOk + +`func (o *UserView) GetCanCreateRepoOk() (*bool, bool)` + +GetCanCreateRepoOk returns a tuple with the CanCreateRepo field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCanCreateRepo + +`func (o *UserView) SetCanCreateRepo(v bool)` + +SetCanCreateRepo sets CanCreateRepo field to given value. + +### HasCanCreateRepo + +`func (o *UserView) HasCanCreateRepo() bool` + +HasCanCreateRepo returns a boolean if a field has been set. + +### GetPreferredNamespace + +`func (o *UserView) GetPreferredNamespace() bool` + +GetPreferredNamespace returns the PreferredNamespace field if non-nil, zero value otherwise. + +### GetPreferredNamespaceOk + +`func (o *UserView) GetPreferredNamespaceOk() (*bool, bool)` + +GetPreferredNamespaceOk returns a tuple with the PreferredNamespace field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreferredNamespace + +`func (o *UserView) SetPreferredNamespace(v bool)` + +SetPreferredNamespace sets PreferredNamespace field to given value. + +### HasPreferredNamespace + +`func (o *UserView) HasPreferredNamespace() bool` + +HasPreferredNamespace 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/quay_api/git_push.sh b/quay_api/git_push.sh new file mode 100644 index 0000000..6b72b20 --- /dev/null +++ b/quay_api/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="enthought" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="terraform-provider-quay" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/quay_api/go.mod b/quay_api/go.mod new file mode 100644 index 0000000..55c3274 --- /dev/null +++ b/quay_api/go.mod @@ -0,0 +1,18 @@ +module github.com/enthought/terraform-provider-quay/quay_api + +go 1.18 + +require ( + github.com/stretchr/testify v1.4.0 + golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 +) + +require ( + github.com/davecgh/go-spew v1.1.0 // indirect + github.com/golang/protobuf v1.4.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + golang.org/x/net v0.0.0-20200822124328-c89045814202 // indirect + google.golang.org/appengine v1.6.6 // indirect + google.golang.org/protobuf v1.25.0 // indirect + gopkg.in/yaml.v2 v2.2.2 // indirect +) diff --git a/quay_api/go.sum b/quay_api/go.sum new file mode 100644 index 0000000..0d63dca --- /dev/null +++ b/quay_api/go.sum @@ -0,0 +1,369 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 h1:D7nTwh4J0i+5mW4Zjzn5omvlr6YBcWywE6KOcatyNxY= +golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/quay_api/model_add_label.go b/quay_api/model_add_label.go new file mode 100644 index 0000000..c19383a --- /dev/null +++ b/quay_api/model_add_label.go @@ -0,0 +1,187 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the AddLabel type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddLabel{} + +// AddLabel Adds a label to a manifest +type AddLabel struct { + // The key for the label + Key string `json:"key"` + // The value for the label + Value string `json:"value"` +} + +type _AddLabel AddLabel + +// NewAddLabel instantiates a new AddLabel 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 NewAddLabel(key string, value string) *AddLabel { + this := AddLabel{} + this.Key = key + this.Value = value + return &this +} + +// NewAddLabelWithDefaults instantiates a new AddLabel 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 NewAddLabelWithDefaults() *AddLabel { + this := AddLabel{} + return &this +} + +// GetKey returns the Key field value +func (o *AddLabel) GetKey() string { + if o == nil { + var ret string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *AddLabel) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Key, true +} + +// SetKey sets field value +func (o *AddLabel) SetKey(v string) { + o.Key = v +} + +// GetValue returns the Value field value +func (o *AddLabel) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *AddLabel) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *AddLabel) SetValue(v string) { + o.Value = v +} + +func (o AddLabel) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddLabel) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["key"] = o.Key + toSerialize["value"] = o.Value + return toSerialize, nil +} + +func (o *AddLabel) 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{ + "key", + "value", + } + + 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) + } + } + + varAddLabel := _AddLabel{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAddLabel) + + if err != nil { + return err + } + + *o = AddLabel(varAddLabel) + + return err +} + +type NullableAddLabel struct { + value *AddLabel + isSet bool +} + +func (v NullableAddLabel) Get() *AddLabel { + return v.value +} + +func (v *NullableAddLabel) Set(val *AddLabel) { + v.value = val + v.isSet = true +} + +func (v NullableAddLabel) IsSet() bool { + return v.isSet +} + +func (v *NullableAddLabel) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddLabel(val *AddLabel) *NullableAddLabel { + return &NullableAddLabel{value: val, isSet: true} +} + +func (v NullableAddLabel) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddLabel) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_api_error.go b/quay_api/model_api_error.go new file mode 100644 index 0000000..f1c5737 --- /dev/null +++ b/quay_api/model_api_error.go @@ -0,0 +1,327 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ApiError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiError{} + +// ApiError struct for ApiError +type ApiError struct { + // Status code of the response. + Status int32 `json:"status"` + // Reference to the type of the error. + Type string `json:"type"` + // Details about the specific instance of the error. + Detail *string `json:"detail,omitempty"` + // Unique error code to identify the type of error. + Title string `json:"title"` + // Deprecated; alias for detail + ErrorMessage *string `json:"error_message,omitempty"` + // Deprecated; alias for detail + ErrorType *string `json:"error_type,omitempty"` +} + +type _ApiError ApiError + +// NewApiError instantiates a new ApiError 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 NewApiError(status int32, type_ string, title string) *ApiError { + this := ApiError{} + this.Status = status + this.Type = type_ + this.Title = title + return &this +} + +// NewApiErrorWithDefaults instantiates a new ApiError 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 NewApiErrorWithDefaults() *ApiError { + this := ApiError{} + return &this +} + +// GetStatus returns the Status field value +func (o *ApiError) GetStatus() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ApiError) GetStatusOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ApiError) SetStatus(v int32) { + o.Status = v +} + +// GetType returns the Type field value +func (o *ApiError) 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 *ApiError) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ApiError) SetType(v string) { + o.Type = v +} + +// GetDetail returns the Detail field value if set, zero value otherwise. +func (o *ApiError) GetDetail() string { + if o == nil || IsNil(o.Detail) { + var ret string + return ret + } + return *o.Detail +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiError) GetDetailOk() (*string, bool) { + if o == nil || IsNil(o.Detail) { + return nil, false + } + return o.Detail, true +} + +// HasDetail returns a boolean if a field has been set. +func (o *ApiError) HasDetail() bool { + if o != nil && !IsNil(o.Detail) { + return true + } + + return false +} + +// SetDetail gets a reference to the given string and assigns it to the Detail field. +func (o *ApiError) SetDetail(v string) { + o.Detail = &v +} + +// GetTitle returns the Title field value +func (o *ApiError) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *ApiError) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *ApiError) SetTitle(v string) { + o.Title = v +} + +// GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise. +func (o *ApiError) GetErrorMessage() string { + if o == nil || IsNil(o.ErrorMessage) { + var ret string + return ret + } + return *o.ErrorMessage +} + +// GetErrorMessageOk returns a tuple with the ErrorMessage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiError) GetErrorMessageOk() (*string, bool) { + if o == nil || IsNil(o.ErrorMessage) { + return nil, false + } + return o.ErrorMessage, true +} + +// HasErrorMessage returns a boolean if a field has been set. +func (o *ApiError) HasErrorMessage() bool { + if o != nil && !IsNil(o.ErrorMessage) { + return true + } + + return false +} + +// SetErrorMessage gets a reference to the given string and assigns it to the ErrorMessage field. +func (o *ApiError) SetErrorMessage(v string) { + o.ErrorMessage = &v +} + +// GetErrorType returns the ErrorType field value if set, zero value otherwise. +func (o *ApiError) GetErrorType() string { + if o == nil || IsNil(o.ErrorType) { + var ret string + return ret + } + return *o.ErrorType +} + +// GetErrorTypeOk returns a tuple with the ErrorType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApiError) GetErrorTypeOk() (*string, bool) { + if o == nil || IsNil(o.ErrorType) { + return nil, false + } + return o.ErrorType, true +} + +// HasErrorType returns a boolean if a field has been set. +func (o *ApiError) HasErrorType() bool { + if o != nil && !IsNil(o.ErrorType) { + return true + } + + return false +} + +// SetErrorType gets a reference to the given string and assigns it to the ErrorType field. +func (o *ApiError) SetErrorType(v string) { + o.ErrorType = &v +} + +func (o ApiError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApiError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status"] = o.Status + toSerialize["type"] = o.Type + if !IsNil(o.Detail) { + toSerialize["detail"] = o.Detail + } + toSerialize["title"] = o.Title + if !IsNil(o.ErrorMessage) { + toSerialize["error_message"] = o.ErrorMessage + } + if !IsNil(o.ErrorType) { + toSerialize["error_type"] = o.ErrorType + } + return toSerialize, nil +} + +func (o *ApiError) 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{ + "status", + "type", + "title", + } + + 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) + } + } + + varApiError := _ApiError{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varApiError) + + if err != nil { + return err + } + + *o = ApiError(varApiError) + + return err +} + +type NullableApiError struct { + value *ApiError + isSet bool +} + +func (v NullableApiError) Get() *ApiError { + return v.value +} + +func (v *NullableApiError) Set(val *ApiError) { + v.value = val + v.isSet = true +} + +func (v NullableApiError) IsSet() bool { + return v.isSet +} + +func (v *NullableApiError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiError(val *ApiError) *NullableApiError { + return &NullableApiError{value: val, isSet: true} +} + +func (v NullableApiError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_api_error_description.go b/quay_api/model_api_error_description.go new file mode 100644 index 0000000..cdfb65d --- /dev/null +++ b/quay_api/model_api_error_description.go @@ -0,0 +1,216 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ApiErrorDescription type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiErrorDescription{} + +// ApiErrorDescription Description of an error +type ApiErrorDescription struct { + // A reference to the error type resource + Type string `json:"type"` + // The title of the error. Can be used to uniquely identify the kind of error. + Title string `json:"title"` + // A more detailed description of the error that may include help for fixing the issue. + Description string `json:"description"` +} + +type _ApiErrorDescription ApiErrorDescription + +// NewApiErrorDescription instantiates a new ApiErrorDescription 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 NewApiErrorDescription(type_ string, title string, description string) *ApiErrorDescription { + this := ApiErrorDescription{} + this.Type = type_ + this.Title = title + this.Description = description + return &this +} + +// NewApiErrorDescriptionWithDefaults instantiates a new ApiErrorDescription 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 NewApiErrorDescriptionWithDefaults() *ApiErrorDescription { + this := ApiErrorDescription{} + return &this +} + +// GetType returns the Type field value +func (o *ApiErrorDescription) 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 *ApiErrorDescription) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ApiErrorDescription) SetType(v string) { + o.Type = v +} + +// GetTitle returns the Title field value +func (o *ApiErrorDescription) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *ApiErrorDescription) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *ApiErrorDescription) SetTitle(v string) { + o.Title = v +} + +// GetDescription returns the Description field value +func (o *ApiErrorDescription) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *ApiErrorDescription) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *ApiErrorDescription) SetDescription(v string) { + o.Description = v +} + +func (o ApiErrorDescription) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApiErrorDescription) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["title"] = o.Title + toSerialize["description"] = o.Description + return toSerialize, nil +} + +func (o *ApiErrorDescription) 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{ + "type", + "title", + "description", + } + + 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) + } + } + + varApiErrorDescription := _ApiErrorDescription{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varApiErrorDescription) + + if err != nil { + return err + } + + *o = ApiErrorDescription(varApiErrorDescription) + + return err +} + +type NullableApiErrorDescription struct { + value *ApiErrorDescription + isSet bool +} + +func (v NullableApiErrorDescription) Get() *ApiErrorDescription { + return v.value +} + +func (v *NullableApiErrorDescription) Set(val *ApiErrorDescription) { + v.value = val + v.isSet = true +} + +func (v NullableApiErrorDescription) IsSet() bool { + return v.isSet +} + +func (v *NullableApiErrorDescription) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApiErrorDescription(val *ApiErrorDescription) *NullableApiErrorDescription { + return &NullableApiErrorDescription{value: val, isSet: true} +} + +func (v NullableApiErrorDescription) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApiErrorDescription) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_approve_service_key.go b/quay_api/model_approve_service_key.go new file mode 100644 index 0000000..9656b3d --- /dev/null +++ b/quay_api/model_approve_service_key.go @@ -0,0 +1,126 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "encoding/json" +) + +// checks if the ApproveServiceKey type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApproveServiceKey{} + +// ApproveServiceKey Information for approving service keys +type ApproveServiceKey struct { + // Optional approval notes + Notes *string `json:"notes,omitempty"` +} + +// NewApproveServiceKey instantiates a new ApproveServiceKey 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 NewApproveServiceKey() *ApproveServiceKey { + this := ApproveServiceKey{} + return &this +} + +// NewApproveServiceKeyWithDefaults instantiates a new ApproveServiceKey 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 NewApproveServiceKeyWithDefaults() *ApproveServiceKey { + this := ApproveServiceKey{} + return &this +} + +// GetNotes returns the Notes field value if set, zero value otherwise. +func (o *ApproveServiceKey) GetNotes() string { + if o == nil || IsNil(o.Notes) { + var ret string + return ret + } + return *o.Notes +} + +// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApproveServiceKey) GetNotesOk() (*string, bool) { + if o == nil || IsNil(o.Notes) { + return nil, false + } + return o.Notes, true +} + +// HasNotes returns a boolean if a field has been set. +func (o *ApproveServiceKey) HasNotes() bool { + if o != nil && !IsNil(o.Notes) { + return true + } + + return false +} + +// SetNotes gets a reference to the given string and assigns it to the Notes field. +func (o *ApproveServiceKey) SetNotes(v string) { + o.Notes = &v +} + +func (o ApproveServiceKey) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApproveServiceKey) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Notes) { + toSerialize["notes"] = o.Notes + } + return toSerialize, nil +} + +type NullableApproveServiceKey struct { + value *ApproveServiceKey + isSet bool +} + +func (v NullableApproveServiceKey) Get() *ApproveServiceKey { + return v.value +} + +func (v *NullableApproveServiceKey) Set(val *ApproveServiceKey) { + v.value = val + v.isSet = true +} + +func (v NullableApproveServiceKey) IsSet() bool { + return v.isSet +} + +func (v *NullableApproveServiceKey) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApproveServiceKey(val *ApproveServiceKey) *NullableApproveServiceKey { + return &NullableApproveServiceKey{value: val, isSet: true} +} + +func (v NullableApproveServiceKey) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApproveServiceKey) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_build_trigger_activate_request.go b/quay_api/model_build_trigger_activate_request.go new file mode 100644 index 0000000..8848b1b --- /dev/null +++ b/quay_api/model_build_trigger_activate_request.go @@ -0,0 +1,195 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the BuildTriggerActivateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BuildTriggerActivateRequest{} + +// BuildTriggerActivateRequest struct for BuildTriggerActivateRequest +type BuildTriggerActivateRequest struct { + // Arbitrary json. + Config map[string]interface{} `json:"config"` + // The name of the robot that will be used to pull images. + PullRobot *string `json:"pull_robot,omitempty"` +} + +type _BuildTriggerActivateRequest BuildTriggerActivateRequest + +// NewBuildTriggerActivateRequest instantiates a new BuildTriggerActivateRequest 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 NewBuildTriggerActivateRequest(config map[string]interface{}) *BuildTriggerActivateRequest { + this := BuildTriggerActivateRequest{} + this.Config = config + return &this +} + +// NewBuildTriggerActivateRequestWithDefaults instantiates a new BuildTriggerActivateRequest 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 NewBuildTriggerActivateRequestWithDefaults() *BuildTriggerActivateRequest { + this := BuildTriggerActivateRequest{} + return &this +} + +// GetConfig returns the Config field value +func (o *BuildTriggerActivateRequest) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *BuildTriggerActivateRequest) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *BuildTriggerActivateRequest) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetPullRobot returns the PullRobot field value if set, zero value otherwise. +func (o *BuildTriggerActivateRequest) GetPullRobot() string { + if o == nil || IsNil(o.PullRobot) { + var ret string + return ret + } + return *o.PullRobot +} + +// GetPullRobotOk returns a tuple with the PullRobot field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BuildTriggerActivateRequest) GetPullRobotOk() (*string, bool) { + if o == nil || IsNil(o.PullRobot) { + return nil, false + } + return o.PullRobot, true +} + +// HasPullRobot returns a boolean if a field has been set. +func (o *BuildTriggerActivateRequest) HasPullRobot() bool { + if o != nil && !IsNil(o.PullRobot) { + return true + } + + return false +} + +// SetPullRobot gets a reference to the given string and assigns it to the PullRobot field. +func (o *BuildTriggerActivateRequest) SetPullRobot(v string) { + o.PullRobot = &v +} + +func (o BuildTriggerActivateRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BuildTriggerActivateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["config"] = o.Config + if !IsNil(o.PullRobot) { + toSerialize["pull_robot"] = o.PullRobot + } + return toSerialize, nil +} + +func (o *BuildTriggerActivateRequest) 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{ + "config", + } + + 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) + } + } + + varBuildTriggerActivateRequest := _BuildTriggerActivateRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBuildTriggerActivateRequest) + + if err != nil { + return err + } + + *o = BuildTriggerActivateRequest(varBuildTriggerActivateRequest) + + return err +} + +type NullableBuildTriggerActivateRequest struct { + value *BuildTriggerActivateRequest + isSet bool +} + +func (v NullableBuildTriggerActivateRequest) Get() *BuildTriggerActivateRequest { + return v.value +} + +func (v *NullableBuildTriggerActivateRequest) Set(val *BuildTriggerActivateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableBuildTriggerActivateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableBuildTriggerActivateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBuildTriggerActivateRequest(val *BuildTriggerActivateRequest) *NullableBuildTriggerActivateRequest { + return &NullableBuildTriggerActivateRequest{value: val, isSet: true} +} + +func (v NullableBuildTriggerActivateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBuildTriggerActivateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_change_visibility.go b/quay_api/model_change_visibility.go new file mode 100644 index 0000000..794bd96 --- /dev/null +++ b/quay_api/model_change_visibility.go @@ -0,0 +1,158 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ChangeVisibility type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ChangeVisibility{} + +// ChangeVisibility Change the visibility for the repository. +type ChangeVisibility struct { + // Visibility which the repository will start with + Visibility string `json:"visibility"` +} + +type _ChangeVisibility ChangeVisibility + +// NewChangeVisibility instantiates a new ChangeVisibility 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 NewChangeVisibility(visibility string) *ChangeVisibility { + this := ChangeVisibility{} + this.Visibility = visibility + return &this +} + +// NewChangeVisibilityWithDefaults instantiates a new ChangeVisibility 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 NewChangeVisibilityWithDefaults() *ChangeVisibility { + this := ChangeVisibility{} + return &this +} + +// GetVisibility returns the Visibility field value +func (o *ChangeVisibility) GetVisibility() string { + if o == nil { + var ret string + return ret + } + + return o.Visibility +} + +// GetVisibilityOk returns a tuple with the Visibility field value +// and a boolean to check if the value has been set. +func (o *ChangeVisibility) GetVisibilityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Visibility, true +} + +// SetVisibility sets field value +func (o *ChangeVisibility) SetVisibility(v string) { + o.Visibility = v +} + +func (o ChangeVisibility) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ChangeVisibility) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["visibility"] = o.Visibility + return toSerialize, nil +} + +func (o *ChangeVisibility) 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{ + "visibility", + } + + 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) + } + } + + varChangeVisibility := _ChangeVisibility{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChangeVisibility) + + if err != nil { + return err + } + + *o = ChangeVisibility(varChangeVisibility) + + return err +} + +type NullableChangeVisibility struct { + value *ChangeVisibility + isSet bool +} + +func (v NullableChangeVisibility) Get() *ChangeVisibility { + return v.value +} + +func (v *NullableChangeVisibility) Set(val *ChangeVisibility) { + v.value = val + v.isSet = true +} + +func (v NullableChangeVisibility) IsSet() bool { + return v.isSet +} + +func (v *NullableChangeVisibility) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChangeVisibility(val *ChangeVisibility) *NullableChangeVisibility { + return &NullableChangeVisibility{value: val, isSet: true} +} + +func (v NullableChangeVisibility) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChangeVisibility) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_create_install_user.go b/quay_api/model_create_install_user.go new file mode 100644 index 0000000..5b2a41c --- /dev/null +++ b/quay_api/model_create_install_user.go @@ -0,0 +1,195 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateInstallUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstallUser{} + +// CreateInstallUser Data for creating a user +type CreateInstallUser struct { + // The username of the user being created + Username string `json:"username"` + // The email address of the user being created + Email *string `json:"email,omitempty"` +} + +type _CreateInstallUser CreateInstallUser + +// NewCreateInstallUser instantiates a new CreateInstallUser 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 NewCreateInstallUser(username string) *CreateInstallUser { + this := CreateInstallUser{} + this.Username = username + return &this +} + +// NewCreateInstallUserWithDefaults instantiates a new CreateInstallUser 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 NewCreateInstallUserWithDefaults() *CreateInstallUser { + this := CreateInstallUser{} + return &this +} + +// GetUsername returns the Username field value +func (o *CreateInstallUser) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *CreateInstallUser) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *CreateInstallUser) SetUsername(v string) { + o.Username = v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *CreateInstallUser) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstallUser) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *CreateInstallUser) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *CreateInstallUser) SetEmail(v string) { + o.Email = &v +} + +func (o CreateInstallUser) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateInstallUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["username"] = o.Username + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + return toSerialize, nil +} + +func (o *CreateInstallUser) 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{ + "username", + } + + 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) + } + } + + varCreateInstallUser := _CreateInstallUser{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateInstallUser) + + if err != nil { + return err + } + + *o = CreateInstallUser(varCreateInstallUser) + + return err +} + +type NullableCreateInstallUser struct { + value *CreateInstallUser + isSet bool +} + +func (v NullableCreateInstallUser) Get() *CreateInstallUser { + return v.value +} + +func (v *NullableCreateInstallUser) Set(val *CreateInstallUser) { + v.value = val + v.isSet = true +} + +func (v NullableCreateInstallUser) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateInstallUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateInstallUser(val *CreateInstallUser) *NullableCreateInstallUser { + return &NullableCreateInstallUser{value: val, isSet: true} +} + +func (v NullableCreateInstallUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateInstallUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_create_message.go b/quay_api/model_create_message.go new file mode 100644 index 0000000..ebf8899 --- /dev/null +++ b/quay_api/model_create_message.go @@ -0,0 +1,125 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "encoding/json" +) + +// checks if the CreateMessage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateMessage{} + +// CreateMessage Create a new message +type CreateMessage struct { + Message *CreateMessageMessage `json:"message,omitempty"` +} + +// NewCreateMessage instantiates a new CreateMessage 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 NewCreateMessage() *CreateMessage { + this := CreateMessage{} + return &this +} + +// NewCreateMessageWithDefaults instantiates a new CreateMessage 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 NewCreateMessageWithDefaults() *CreateMessage { + this := CreateMessage{} + return &this +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *CreateMessage) GetMessage() CreateMessageMessage { + if o == nil || IsNil(o.Message) { + var ret CreateMessageMessage + 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 *CreateMessage) GetMessageOk() (*CreateMessageMessage, 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 *CreateMessage) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given CreateMessageMessage and assigns it to the Message field. +func (o *CreateMessage) SetMessage(v CreateMessageMessage) { + o.Message = &v +} + +func (o CreateMessage) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateMessage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + return toSerialize, nil +} + +type NullableCreateMessage struct { + value *CreateMessage + isSet bool +} + +func (v NullableCreateMessage) Get() *CreateMessage { + return v.value +} + +func (v *NullableCreateMessage) Set(val *CreateMessage) { + v.value = val + v.isSet = true +} + +func (v NullableCreateMessage) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateMessage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateMessage(val *CreateMessage) *NullableCreateMessage { + return &NullableCreateMessage{value: val, isSet: true} +} + +func (v NullableCreateMessage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateMessage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_create_message_message.go b/quay_api/model_create_message_message.go new file mode 100644 index 0000000..00d3306 --- /dev/null +++ b/quay_api/model_create_message_message.go @@ -0,0 +1,216 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateMessageMessage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateMessageMessage{} + +// CreateMessageMessage A single message +type CreateMessageMessage struct { + // The actual message + Content string `json:"content"` + // The media type of the message + MediaType string `json:"media_type"` + // The severity of the message + Severity string `json:"severity"` +} + +type _CreateMessageMessage CreateMessageMessage + +// NewCreateMessageMessage instantiates a new CreateMessageMessage 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 NewCreateMessageMessage(content string, mediaType string, severity string) *CreateMessageMessage { + this := CreateMessageMessage{} + this.Content = content + this.MediaType = mediaType + this.Severity = severity + return &this +} + +// NewCreateMessageMessageWithDefaults instantiates a new CreateMessageMessage 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 NewCreateMessageMessageWithDefaults() *CreateMessageMessage { + this := CreateMessageMessage{} + return &this +} + +// GetContent returns the Content field value +func (o *CreateMessageMessage) GetContent() string { + if o == nil { + var ret string + return ret + } + + return o.Content +} + +// GetContentOk returns a tuple with the Content field value +// and a boolean to check if the value has been set. +func (o *CreateMessageMessage) GetContentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Content, true +} + +// SetContent sets field value +func (o *CreateMessageMessage) SetContent(v string) { + o.Content = v +} + +// GetMediaType returns the MediaType field value +func (o *CreateMessageMessage) GetMediaType() string { + if o == nil { + var ret string + return ret + } + + return o.MediaType +} + +// GetMediaTypeOk returns a tuple with the MediaType field value +// and a boolean to check if the value has been set. +func (o *CreateMessageMessage) GetMediaTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.MediaType, true +} + +// SetMediaType sets field value +func (o *CreateMessageMessage) SetMediaType(v string) { + o.MediaType = v +} + +// GetSeverity returns the Severity field value +func (o *CreateMessageMessage) GetSeverity() string { + if o == nil { + var ret string + return ret + } + + return o.Severity +} + +// GetSeverityOk returns a tuple with the Severity field value +// and a boolean to check if the value has been set. +func (o *CreateMessageMessage) GetSeverityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Severity, true +} + +// SetSeverity sets field value +func (o *CreateMessageMessage) SetSeverity(v string) { + o.Severity = v +} + +func (o CreateMessageMessage) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateMessageMessage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["content"] = o.Content + toSerialize["media_type"] = o.MediaType + toSerialize["severity"] = o.Severity + return toSerialize, nil +} + +func (o *CreateMessageMessage) 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{ + "content", + "media_type", + "severity", + } + + 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) + } + } + + varCreateMessageMessage := _CreateMessageMessage{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateMessageMessage) + + if err != nil { + return err + } + + *o = CreateMessageMessage(varCreateMessageMessage) + + return err +} + +type NullableCreateMessageMessage struct { + value *CreateMessageMessage + isSet bool +} + +func (v NullableCreateMessageMessage) Get() *CreateMessageMessage { + return v.value +} + +func (v *NullableCreateMessageMessage) Set(val *CreateMessageMessage) { + v.value = val + v.isSet = true +} + +func (v NullableCreateMessageMessage) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateMessageMessage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateMessageMessage(val *CreateMessageMessage) *NullableCreateMessageMessage { + return &NullableCreateMessageMessage{value: val, isSet: true} +} + +func (v NullableCreateMessageMessage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateMessageMessage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_create_robot.go b/quay_api/model_create_robot.go new file mode 100644 index 0000000..c56c3bf --- /dev/null +++ b/quay_api/model_create_robot.go @@ -0,0 +1,163 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "encoding/json" +) + +// checks if the CreateRobot type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateRobot{} + +// CreateRobot Optional data for creating a robot +type CreateRobot struct { + // Optional text description for the robot + Description *string `json:"description,omitempty"` + // Optional unstructured metadata for the robot + UnstructuredMetadata map[string]interface{} `json:"unstructured_metadata,omitempty"` +} + +// NewCreateRobot instantiates a new CreateRobot 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 NewCreateRobot() *CreateRobot { + this := CreateRobot{} + return &this +} + +// NewCreateRobotWithDefaults instantiates a new CreateRobot 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 NewCreateRobotWithDefaults() *CreateRobot { + this := CreateRobot{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *CreateRobot) 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 *CreateRobot) 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 *CreateRobot) 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 *CreateRobot) SetDescription(v string) { + o.Description = &v +} + +// GetUnstructuredMetadata returns the UnstructuredMetadata field value if set, zero value otherwise. +func (o *CreateRobot) GetUnstructuredMetadata() map[string]interface{} { + if o == nil || IsNil(o.UnstructuredMetadata) { + var ret map[string]interface{} + return ret + } + return o.UnstructuredMetadata +} + +// GetUnstructuredMetadataOk returns a tuple with the UnstructuredMetadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateRobot) GetUnstructuredMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.UnstructuredMetadata) { + return map[string]interface{}{}, false + } + return o.UnstructuredMetadata, true +} + +// HasUnstructuredMetadata returns a boolean if a field has been set. +func (o *CreateRobot) HasUnstructuredMetadata() bool { + if o != nil && !IsNil(o.UnstructuredMetadata) { + return true + } + + return false +} + +// SetUnstructuredMetadata gets a reference to the given map[string]interface{} and assigns it to the UnstructuredMetadata field. +func (o *CreateRobot) SetUnstructuredMetadata(v map[string]interface{}) { + o.UnstructuredMetadata = v +} + +func (o CreateRobot) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateRobot) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.UnstructuredMetadata) { + toSerialize["unstructured_metadata"] = o.UnstructuredMetadata + } + return toSerialize, nil +} + +type NullableCreateRobot struct { + value *CreateRobot + isSet bool +} + +func (v NullableCreateRobot) Get() *CreateRobot { + return v.value +} + +func (v *NullableCreateRobot) Set(val *CreateRobot) { + v.value = val + v.isSet = true +} + +func (v NullableCreateRobot) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateRobot) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateRobot(val *CreateRobot) *NullableCreateRobot { + return &NullableCreateRobot{value: val, isSet: true} +} + +func (v NullableCreateRobot) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateRobot) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_create_service_key.go b/quay_api/model_create_service_key.go new file mode 100644 index 0000000..48ec71d --- /dev/null +++ b/quay_api/model_create_service_key.go @@ -0,0 +1,298 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateServiceKey type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateServiceKey{} + +// CreateServiceKey Description of creation of a service key +type CreateServiceKey struct { + // The service authenticating with this key + Service string `json:"service"` + // The friendly name of a service key + Name *string `json:"name,omitempty"` + // The key/value pairs of this key's metadata + Metadata map[string]interface{} `json:"metadata,omitempty"` + // If specified, the extra notes for the key + Notes *string `json:"notes,omitempty"` + // The expiration date as a unix timestamp + Expiration map[string]interface{} `json:"expiration"` +} + +type _CreateServiceKey CreateServiceKey + +// NewCreateServiceKey instantiates a new CreateServiceKey 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 NewCreateServiceKey(service string, expiration map[string]interface{}) *CreateServiceKey { + this := CreateServiceKey{} + this.Service = service + this.Expiration = expiration + return &this +} + +// NewCreateServiceKeyWithDefaults instantiates a new CreateServiceKey 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 NewCreateServiceKeyWithDefaults() *CreateServiceKey { + this := CreateServiceKey{} + return &this +} + +// GetService returns the Service field value +func (o *CreateServiceKey) GetService() string { + if o == nil { + var ret string + return ret + } + + return o.Service +} + +// GetServiceOk returns a tuple with the Service field value +// and a boolean to check if the value has been set. +func (o *CreateServiceKey) GetServiceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Service, true +} + +// SetService sets field value +func (o *CreateServiceKey) SetService(v string) { + o.Service = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CreateServiceKey) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServiceKey) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CreateServiceKey) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CreateServiceKey) SetName(v string) { + o.Name = &v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *CreateServiceKey) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServiceKey) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *CreateServiceKey) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *CreateServiceKey) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetNotes returns the Notes field value if set, zero value otherwise. +func (o *CreateServiceKey) GetNotes() string { + if o == nil || IsNil(o.Notes) { + var ret string + return ret + } + return *o.Notes +} + +// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateServiceKey) GetNotesOk() (*string, bool) { + if o == nil || IsNil(o.Notes) { + return nil, false + } + return o.Notes, true +} + +// HasNotes returns a boolean if a field has been set. +func (o *CreateServiceKey) HasNotes() bool { + if o != nil && !IsNil(o.Notes) { + return true + } + + return false +} + +// SetNotes gets a reference to the given string and assigns it to the Notes field. +func (o *CreateServiceKey) SetNotes(v string) { + o.Notes = &v +} + +// GetExpiration returns the Expiration field value +func (o *CreateServiceKey) GetExpiration() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Expiration +} + +// GetExpirationOk returns a tuple with the Expiration field value +// and a boolean to check if the value has been set. +func (o *CreateServiceKey) GetExpirationOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Expiration, true +} + +// SetExpiration sets field value +func (o *CreateServiceKey) SetExpiration(v map[string]interface{}) { + o.Expiration = v +} + +func (o CreateServiceKey) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateServiceKey) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["service"] = o.Service + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if !IsNil(o.Notes) { + toSerialize["notes"] = o.Notes + } + toSerialize["expiration"] = o.Expiration + return toSerialize, nil +} + +func (o *CreateServiceKey) 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{ + "service", + "expiration", + } + + 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) + } + } + + varCreateServiceKey := _CreateServiceKey{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateServiceKey) + + if err != nil { + return err + } + + *o = CreateServiceKey(varCreateServiceKey) + + return err +} + +type NullableCreateServiceKey struct { + value *CreateServiceKey + isSet bool +} + +func (v NullableCreateServiceKey) Get() *CreateServiceKey { + return v.value +} + +func (v *NullableCreateServiceKey) Set(val *CreateServiceKey) { + v.value = val + v.isSet = true +} + +func (v NullableCreateServiceKey) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateServiceKey) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateServiceKey(val *CreateServiceKey) *NullableCreateServiceKey { + return &NullableCreateServiceKey{value: val, isSet: true} +} + +func (v NullableCreateServiceKey) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateServiceKey) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_export_logs.go b/quay_api/model_export_logs.go new file mode 100644 index 0000000..9806051 --- /dev/null +++ b/quay_api/model_export_logs.go @@ -0,0 +1,163 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "encoding/json" +) + +// checks if the ExportLogs type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExportLogs{} + +// ExportLogs Configuration for an export logs operation +type ExportLogs struct { + // The callback URL to invoke with a link to the exported logs + CallbackUrl *string `json:"callback_url,omitempty"` + // The e-mail address at which to e-mail a link to the exported logs + CallbackEmail *string `json:"callback_email,omitempty"` +} + +// NewExportLogs instantiates a new ExportLogs 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 NewExportLogs() *ExportLogs { + this := ExportLogs{} + return &this +} + +// NewExportLogsWithDefaults instantiates a new ExportLogs 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 NewExportLogsWithDefaults() *ExportLogs { + this := ExportLogs{} + return &this +} + +// GetCallbackUrl returns the CallbackUrl field value if set, zero value otherwise. +func (o *ExportLogs) GetCallbackUrl() string { + if o == nil || IsNil(o.CallbackUrl) { + var ret string + return ret + } + return *o.CallbackUrl +} + +// GetCallbackUrlOk returns a tuple with the CallbackUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportLogs) GetCallbackUrlOk() (*string, bool) { + if o == nil || IsNil(o.CallbackUrl) { + return nil, false + } + return o.CallbackUrl, true +} + +// HasCallbackUrl returns a boolean if a field has been set. +func (o *ExportLogs) HasCallbackUrl() bool { + if o != nil && !IsNil(o.CallbackUrl) { + return true + } + + return false +} + +// SetCallbackUrl gets a reference to the given string and assigns it to the CallbackUrl field. +func (o *ExportLogs) SetCallbackUrl(v string) { + o.CallbackUrl = &v +} + +// GetCallbackEmail returns the CallbackEmail field value if set, zero value otherwise. +func (o *ExportLogs) GetCallbackEmail() string { + if o == nil || IsNil(o.CallbackEmail) { + var ret string + return ret + } + return *o.CallbackEmail +} + +// GetCallbackEmailOk returns a tuple with the CallbackEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExportLogs) GetCallbackEmailOk() (*string, bool) { + if o == nil || IsNil(o.CallbackEmail) { + return nil, false + } + return o.CallbackEmail, true +} + +// HasCallbackEmail returns a boolean if a field has been set. +func (o *ExportLogs) HasCallbackEmail() bool { + if o != nil && !IsNil(o.CallbackEmail) { + return true + } + + return false +} + +// SetCallbackEmail gets a reference to the given string and assigns it to the CallbackEmail field. +func (o *ExportLogs) SetCallbackEmail(v string) { + o.CallbackEmail = &v +} + +func (o ExportLogs) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExportLogs) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CallbackUrl) { + toSerialize["callback_url"] = o.CallbackUrl + } + if !IsNil(o.CallbackEmail) { + toSerialize["callback_email"] = o.CallbackEmail + } + return toSerialize, nil +} + +type NullableExportLogs struct { + value *ExportLogs + isSet bool +} + +func (v NullableExportLogs) Get() *ExportLogs { + return v.value +} + +func (v *NullableExportLogs) Set(val *ExportLogs) { + v.value = val + v.isSet = true +} + +func (v NullableExportLogs) IsSet() bool { + return v.isSet +} + +func (v *NullableExportLogs) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExportLogs(val *ExportLogs) *NullableExportLogs { + return &NullableExportLogs{value: val, isSet: true} +} + +func (v NullableExportLogs) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExportLogs) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_new_app.go b/quay_api/model_new_app.go new file mode 100644 index 0000000..a557bb4 --- /dev/null +++ b/quay_api/model_new_app.go @@ -0,0 +1,306 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the NewApp type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewApp{} + +// NewApp Description of a new organization application. +type NewApp struct { + // The name of the application + Name string `json:"name"` + // The URI for the application's OAuth redirect + RedirectUri *string `json:"redirect_uri,omitempty"` + // The URI for the application's homepage + ApplicationUri *string `json:"application_uri,omitempty"` + // The human-readable description for the application + Description *string `json:"description,omitempty"` + // The e-mail address of the avatar to use for the application + AvatarEmail *string `json:"avatar_email,omitempty"` +} + +type _NewApp NewApp + +// NewNewApp instantiates a new NewApp 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 NewNewApp(name string) *NewApp { + this := NewApp{} + this.Name = name + return &this +} + +// NewNewAppWithDefaults instantiates a new NewApp 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 NewNewAppWithDefaults() *NewApp { + this := NewApp{} + return &this +} + +// GetName returns the Name field value +func (o *NewApp) 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 *NewApp) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *NewApp) SetName(v string) { + o.Name = v +} + +// GetRedirectUri returns the RedirectUri field value if set, zero value otherwise. +func (o *NewApp) GetRedirectUri() string { + if o == nil || IsNil(o.RedirectUri) { + var ret string + return ret + } + return *o.RedirectUri +} + +// GetRedirectUriOk returns a tuple with the RedirectUri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NewApp) GetRedirectUriOk() (*string, bool) { + if o == nil || IsNil(o.RedirectUri) { + return nil, false + } + return o.RedirectUri, true +} + +// HasRedirectUri returns a boolean if a field has been set. +func (o *NewApp) HasRedirectUri() bool { + if o != nil && !IsNil(o.RedirectUri) { + return true + } + + return false +} + +// SetRedirectUri gets a reference to the given string and assigns it to the RedirectUri field. +func (o *NewApp) SetRedirectUri(v string) { + o.RedirectUri = &v +} + +// GetApplicationUri returns the ApplicationUri field value if set, zero value otherwise. +func (o *NewApp) GetApplicationUri() string { + if o == nil || IsNil(o.ApplicationUri) { + var ret string + return ret + } + return *o.ApplicationUri +} + +// GetApplicationUriOk returns a tuple with the ApplicationUri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NewApp) GetApplicationUriOk() (*string, bool) { + if o == nil || IsNil(o.ApplicationUri) { + return nil, false + } + return o.ApplicationUri, true +} + +// HasApplicationUri returns a boolean if a field has been set. +func (o *NewApp) HasApplicationUri() bool { + if o != nil && !IsNil(o.ApplicationUri) { + return true + } + + return false +} + +// SetApplicationUri gets a reference to the given string and assigns it to the ApplicationUri field. +func (o *NewApp) SetApplicationUri(v string) { + o.ApplicationUri = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *NewApp) 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 *NewApp) 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 *NewApp) 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 *NewApp) SetDescription(v string) { + o.Description = &v +} + +// GetAvatarEmail returns the AvatarEmail field value if set, zero value otherwise. +func (o *NewApp) GetAvatarEmail() string { + if o == nil || IsNil(o.AvatarEmail) { + var ret string + return ret + } + return *o.AvatarEmail +} + +// GetAvatarEmailOk returns a tuple with the AvatarEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NewApp) GetAvatarEmailOk() (*string, bool) { + if o == nil || IsNil(o.AvatarEmail) { + return nil, false + } + return o.AvatarEmail, true +} + +// HasAvatarEmail returns a boolean if a field has been set. +func (o *NewApp) HasAvatarEmail() bool { + if o != nil && !IsNil(o.AvatarEmail) { + return true + } + + return false +} + +// SetAvatarEmail gets a reference to the given string and assigns it to the AvatarEmail field. +func (o *NewApp) SetAvatarEmail(v string) { + o.AvatarEmail = &v +} + +func (o NewApp) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewApp) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.RedirectUri) { + toSerialize["redirect_uri"] = o.RedirectUri + } + if !IsNil(o.ApplicationUri) { + toSerialize["application_uri"] = o.ApplicationUri + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.AvatarEmail) { + toSerialize["avatar_email"] = o.AvatarEmail + } + return toSerialize, nil +} + +func (o *NewApp) 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) + } + } + + varNewApp := _NewApp{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNewApp) + + if err != nil { + return err + } + + *o = NewApp(varNewApp) + + return err +} + +type NullableNewApp struct { + value *NewApp + isSet bool +} + +func (v NullableNewApp) Get() *NewApp { + return v.value +} + +func (v *NullableNewApp) Set(val *NewApp) { + v.value = val + v.isSet = true +} + +func (v NullableNewApp) IsSet() bool { + return v.isSet +} + +func (v *NullableNewApp) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewApp(val *NewApp) *NullableNewApp { + return &NullableNewApp{value: val, isSet: true} +} + +func (v NullableNewApp) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewApp) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_new_namespace_quota.go b/quay_api/model_new_namespace_quota.go new file mode 100644 index 0000000..14b6f62 --- /dev/null +++ b/quay_api/model_new_namespace_quota.go @@ -0,0 +1,158 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the NewNamespaceQuota type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewNamespaceQuota{} + +// NewNamespaceQuota Description of a new organization quota +type NewNamespaceQuota struct { + // Number of bytes the organization is allowed + LimitBytes int32 `json:"limit_bytes"` +} + +type _NewNamespaceQuota NewNamespaceQuota + +// NewNewNamespaceQuota instantiates a new NewNamespaceQuota 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 NewNewNamespaceQuota(limitBytes int32) *NewNamespaceQuota { + this := NewNamespaceQuota{} + this.LimitBytes = limitBytes + return &this +} + +// NewNewNamespaceQuotaWithDefaults instantiates a new NewNamespaceQuota 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 NewNewNamespaceQuotaWithDefaults() *NewNamespaceQuota { + this := NewNamespaceQuota{} + return &this +} + +// GetLimitBytes returns the LimitBytes field value +func (o *NewNamespaceQuota) GetLimitBytes() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.LimitBytes +} + +// GetLimitBytesOk returns a tuple with the LimitBytes field value +// and a boolean to check if the value has been set. +func (o *NewNamespaceQuota) GetLimitBytesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.LimitBytes, true +} + +// SetLimitBytes sets field value +func (o *NewNamespaceQuota) SetLimitBytes(v int32) { + o.LimitBytes = v +} + +func (o NewNamespaceQuota) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewNamespaceQuota) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["limit_bytes"] = o.LimitBytes + return toSerialize, nil +} + +func (o *NewNamespaceQuota) 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{ + "limit_bytes", + } + + 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) + } + } + + varNewNamespaceQuota := _NewNamespaceQuota{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNewNamespaceQuota) + + if err != nil { + return err + } + + *o = NewNamespaceQuota(varNewNamespaceQuota) + + return err +} + +type NullableNewNamespaceQuota struct { + value *NewNamespaceQuota + isSet bool +} + +func (v NullableNewNamespaceQuota) Get() *NewNamespaceQuota { + return v.value +} + +func (v *NullableNewNamespaceQuota) Set(val *NewNamespaceQuota) { + v.value = val + v.isSet = true +} + +func (v NullableNewNamespaceQuota) IsSet() bool { + return v.isSet +} + +func (v *NullableNewNamespaceQuota) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewNamespaceQuota(val *NewNamespaceQuota) *NullableNewNamespaceQuota { + return &NullableNewNamespaceQuota{value: val, isSet: true} +} + +func (v NullableNewNamespaceQuota) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewNamespaceQuota) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_new_org.go b/quay_api/model_new_org.go new file mode 100644 index 0000000..b3ad821 --- /dev/null +++ b/quay_api/model_new_org.go @@ -0,0 +1,224 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the NewOrg type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewOrg{} + +// NewOrg Description of a new organization. +type NewOrg struct { + // Organization username + Name string `json:"name"` + // Organization contact email + Email string `json:"email"` + // The (may be disabled) recaptcha response code for verification + RecaptchaResponse *string `json:"recaptcha_response,omitempty"` +} + +type _NewOrg NewOrg + +// NewNewOrg instantiates a new NewOrg 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 NewNewOrg(name string, email string) *NewOrg { + this := NewOrg{} + this.Name = name + this.Email = email + return &this +} + +// NewNewOrgWithDefaults instantiates a new NewOrg 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 NewNewOrgWithDefaults() *NewOrg { + this := NewOrg{} + return &this +} + +// GetName returns the Name field value +func (o *NewOrg) 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 *NewOrg) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *NewOrg) SetName(v string) { + o.Name = v +} + +// GetEmail returns the Email field value +func (o *NewOrg) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *NewOrg) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *NewOrg) SetEmail(v string) { + o.Email = v +} + +// GetRecaptchaResponse returns the RecaptchaResponse field value if set, zero value otherwise. +func (o *NewOrg) GetRecaptchaResponse() string { + if o == nil || IsNil(o.RecaptchaResponse) { + var ret string + return ret + } + return *o.RecaptchaResponse +} + +// GetRecaptchaResponseOk returns a tuple with the RecaptchaResponse field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NewOrg) GetRecaptchaResponseOk() (*string, bool) { + if o == nil || IsNil(o.RecaptchaResponse) { + return nil, false + } + return o.RecaptchaResponse, true +} + +// HasRecaptchaResponse returns a boolean if a field has been set. +func (o *NewOrg) HasRecaptchaResponse() bool { + if o != nil && !IsNil(o.RecaptchaResponse) { + return true + } + + return false +} + +// SetRecaptchaResponse gets a reference to the given string and assigns it to the RecaptchaResponse field. +func (o *NewOrg) SetRecaptchaResponse(v string) { + o.RecaptchaResponse = &v +} + +func (o NewOrg) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewOrg) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["email"] = o.Email + if !IsNil(o.RecaptchaResponse) { + toSerialize["recaptcha_response"] = o.RecaptchaResponse + } + return toSerialize, nil +} + +func (o *NewOrg) 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", + "email", + } + + 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) + } + } + + varNewOrg := _NewOrg{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNewOrg) + + if err != nil { + return err + } + + *o = NewOrg(varNewOrg) + + return err +} + +type NullableNewOrg struct { + value *NewOrg + isSet bool +} + +func (v NullableNewOrg) Get() *NewOrg { + return v.value +} + +func (v *NullableNewOrg) Set(val *NewOrg) { + v.value = val + v.isSet = true +} + +func (v NullableNewOrg) IsSet() bool { + return v.isSet +} + +func (v *NullableNewOrg) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewOrg(val *NewOrg) *NullableNewOrg { + return &NullableNewOrg{value: val, isSet: true} +} + +func (v NullableNewOrg) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewOrg) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_new_org_quota.go b/quay_api/model_new_org_quota.go new file mode 100644 index 0000000..67aa2dd --- /dev/null +++ b/quay_api/model_new_org_quota.go @@ -0,0 +1,158 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the NewOrgQuota type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewOrgQuota{} + +// NewOrgQuota Description of a new organization quota +type NewOrgQuota struct { + // Number of bytes the organization is allowed + LimitBytes int32 `json:"limit_bytes"` +} + +type _NewOrgQuota NewOrgQuota + +// NewNewOrgQuota instantiates a new NewOrgQuota 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 NewNewOrgQuota(limitBytes int32) *NewOrgQuota { + this := NewOrgQuota{} + this.LimitBytes = limitBytes + return &this +} + +// NewNewOrgQuotaWithDefaults instantiates a new NewOrgQuota 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 NewNewOrgQuotaWithDefaults() *NewOrgQuota { + this := NewOrgQuota{} + return &this +} + +// GetLimitBytes returns the LimitBytes field value +func (o *NewOrgQuota) GetLimitBytes() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.LimitBytes +} + +// GetLimitBytesOk returns a tuple with the LimitBytes field value +// and a boolean to check if the value has been set. +func (o *NewOrgQuota) GetLimitBytesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.LimitBytes, true +} + +// SetLimitBytes sets field value +func (o *NewOrgQuota) SetLimitBytes(v int32) { + o.LimitBytes = v +} + +func (o NewOrgQuota) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewOrgQuota) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["limit_bytes"] = o.LimitBytes + return toSerialize, nil +} + +func (o *NewOrgQuota) 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{ + "limit_bytes", + } + + 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) + } + } + + varNewOrgQuota := _NewOrgQuota{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNewOrgQuota) + + if err != nil { + return err + } + + *o = NewOrgQuota(varNewOrgQuota) + + return err +} + +type NullableNewOrgQuota struct { + value *NewOrgQuota + isSet bool +} + +func (v NullableNewOrgQuota) Get() *NewOrgQuota { + return v.value +} + +func (v *NullableNewOrgQuota) Set(val *NewOrgQuota) { + v.value = val + v.isSet = true +} + +func (v NullableNewOrgQuota) IsSet() bool { + return v.isSet +} + +func (v *NullableNewOrgQuota) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewOrgQuota(val *NewOrgQuota) *NullableNewOrgQuota { + return &NullableNewOrgQuota{value: val, isSet: true} +} + +func (v NullableNewOrgQuota) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewOrgQuota) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_new_org_quota_limit.go b/quay_api/model_new_org_quota_limit.go new file mode 100644 index 0000000..02f27c2 --- /dev/null +++ b/quay_api/model_new_org_quota_limit.go @@ -0,0 +1,187 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the NewOrgQuotaLimit type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewOrgQuotaLimit{} + +// NewOrgQuotaLimit Description of a new organization quota limit +type NewOrgQuotaLimit struct { + // Type of quota limit: \"Warning\" or \"Reject\" + Type string `json:"type"` + // Quota threshold, in percent of quota + ThresholdPercent int32 `json:"threshold_percent"` +} + +type _NewOrgQuotaLimit NewOrgQuotaLimit + +// NewNewOrgQuotaLimit instantiates a new NewOrgQuotaLimit 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 NewNewOrgQuotaLimit(type_ string, thresholdPercent int32) *NewOrgQuotaLimit { + this := NewOrgQuotaLimit{} + this.Type = type_ + this.ThresholdPercent = thresholdPercent + return &this +} + +// NewNewOrgQuotaLimitWithDefaults instantiates a new NewOrgQuotaLimit 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 NewNewOrgQuotaLimitWithDefaults() *NewOrgQuotaLimit { + this := NewOrgQuotaLimit{} + return &this +} + +// GetType returns the Type field value +func (o *NewOrgQuotaLimit) 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 *NewOrgQuotaLimit) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *NewOrgQuotaLimit) SetType(v string) { + o.Type = v +} + +// GetThresholdPercent returns the ThresholdPercent field value +func (o *NewOrgQuotaLimit) GetThresholdPercent() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.ThresholdPercent +} + +// GetThresholdPercentOk returns a tuple with the ThresholdPercent field value +// and a boolean to check if the value has been set. +func (o *NewOrgQuotaLimit) GetThresholdPercentOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.ThresholdPercent, true +} + +// SetThresholdPercent sets field value +func (o *NewOrgQuotaLimit) SetThresholdPercent(v int32) { + o.ThresholdPercent = v +} + +func (o NewOrgQuotaLimit) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewOrgQuotaLimit) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["threshold_percent"] = o.ThresholdPercent + return toSerialize, nil +} + +func (o *NewOrgQuotaLimit) 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{ + "type", + "threshold_percent", + } + + 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) + } + } + + varNewOrgQuotaLimit := _NewOrgQuotaLimit{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNewOrgQuotaLimit) + + if err != nil { + return err + } + + *o = NewOrgQuotaLimit(varNewOrgQuotaLimit) + + return err +} + +type NullableNewOrgQuotaLimit struct { + value *NewOrgQuotaLimit + isSet bool +} + +func (v NullableNewOrgQuotaLimit) Get() *NewOrgQuotaLimit { + return v.value +} + +func (v *NullableNewOrgQuotaLimit) Set(val *NewOrgQuotaLimit) { + v.value = val + v.isSet = true +} + +func (v NullableNewOrgQuotaLimit) IsSet() bool { + return v.isSet +} + +func (v *NullableNewOrgQuotaLimit) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewOrgQuotaLimit(val *NewOrgQuotaLimit) *NullableNewOrgQuotaLimit { + return &NullableNewOrgQuotaLimit{value: val, isSet: true} +} + +func (v NullableNewOrgQuotaLimit) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewOrgQuotaLimit) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_new_prototype.go b/quay_api/model_new_prototype.go new file mode 100644 index 0000000..536aa14 --- /dev/null +++ b/quay_api/model_new_prototype.go @@ -0,0 +1,222 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the NewPrototype type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewPrototype{} + +// NewPrototype Description of a new prototype +type NewPrototype struct { + // Role that should be applied to the delegate + Role string `json:"role"` + ActivatingUser *NewPrototypeActivatingUser `json:"activating_user,omitempty"` + Delegate NewPrototypeDelegate `json:"delegate"` +} + +type _NewPrototype NewPrototype + +// NewNewPrototype instantiates a new NewPrototype 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 NewNewPrototype(role string, delegate NewPrototypeDelegate) *NewPrototype { + this := NewPrototype{} + this.Role = role + this.Delegate = delegate + return &this +} + +// NewNewPrototypeWithDefaults instantiates a new NewPrototype 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 NewNewPrototypeWithDefaults() *NewPrototype { + this := NewPrototype{} + return &this +} + +// GetRole returns the Role field value +func (o *NewPrototype) GetRole() string { + if o == nil { + var ret string + return ret + } + + return o.Role +} + +// GetRoleOk returns a tuple with the Role field value +// and a boolean to check if the value has been set. +func (o *NewPrototype) GetRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Role, true +} + +// SetRole sets field value +func (o *NewPrototype) SetRole(v string) { + o.Role = v +} + +// GetActivatingUser returns the ActivatingUser field value if set, zero value otherwise. +func (o *NewPrototype) GetActivatingUser() NewPrototypeActivatingUser { + if o == nil || IsNil(o.ActivatingUser) { + var ret NewPrototypeActivatingUser + return ret + } + return *o.ActivatingUser +} + +// GetActivatingUserOk returns a tuple with the ActivatingUser field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NewPrototype) GetActivatingUserOk() (*NewPrototypeActivatingUser, bool) { + if o == nil || IsNil(o.ActivatingUser) { + return nil, false + } + return o.ActivatingUser, true +} + +// HasActivatingUser returns a boolean if a field has been set. +func (o *NewPrototype) HasActivatingUser() bool { + if o != nil && !IsNil(o.ActivatingUser) { + return true + } + + return false +} + +// SetActivatingUser gets a reference to the given NewPrototypeActivatingUser and assigns it to the ActivatingUser field. +func (o *NewPrototype) SetActivatingUser(v NewPrototypeActivatingUser) { + o.ActivatingUser = &v +} + +// GetDelegate returns the Delegate field value +func (o *NewPrototype) GetDelegate() NewPrototypeDelegate { + if o == nil { + var ret NewPrototypeDelegate + return ret + } + + return o.Delegate +} + +// GetDelegateOk returns a tuple with the Delegate field value +// and a boolean to check if the value has been set. +func (o *NewPrototype) GetDelegateOk() (*NewPrototypeDelegate, bool) { + if o == nil { + return nil, false + } + return &o.Delegate, true +} + +// SetDelegate sets field value +func (o *NewPrototype) SetDelegate(v NewPrototypeDelegate) { + o.Delegate = v +} + +func (o NewPrototype) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewPrototype) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["role"] = o.Role + if !IsNil(o.ActivatingUser) { + toSerialize["activating_user"] = o.ActivatingUser + } + toSerialize["delegate"] = o.Delegate + return toSerialize, nil +} + +func (o *NewPrototype) 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{ + "role", + "delegate", + } + + 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) + } + } + + varNewPrototype := _NewPrototype{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNewPrototype) + + if err != nil { + return err + } + + *o = NewPrototype(varNewPrototype) + + return err +} + +type NullableNewPrototype struct { + value *NewPrototype + isSet bool +} + +func (v NullableNewPrototype) Get() *NewPrototype { + return v.value +} + +func (v *NullableNewPrototype) Set(val *NewPrototype) { + v.value = val + v.isSet = true +} + +func (v NullableNewPrototype) IsSet() bool { + return v.isSet +} + +func (v *NullableNewPrototype) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewPrototype(val *NewPrototype) *NullableNewPrototype { + return &NullableNewPrototype{value: val, isSet: true} +} + +func (v NullableNewPrototype) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewPrototype) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_new_prototype_activating_user.go b/quay_api/model_new_prototype_activating_user.go new file mode 100644 index 0000000..983fb70 --- /dev/null +++ b/quay_api/model_new_prototype_activating_user.go @@ -0,0 +1,158 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the NewPrototypeActivatingUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewPrototypeActivatingUser{} + +// NewPrototypeActivatingUser Repository creating user to whom the rule should apply +type NewPrototypeActivatingUser struct { + // The username for the activating_user + Name string `json:"name"` +} + +type _NewPrototypeActivatingUser NewPrototypeActivatingUser + +// NewNewPrototypeActivatingUser instantiates a new NewPrototypeActivatingUser 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 NewNewPrototypeActivatingUser(name string) *NewPrototypeActivatingUser { + this := NewPrototypeActivatingUser{} + this.Name = name + return &this +} + +// NewNewPrototypeActivatingUserWithDefaults instantiates a new NewPrototypeActivatingUser 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 NewNewPrototypeActivatingUserWithDefaults() *NewPrototypeActivatingUser { + this := NewPrototypeActivatingUser{} + return &this +} + +// GetName returns the Name field value +func (o *NewPrototypeActivatingUser) 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 *NewPrototypeActivatingUser) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *NewPrototypeActivatingUser) SetName(v string) { + o.Name = v +} + +func (o NewPrototypeActivatingUser) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewPrototypeActivatingUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *NewPrototypeActivatingUser) 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) + } + } + + varNewPrototypeActivatingUser := _NewPrototypeActivatingUser{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNewPrototypeActivatingUser) + + if err != nil { + return err + } + + *o = NewPrototypeActivatingUser(varNewPrototypeActivatingUser) + + return err +} + +type NullableNewPrototypeActivatingUser struct { + value *NewPrototypeActivatingUser + isSet bool +} + +func (v NullableNewPrototypeActivatingUser) Get() *NewPrototypeActivatingUser { + return v.value +} + +func (v *NullableNewPrototypeActivatingUser) Set(val *NewPrototypeActivatingUser) { + v.value = val + v.isSet = true +} + +func (v NullableNewPrototypeActivatingUser) IsSet() bool { + return v.isSet +} + +func (v *NullableNewPrototypeActivatingUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewPrototypeActivatingUser(val *NewPrototypeActivatingUser) *NullableNewPrototypeActivatingUser { + return &NullableNewPrototypeActivatingUser{value: val, isSet: true} +} + +func (v NullableNewPrototypeActivatingUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewPrototypeActivatingUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_new_prototype_delegate.go b/quay_api/model_new_prototype_delegate.go new file mode 100644 index 0000000..f274450 --- /dev/null +++ b/quay_api/model_new_prototype_delegate.go @@ -0,0 +1,187 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the NewPrototypeDelegate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewPrototypeDelegate{} + +// NewPrototypeDelegate Information about the user or team to which the rule grants access +type NewPrototypeDelegate struct { + // The name for the delegate team or user + Name string `json:"name"` + // Whether the delegate is a user or a team + Kind string `json:"kind"` +} + +type _NewPrototypeDelegate NewPrototypeDelegate + +// NewNewPrototypeDelegate instantiates a new NewPrototypeDelegate 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 NewNewPrototypeDelegate(name string, kind string) *NewPrototypeDelegate { + this := NewPrototypeDelegate{} + this.Name = name + this.Kind = kind + return &this +} + +// NewNewPrototypeDelegateWithDefaults instantiates a new NewPrototypeDelegate 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 NewNewPrototypeDelegateWithDefaults() *NewPrototypeDelegate { + this := NewPrototypeDelegate{} + return &this +} + +// GetName returns the Name field value +func (o *NewPrototypeDelegate) 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 *NewPrototypeDelegate) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *NewPrototypeDelegate) SetName(v string) { + o.Name = v +} + +// GetKind returns the Kind field value +func (o *NewPrototypeDelegate) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *NewPrototypeDelegate) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *NewPrototypeDelegate) SetKind(v string) { + o.Kind = v +} + +func (o NewPrototypeDelegate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewPrototypeDelegate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["kind"] = o.Kind + return toSerialize, nil +} + +func (o *NewPrototypeDelegate) 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", + "kind", + } + + 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) + } + } + + varNewPrototypeDelegate := _NewPrototypeDelegate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNewPrototypeDelegate) + + if err != nil { + return err + } + + *o = NewPrototypeDelegate(varNewPrototypeDelegate) + + return err +} + +type NullableNewPrototypeDelegate struct { + value *NewPrototypeDelegate + isSet bool +} + +func (v NullableNewPrototypeDelegate) Get() *NewPrototypeDelegate { + return v.value +} + +func (v *NullableNewPrototypeDelegate) Set(val *NewPrototypeDelegate) { + v.value = val + v.isSet = true +} + +func (v NullableNewPrototypeDelegate) IsSet() bool { + return v.isSet +} + +func (v *NullableNewPrototypeDelegate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewPrototypeDelegate(val *NewPrototypeDelegate) *NullableNewPrototypeDelegate { + return &NullableNewPrototypeDelegate{value: val, isSet: true} +} + +func (v NullableNewPrototypeDelegate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewPrototypeDelegate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_new_repo.go b/quay_api/model_new_repo.go new file mode 100644 index 0000000..5353e05 --- /dev/null +++ b/quay_api/model_new_repo.go @@ -0,0 +1,253 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the NewRepo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewRepo{} + +// NewRepo Description of a new repository +type NewRepo struct { + // Repository name + Repository string `json:"repository"` + // Visibility which the repository will start with + Visibility string `json:"visibility"` + // Namespace in which the repository should be created. If omitted, the username of the caller is used + Namespace *string `json:"namespace,omitempty"` + // Markdown encoded description for the repository + Description string `json:"description"` +} + +type _NewRepo NewRepo + +// NewNewRepo instantiates a new NewRepo 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 NewNewRepo(repository string, visibility string, description string) *NewRepo { + this := NewRepo{} + this.Repository = repository + this.Visibility = visibility + this.Description = description + return &this +} + +// NewNewRepoWithDefaults instantiates a new NewRepo 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 NewNewRepoWithDefaults() *NewRepo { + this := NewRepo{} + return &this +} + +// GetRepository returns the Repository field value +func (o *NewRepo) GetRepository() string { + if o == nil { + var ret string + return ret + } + + return o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value +// and a boolean to check if the value has been set. +func (o *NewRepo) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Repository, true +} + +// SetRepository sets field value +func (o *NewRepo) SetRepository(v string) { + o.Repository = v +} + +// GetVisibility returns the Visibility field value +func (o *NewRepo) GetVisibility() string { + if o == nil { + var ret string + return ret + } + + return o.Visibility +} + +// GetVisibilityOk returns a tuple with the Visibility field value +// and a boolean to check if the value has been set. +func (o *NewRepo) GetVisibilityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Visibility, true +} + +// SetVisibility sets field value +func (o *NewRepo) SetVisibility(v string) { + o.Visibility = v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *NewRepo) GetNamespace() string { + if o == nil || IsNil(o.Namespace) { + var ret string + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NewRepo) GetNamespaceOk() (*string, bool) { + if o == nil || IsNil(o.Namespace) { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *NewRepo) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *NewRepo) SetNamespace(v string) { + o.Namespace = &v +} + +// GetDescription returns the Description field value +func (o *NewRepo) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *NewRepo) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *NewRepo) SetDescription(v string) { + o.Description = v +} + +func (o NewRepo) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewRepo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["repository"] = o.Repository + toSerialize["visibility"] = o.Visibility + if !IsNil(o.Namespace) { + toSerialize["namespace"] = o.Namespace + } + toSerialize["description"] = o.Description + return toSerialize, nil +} + +func (o *NewRepo) 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{ + "repository", + "visibility", + "description", + } + + 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) + } + } + + varNewRepo := _NewRepo{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNewRepo) + + if err != nil { + return err + } + + *o = NewRepo(varNewRepo) + + return err +} + +type NullableNewRepo struct { + value *NewRepo + isSet bool +} + +func (v NullableNewRepo) Get() *NewRepo { + return v.value +} + +func (v *NullableNewRepo) Set(val *NewRepo) { + v.value = val + v.isSet = true +} + +func (v NullableNewRepo) IsSet() bool { + return v.isSet +} + +func (v *NullableNewRepo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewRepo(val *NewRepo) *NullableNewRepo { + return &NullableNewRepo{value: val, isSet: true} +} + +func (v NullableNewRepo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewRepo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_new_starred_repository.go b/quay_api/model_new_starred_repository.go new file mode 100644 index 0000000..9b46a95 --- /dev/null +++ b/quay_api/model_new_starred_repository.go @@ -0,0 +1,187 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the NewStarredRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewStarredRepository{} + +// NewStarredRepository struct for NewStarredRepository +type NewStarredRepository struct { + // Namespace in which the repository belongs + Namespace string `json:"namespace"` + // Repository name + Repository string `json:"repository"` +} + +type _NewStarredRepository NewStarredRepository + +// NewNewStarredRepository instantiates a new NewStarredRepository 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 NewNewStarredRepository(namespace string, repository string) *NewStarredRepository { + this := NewStarredRepository{} + this.Namespace = namespace + this.Repository = repository + return &this +} + +// NewNewStarredRepositoryWithDefaults instantiates a new NewStarredRepository 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 NewNewStarredRepositoryWithDefaults() *NewStarredRepository { + this := NewStarredRepository{} + return &this +} + +// GetNamespace returns the Namespace field value +func (o *NewStarredRepository) GetNamespace() string { + if o == nil { + var ret string + return ret + } + + return o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value +// and a boolean to check if the value has been set. +func (o *NewStarredRepository) GetNamespaceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Namespace, true +} + +// SetNamespace sets field value +func (o *NewStarredRepository) SetNamespace(v string) { + o.Namespace = v +} + +// GetRepository returns the Repository field value +func (o *NewStarredRepository) GetRepository() string { + if o == nil { + var ret string + return ret + } + + return o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value +// and a boolean to check if the value has been set. +func (o *NewStarredRepository) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Repository, true +} + +// SetRepository sets field value +func (o *NewStarredRepository) SetRepository(v string) { + o.Repository = v +} + +func (o NewStarredRepository) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewStarredRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["namespace"] = o.Namespace + toSerialize["repository"] = o.Repository + return toSerialize, nil +} + +func (o *NewStarredRepository) 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{ + "namespace", + "repository", + } + + 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) + } + } + + varNewStarredRepository := _NewStarredRepository{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNewStarredRepository) + + if err != nil { + return err + } + + *o = NewStarredRepository(varNewStarredRepository) + + return err +} + +type NullableNewStarredRepository struct { + value *NewStarredRepository + isSet bool +} + +func (v NullableNewStarredRepository) Get() *NewStarredRepository { + return v.value +} + +func (v *NullableNewStarredRepository) Set(val *NewStarredRepository) { + v.value = val + v.isSet = true +} + +func (v NullableNewStarredRepository) IsSet() bool { + return v.isSet +} + +func (v *NullableNewStarredRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewStarredRepository(val *NewStarredRepository) *NullableNewStarredRepository { + return &NullableNewStarredRepository{value: val, isSet: true} +} + +func (v NullableNewStarredRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewStarredRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_new_token.go b/quay_api/model_new_token.go new file mode 100644 index 0000000..eaf5d00 --- /dev/null +++ b/quay_api/model_new_token.go @@ -0,0 +1,158 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the NewToken type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewToken{} + +// NewToken Description of a new token. +type NewToken struct { + // Friendly name to help identify the token + FriendlyName string `json:"friendlyName"` +} + +type _NewToken NewToken + +// NewNewToken instantiates a new NewToken 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 NewNewToken(friendlyName string) *NewToken { + this := NewToken{} + this.FriendlyName = friendlyName + return &this +} + +// NewNewTokenWithDefaults instantiates a new NewToken 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 NewNewTokenWithDefaults() *NewToken { + this := NewToken{} + return &this +} + +// GetFriendlyName returns the FriendlyName field value +func (o *NewToken) GetFriendlyName() string { + if o == nil { + var ret string + return ret + } + + return o.FriendlyName +} + +// GetFriendlyNameOk returns a tuple with the FriendlyName field value +// and a boolean to check if the value has been set. +func (o *NewToken) GetFriendlyNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FriendlyName, true +} + +// SetFriendlyName sets field value +func (o *NewToken) SetFriendlyName(v string) { + o.FriendlyName = v +} + +func (o NewToken) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewToken) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["friendlyName"] = o.FriendlyName + return toSerialize, nil +} + +func (o *NewToken) 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{ + "friendlyName", + } + + 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) + } + } + + varNewToken := _NewToken{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNewToken) + + if err != nil { + return err + } + + *o = NewToken(varNewToken) + + return err +} + +type NullableNewToken struct { + value *NewToken + isSet bool +} + +func (v NullableNewToken) Get() *NewToken { + return v.value +} + +func (v *NullableNewToken) Set(val *NewToken) { + v.value = val + v.isSet = true +} + +func (v NullableNewToken) IsSet() bool { + return v.isSet +} + +func (v *NullableNewToken) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewToken(val *NewToken) *NullableNewToken { + return &NullableNewToken{value: val, isSet: true} +} + +func (v NullableNewToken) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewToken) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_new_user.go b/quay_api/model_new_user.go new file mode 100644 index 0000000..484ce60 --- /dev/null +++ b/quay_api/model_new_user.go @@ -0,0 +1,298 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the NewUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NewUser{} + +// NewUser Fields which must be specified for a new user. +type NewUser struct { + // The user's username + Username string `json:"username"` + // The user's password + Password string `json:"password"` + // The user's email address + Email *string `json:"email,omitempty"` + // The optional invite code + InviteCode *string `json:"invite_code,omitempty"` + // The (may be disabled) recaptcha response code for verification + RecaptchaResponse *string `json:"recaptcha_response,omitempty"` +} + +type _NewUser NewUser + +// NewNewUser instantiates a new NewUser 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 NewNewUser(username string, password string) *NewUser { + this := NewUser{} + this.Username = username + this.Password = password + return &this +} + +// NewNewUserWithDefaults instantiates a new NewUser 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 NewNewUserWithDefaults() *NewUser { + this := NewUser{} + return &this +} + +// GetUsername returns the Username field value +func (o *NewUser) GetUsername() string { + if o == nil { + var ret string + return ret + } + + return o.Username +} + +// GetUsernameOk returns a tuple with the Username field value +// and a boolean to check if the value has been set. +func (o *NewUser) GetUsernameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Username, true +} + +// SetUsername sets field value +func (o *NewUser) SetUsername(v string) { + o.Username = v +} + +// GetPassword returns the Password field value +func (o *NewUser) GetPassword() string { + if o == nil { + var ret string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *NewUser) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + +// SetPassword sets field value +func (o *NewUser) SetPassword(v string) { + o.Password = v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *NewUser) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NewUser) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *NewUser) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *NewUser) SetEmail(v string) { + o.Email = &v +} + +// GetInviteCode returns the InviteCode field value if set, zero value otherwise. +func (o *NewUser) GetInviteCode() string { + if o == nil || IsNil(o.InviteCode) { + var ret string + return ret + } + return *o.InviteCode +} + +// GetInviteCodeOk returns a tuple with the InviteCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NewUser) GetInviteCodeOk() (*string, bool) { + if o == nil || IsNil(o.InviteCode) { + return nil, false + } + return o.InviteCode, true +} + +// HasInviteCode returns a boolean if a field has been set. +func (o *NewUser) HasInviteCode() bool { + if o != nil && !IsNil(o.InviteCode) { + return true + } + + return false +} + +// SetInviteCode gets a reference to the given string and assigns it to the InviteCode field. +func (o *NewUser) SetInviteCode(v string) { + o.InviteCode = &v +} + +// GetRecaptchaResponse returns the RecaptchaResponse field value if set, zero value otherwise. +func (o *NewUser) GetRecaptchaResponse() string { + if o == nil || IsNil(o.RecaptchaResponse) { + var ret string + return ret + } + return *o.RecaptchaResponse +} + +// GetRecaptchaResponseOk returns a tuple with the RecaptchaResponse field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NewUser) GetRecaptchaResponseOk() (*string, bool) { + if o == nil || IsNil(o.RecaptchaResponse) { + return nil, false + } + return o.RecaptchaResponse, true +} + +// HasRecaptchaResponse returns a boolean if a field has been set. +func (o *NewUser) HasRecaptchaResponse() bool { + if o != nil && !IsNil(o.RecaptchaResponse) { + return true + } + + return false +} + +// SetRecaptchaResponse gets a reference to the given string and assigns it to the RecaptchaResponse field. +func (o *NewUser) SetRecaptchaResponse(v string) { + o.RecaptchaResponse = &v +} + +func (o NewUser) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NewUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["username"] = o.Username + toSerialize["password"] = o.Password + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.InviteCode) { + toSerialize["invite_code"] = o.InviteCode + } + if !IsNil(o.RecaptchaResponse) { + toSerialize["recaptcha_response"] = o.RecaptchaResponse + } + return toSerialize, nil +} + +func (o *NewUser) 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{ + "username", + "password", + } + + 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) + } + } + + varNewUser := _NewUser{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNewUser) + + if err != nil { + return err + } + + *o = NewUser(varNewUser) + + return err +} + +type NullableNewUser struct { + value *NewUser + isSet bool +} + +func (v NullableNewUser) Get() *NewUser { + return v.value +} + +func (v *NullableNewUser) Set(val *NewUser) { + v.value = val + v.isSet = true +} + +func (v NullableNewUser) IsSet() bool { + return v.isSet +} + +func (v *NullableNewUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewUser(val *NewUser) *NullableNewUser { + return &NullableNewUser{value: val, isSet: true} +} + +func (v NullableNewUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_notification_create_request.go b/quay_api/model_notification_create_request.go new file mode 100644 index 0000000..0982a3f --- /dev/null +++ b/quay_api/model_notification_create_request.go @@ -0,0 +1,282 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the NotificationCreateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NotificationCreateRequest{} + +// NotificationCreateRequest Information for creating a notification on a repository +type NotificationCreateRequest struct { + // The event on which the notification will respond + Event string `json:"event"` + // The method of notification (such as email or web callback) + Method string `json:"method"` + // JSON config information for the specific method of notification + Config map[string]interface{} `json:"config"` + // JSON config information for the specific event of notification + EventConfig map[string]interface{} `json:"eventConfig"` + // The human-readable title of the notification + Title *string `json:"title,omitempty"` +} + +type _NotificationCreateRequest NotificationCreateRequest + +// NewNotificationCreateRequest instantiates a new NotificationCreateRequest 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 NewNotificationCreateRequest(event string, method string, config map[string]interface{}, eventConfig map[string]interface{}) *NotificationCreateRequest { + this := NotificationCreateRequest{} + this.Event = event + this.Method = method + this.Config = config + this.EventConfig = eventConfig + return &this +} + +// NewNotificationCreateRequestWithDefaults instantiates a new NotificationCreateRequest 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 NewNotificationCreateRequestWithDefaults() *NotificationCreateRequest { + this := NotificationCreateRequest{} + return &this +} + +// GetEvent returns the Event field value +func (o *NotificationCreateRequest) 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 *NotificationCreateRequest) GetEventOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Event, true +} + +// SetEvent sets field value +func (o *NotificationCreateRequest) SetEvent(v string) { + o.Event = v +} + +// GetMethod returns the Method field value +func (o *NotificationCreateRequest) GetMethod() string { + if o == nil { + var ret string + return ret + } + + return o.Method +} + +// GetMethodOk returns a tuple with the Method field value +// and a boolean to check if the value has been set. +func (o *NotificationCreateRequest) GetMethodOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Method, true +} + +// SetMethod sets field value +func (o *NotificationCreateRequest) SetMethod(v string) { + o.Method = v +} + +// GetConfig returns the Config field value +func (o *NotificationCreateRequest) GetConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Config +} + +// GetConfigOk returns a tuple with the Config field value +// and a boolean to check if the value has been set. +func (o *NotificationCreateRequest) GetConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Config, true +} + +// SetConfig sets field value +func (o *NotificationCreateRequest) SetConfig(v map[string]interface{}) { + o.Config = v +} + +// GetEventConfig returns the EventConfig field value +func (o *NotificationCreateRequest) GetEventConfig() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.EventConfig +} + +// GetEventConfigOk returns a tuple with the EventConfig field value +// and a boolean to check if the value has been set. +func (o *NotificationCreateRequest) GetEventConfigOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.EventConfig, true +} + +// SetEventConfig sets field value +func (o *NotificationCreateRequest) SetEventConfig(v map[string]interface{}) { + o.EventConfig = v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *NotificationCreateRequest) 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 *NotificationCreateRequest) 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 *NotificationCreateRequest) 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 *NotificationCreateRequest) SetTitle(v string) { + o.Title = &v +} + +func (o NotificationCreateRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NotificationCreateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["event"] = o.Event + toSerialize["method"] = o.Method + toSerialize["config"] = o.Config + toSerialize["eventConfig"] = o.EventConfig + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + return toSerialize, nil +} + +func (o *NotificationCreateRequest) 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{ + "event", + "method", + "config", + "eventConfig", + } + + 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) + } + } + + varNotificationCreateRequest := _NotificationCreateRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNotificationCreateRequest) + + if err != nil { + return err + } + + *o = NotificationCreateRequest(varNotificationCreateRequest) + + return err +} + +type NullableNotificationCreateRequest struct { + value *NotificationCreateRequest + isSet bool +} + +func (v NullableNotificationCreateRequest) Get() *NotificationCreateRequest { + return v.value +} + +func (v *NullableNotificationCreateRequest) Set(val *NotificationCreateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableNotificationCreateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableNotificationCreateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNotificationCreateRequest(val *NotificationCreateRequest) *NullableNotificationCreateRequest { + return &NullableNotificationCreateRequest{value: val, isSet: true} +} + +func (v NullableNotificationCreateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNotificationCreateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_prototype_update.go b/quay_api/model_prototype_update.go new file mode 100644 index 0000000..bc4fc44 --- /dev/null +++ b/quay_api/model_prototype_update.go @@ -0,0 +1,158 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the PrototypeUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PrototypeUpdate{} + +// PrototypeUpdate Description of a the new prototype role +type PrototypeUpdate struct { + // Role that should be applied to the permission + Role string `json:"role"` +} + +type _PrototypeUpdate PrototypeUpdate + +// NewPrototypeUpdate instantiates a new PrototypeUpdate 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 NewPrototypeUpdate(role string) *PrototypeUpdate { + this := PrototypeUpdate{} + this.Role = role + return &this +} + +// NewPrototypeUpdateWithDefaults instantiates a new PrototypeUpdate 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 NewPrototypeUpdateWithDefaults() *PrototypeUpdate { + this := PrototypeUpdate{} + return &this +} + +// GetRole returns the Role field value +func (o *PrototypeUpdate) GetRole() string { + if o == nil { + var ret string + return ret + } + + return o.Role +} + +// GetRoleOk returns a tuple with the Role field value +// and a boolean to check if the value has been set. +func (o *PrototypeUpdate) GetRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Role, true +} + +// SetRole sets field value +func (o *PrototypeUpdate) SetRole(v string) { + o.Role = v +} + +func (o PrototypeUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PrototypeUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["role"] = o.Role + return toSerialize, nil +} + +func (o *PrototypeUpdate) 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{ + "role", + } + + 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) + } + } + + varPrototypeUpdate := _PrototypeUpdate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPrototypeUpdate) + + if err != nil { + return err + } + + *o = PrototypeUpdate(varPrototypeUpdate) + + return err +} + +type NullablePrototypeUpdate struct { + value *PrototypeUpdate + isSet bool +} + +func (v NullablePrototypeUpdate) Get() *PrototypeUpdate { + return v.value +} + +func (v *NullablePrototypeUpdate) Set(val *PrototypeUpdate) { + v.value = val + v.isSet = true +} + +func (v NullablePrototypeUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullablePrototypeUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePrototypeUpdate(val *PrototypeUpdate) *NullablePrototypeUpdate { + return &NullablePrototypeUpdate{value: val, isSet: true} +} + +func (v NullablePrototypeUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePrototypeUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_put_service_key.go b/quay_api/model_put_service_key.go new file mode 100644 index 0000000..4422d54 --- /dev/null +++ b/quay_api/model_put_service_key.go @@ -0,0 +1,200 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "encoding/json" +) + +// checks if the PutServiceKey type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PutServiceKey{} + +// PutServiceKey Description of updates for a service key +type PutServiceKey struct { + // The friendly name of a service key + Name *string `json:"name,omitempty"` + // The key/value pairs of this key's metadata + Metadata map[string]interface{} `json:"metadata,omitempty"` + // The expiration date as a unix timestamp + Expiration map[string]interface{} `json:"expiration,omitempty"` +} + +// NewPutServiceKey instantiates a new PutServiceKey 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 NewPutServiceKey() *PutServiceKey { + this := PutServiceKey{} + return &this +} + +// NewPutServiceKeyWithDefaults instantiates a new PutServiceKey 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 NewPutServiceKeyWithDefaults() *PutServiceKey { + this := PutServiceKey{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PutServiceKey) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PutServiceKey) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PutServiceKey) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PutServiceKey) SetName(v string) { + o.Name = &v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *PutServiceKey) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PutServiceKey) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *PutServiceKey) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *PutServiceKey) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetExpiration returns the Expiration field value if set, zero value otherwise. +func (o *PutServiceKey) GetExpiration() map[string]interface{} { + if o == nil || IsNil(o.Expiration) { + var ret map[string]interface{} + return ret + } + return o.Expiration +} + +// GetExpirationOk returns a tuple with the Expiration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PutServiceKey) GetExpirationOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Expiration) { + return map[string]interface{}{}, false + } + return o.Expiration, true +} + +// HasExpiration returns a boolean if a field has been set. +func (o *PutServiceKey) HasExpiration() bool { + if o != nil && !IsNil(o.Expiration) { + return true + } + + return false +} + +// SetExpiration gets a reference to the given map[string]interface{} and assigns it to the Expiration field. +func (o *PutServiceKey) SetExpiration(v map[string]interface{}) { + o.Expiration = v +} + +func (o PutServiceKey) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PutServiceKey) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if !IsNil(o.Expiration) { + toSerialize["expiration"] = o.Expiration + } + return toSerialize, nil +} + +type NullablePutServiceKey struct { + value *PutServiceKey + isSet bool +} + +func (v NullablePutServiceKey) Get() *PutServiceKey { + return v.value +} + +func (v *NullablePutServiceKey) Set(val *PutServiceKey) { + v.value = val + v.isSet = true +} + +func (v NullablePutServiceKey) IsSet() bool { + return v.isSet +} + +func (v *NullablePutServiceKey) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePutServiceKey(val *PutServiceKey) *NullablePutServiceKey { + return &NullablePutServiceKey{value: val, isSet: true} +} + +func (v NullablePutServiceKey) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePutServiceKey) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_repo_update.go b/quay_api/model_repo_update.go new file mode 100644 index 0000000..9120ab2 --- /dev/null +++ b/quay_api/model_repo_update.go @@ -0,0 +1,158 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RepoUpdate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepoUpdate{} + +// RepoUpdate Fields which can be updated in a repository. +type RepoUpdate struct { + // Markdown encoded description for the repository + Description string `json:"description"` +} + +type _RepoUpdate RepoUpdate + +// NewRepoUpdate instantiates a new RepoUpdate 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 NewRepoUpdate(description string) *RepoUpdate { + this := RepoUpdate{} + this.Description = description + return &this +} + +// NewRepoUpdateWithDefaults instantiates a new RepoUpdate 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 NewRepoUpdateWithDefaults() *RepoUpdate { + this := RepoUpdate{} + return &this +} + +// GetDescription returns the Description field value +func (o *RepoUpdate) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *RepoUpdate) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *RepoUpdate) SetDescription(v string) { + o.Description = v +} + +func (o RepoUpdate) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepoUpdate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["description"] = o.Description + return toSerialize, nil +} + +func (o *RepoUpdate) 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{ + "description", + } + + 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) + } + } + + varRepoUpdate := _RepoUpdate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRepoUpdate) + + if err != nil { + return err + } + + *o = RepoUpdate(varRepoUpdate) + + return err +} + +type NullableRepoUpdate struct { + value *RepoUpdate + isSet bool +} + +func (v NullableRepoUpdate) Get() *RepoUpdate { + return v.value +} + +func (v *NullableRepoUpdate) Set(val *RepoUpdate) { + v.value = val + v.isSet = true +} + +func (v NullableRepoUpdate) IsSet() bool { + return v.isSet +} + +func (v *NullableRepoUpdate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepoUpdate(val *RepoUpdate) *NullableRepoUpdate { + return &NullableRepoUpdate{value: val, isSet: true} +} + +func (v NullableRepoUpdate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepoUpdate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_repository_build_request.go b/quay_api/model_repository_build_request.go new file mode 100644 index 0000000..c7971e7 --- /dev/null +++ b/quay_api/model_repository_build_request.go @@ -0,0 +1,348 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "encoding/json" +) + +// checks if the RepositoryBuildRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RepositoryBuildRequest{} + +// RepositoryBuildRequest Description of a new repository build. +type RepositoryBuildRequest struct { + // The file id that was generated when the build spec was uploaded + FileId *string `json:"file_id,omitempty"` + // The URL of the .tar.gz to build. Must start with \"http\" or \"https\". + ArchiveUrl *string `json:"archive_url,omitempty"` + // Subdirectory in which the Dockerfile can be found. You can only specify this or dockerfile_path + Subdirectory *string `json:"subdirectory,omitempty"` + // Path to a dockerfile. You can only specify this or subdirectory. + DockerfilePath *string `json:"dockerfile_path,omitempty"` + // Pass in the context for the dockerfile. This is optional. + Context *string `json:"context,omitempty"` + // Username of a Quay robot account to use as pull credentials + PullRobot *string `json:"pull_robot,omitempty"` + // The tags to which the built images will be pushed. If none specified, \"latest\" is used. + DockerTags []string `json:"docker_tags,omitempty"` +} + +// NewRepositoryBuildRequest instantiates a new RepositoryBuildRequest 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 NewRepositoryBuildRequest() *RepositoryBuildRequest { + this := RepositoryBuildRequest{} + return &this +} + +// NewRepositoryBuildRequestWithDefaults instantiates a new RepositoryBuildRequest 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 NewRepositoryBuildRequestWithDefaults() *RepositoryBuildRequest { + this := RepositoryBuildRequest{} + return &this +} + +// GetFileId returns the FileId field value if set, zero value otherwise. +func (o *RepositoryBuildRequest) GetFileId() string { + if o == nil || IsNil(o.FileId) { + var ret string + return ret + } + return *o.FileId +} + +// GetFileIdOk returns a tuple with the FileId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryBuildRequest) GetFileIdOk() (*string, bool) { + if o == nil || IsNil(o.FileId) { + return nil, false + } + return o.FileId, true +} + +// HasFileId returns a boolean if a field has been set. +func (o *RepositoryBuildRequest) HasFileId() bool { + if o != nil && !IsNil(o.FileId) { + return true + } + + return false +} + +// SetFileId gets a reference to the given string and assigns it to the FileId field. +func (o *RepositoryBuildRequest) SetFileId(v string) { + o.FileId = &v +} + +// GetArchiveUrl returns the ArchiveUrl field value if set, zero value otherwise. +func (o *RepositoryBuildRequest) GetArchiveUrl() string { + if o == nil || IsNil(o.ArchiveUrl) { + var ret string + return ret + } + return *o.ArchiveUrl +} + +// GetArchiveUrlOk returns a tuple with the ArchiveUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryBuildRequest) GetArchiveUrlOk() (*string, bool) { + if o == nil || IsNil(o.ArchiveUrl) { + return nil, false + } + return o.ArchiveUrl, true +} + +// HasArchiveUrl returns a boolean if a field has been set. +func (o *RepositoryBuildRequest) HasArchiveUrl() bool { + if o != nil && !IsNil(o.ArchiveUrl) { + return true + } + + return false +} + +// SetArchiveUrl gets a reference to the given string and assigns it to the ArchiveUrl field. +func (o *RepositoryBuildRequest) SetArchiveUrl(v string) { + o.ArchiveUrl = &v +} + +// GetSubdirectory returns the Subdirectory field value if set, zero value otherwise. +func (o *RepositoryBuildRequest) GetSubdirectory() string { + if o == nil || IsNil(o.Subdirectory) { + var ret string + return ret + } + return *o.Subdirectory +} + +// GetSubdirectoryOk returns a tuple with the Subdirectory field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryBuildRequest) GetSubdirectoryOk() (*string, bool) { + if o == nil || IsNil(o.Subdirectory) { + return nil, false + } + return o.Subdirectory, true +} + +// HasSubdirectory returns a boolean if a field has been set. +func (o *RepositoryBuildRequest) HasSubdirectory() bool { + if o != nil && !IsNil(o.Subdirectory) { + return true + } + + return false +} + +// SetSubdirectory gets a reference to the given string and assigns it to the Subdirectory field. +func (o *RepositoryBuildRequest) SetSubdirectory(v string) { + o.Subdirectory = &v +} + +// GetDockerfilePath returns the DockerfilePath field value if set, zero value otherwise. +func (o *RepositoryBuildRequest) GetDockerfilePath() string { + if o == nil || IsNil(o.DockerfilePath) { + var ret string + return ret + } + return *o.DockerfilePath +} + +// GetDockerfilePathOk returns a tuple with the DockerfilePath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryBuildRequest) GetDockerfilePathOk() (*string, bool) { + if o == nil || IsNil(o.DockerfilePath) { + return nil, false + } + return o.DockerfilePath, true +} + +// HasDockerfilePath returns a boolean if a field has been set. +func (o *RepositoryBuildRequest) HasDockerfilePath() bool { + if o != nil && !IsNil(o.DockerfilePath) { + return true + } + + return false +} + +// SetDockerfilePath gets a reference to the given string and assigns it to the DockerfilePath field. +func (o *RepositoryBuildRequest) SetDockerfilePath(v string) { + o.DockerfilePath = &v +} + +// GetContext returns the Context field value if set, zero value otherwise. +func (o *RepositoryBuildRequest) GetContext() string { + if o == nil || IsNil(o.Context) { + var ret string + return ret + } + return *o.Context +} + +// GetContextOk returns a tuple with the Context field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryBuildRequest) GetContextOk() (*string, bool) { + if o == nil || IsNil(o.Context) { + return nil, false + } + return o.Context, true +} + +// HasContext returns a boolean if a field has been set. +func (o *RepositoryBuildRequest) HasContext() bool { + if o != nil && !IsNil(o.Context) { + return true + } + + return false +} + +// SetContext gets a reference to the given string and assigns it to the Context field. +func (o *RepositoryBuildRequest) SetContext(v string) { + o.Context = &v +} + +// GetPullRobot returns the PullRobot field value if set, zero value otherwise. +func (o *RepositoryBuildRequest) GetPullRobot() string { + if o == nil || IsNil(o.PullRobot) { + var ret string + return ret + } + return *o.PullRobot +} + +// GetPullRobotOk returns a tuple with the PullRobot field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryBuildRequest) GetPullRobotOk() (*string, bool) { + if o == nil || IsNil(o.PullRobot) { + return nil, false + } + return o.PullRobot, true +} + +// HasPullRobot returns a boolean if a field has been set. +func (o *RepositoryBuildRequest) HasPullRobot() bool { + if o != nil && !IsNil(o.PullRobot) { + return true + } + + return false +} + +// SetPullRobot gets a reference to the given string and assigns it to the PullRobot field. +func (o *RepositoryBuildRequest) SetPullRobot(v string) { + o.PullRobot = &v +} + +// GetDockerTags returns the DockerTags field value if set, zero value otherwise. +func (o *RepositoryBuildRequest) GetDockerTags() []string { + if o == nil || IsNil(o.DockerTags) { + var ret []string + return ret + } + return o.DockerTags +} + +// GetDockerTagsOk returns a tuple with the DockerTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RepositoryBuildRequest) GetDockerTagsOk() ([]string, bool) { + if o == nil || IsNil(o.DockerTags) { + return nil, false + } + return o.DockerTags, true +} + +// HasDockerTags returns a boolean if a field has been set. +func (o *RepositoryBuildRequest) HasDockerTags() bool { + if o != nil && !IsNil(o.DockerTags) { + return true + } + + return false +} + +// SetDockerTags gets a reference to the given []string and assigns it to the DockerTags field. +func (o *RepositoryBuildRequest) SetDockerTags(v []string) { + o.DockerTags = v +} + +func (o RepositoryBuildRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RepositoryBuildRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.FileId) { + toSerialize["file_id"] = o.FileId + } + if !IsNil(o.ArchiveUrl) { + toSerialize["archive_url"] = o.ArchiveUrl + } + if !IsNil(o.Subdirectory) { + toSerialize["subdirectory"] = o.Subdirectory + } + if !IsNil(o.DockerfilePath) { + toSerialize["dockerfile_path"] = o.DockerfilePath + } + if !IsNil(o.Context) { + toSerialize["context"] = o.Context + } + if !IsNil(o.PullRobot) { + toSerialize["pull_robot"] = o.PullRobot + } + if !IsNil(o.DockerTags) { + toSerialize["docker_tags"] = o.DockerTags + } + return toSerialize, nil +} + +type NullableRepositoryBuildRequest struct { + value *RepositoryBuildRequest + isSet bool +} + +func (v NullableRepositoryBuildRequest) Get() *RepositoryBuildRequest { + return v.value +} + +func (v *NullableRepositoryBuildRequest) Set(val *RepositoryBuildRequest) { + v.value = val + v.isSet = true +} + +func (v NullableRepositoryBuildRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableRepositoryBuildRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRepositoryBuildRequest(val *RepositoryBuildRequest) *NullableRepositoryBuildRequest { + return &NullableRepositoryBuildRequest{value: val, isSet: true} +} + +func (v NullableRepositoryBuildRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRepositoryBuildRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_restore_tag.go b/quay_api/model_restore_tag.go new file mode 100644 index 0000000..3309cbd --- /dev/null +++ b/quay_api/model_restore_tag.go @@ -0,0 +1,126 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "encoding/json" +) + +// checks if the RestoreTag type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RestoreTag{} + +// RestoreTag Restores a tag to a specific image +type RestoreTag struct { + // If specified, the manifest digest that should be used + ManifestDigest *string `json:"manifest_digest,omitempty"` +} + +// NewRestoreTag instantiates a new RestoreTag 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 NewRestoreTag() *RestoreTag { + this := RestoreTag{} + return &this +} + +// NewRestoreTagWithDefaults instantiates a new RestoreTag 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 NewRestoreTagWithDefaults() *RestoreTag { + this := RestoreTag{} + return &this +} + +// GetManifestDigest returns the ManifestDigest field value if set, zero value otherwise. +func (o *RestoreTag) GetManifestDigest() string { + if o == nil || IsNil(o.ManifestDigest) { + var ret string + return ret + } + return *o.ManifestDigest +} + +// GetManifestDigestOk returns a tuple with the ManifestDigest field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RestoreTag) GetManifestDigestOk() (*string, bool) { + if o == nil || IsNil(o.ManifestDigest) { + return nil, false + } + return o.ManifestDigest, true +} + +// HasManifestDigest returns a boolean if a field has been set. +func (o *RestoreTag) HasManifestDigest() bool { + if o != nil && !IsNil(o.ManifestDigest) { + return true + } + + return false +} + +// SetManifestDigest gets a reference to the given string and assigns it to the ManifestDigest field. +func (o *RestoreTag) SetManifestDigest(v string) { + o.ManifestDigest = &v +} + +func (o RestoreTag) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RestoreTag) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ManifestDigest) { + toSerialize["manifest_digest"] = o.ManifestDigest + } + return toSerialize, nil +} + +type NullableRestoreTag struct { + value *RestoreTag + isSet bool +} + +func (v NullableRestoreTag) Get() *RestoreTag { + return v.value +} + +func (v *NullableRestoreTag) Set(val *RestoreTag) { + v.value = val + v.isSet = true +} + +func (v NullableRestoreTag) IsSet() bool { + return v.isSet +} + +func (v *NullableRestoreTag) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRestoreTag(val *RestoreTag) *NullableRestoreTag { + return &NullableRestoreTag{value: val, isSet: true} +} + +func (v NullableRestoreTag) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRestoreTag) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_run_parameters.go b/quay_api/model_run_parameters.go new file mode 100644 index 0000000..f3e09c4 --- /dev/null +++ b/quay_api/model_run_parameters.go @@ -0,0 +1,163 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "encoding/json" +) + +// checks if the RunParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunParameters{} + +// RunParameters Optional run parameters for activating the build trigger +type RunParameters struct { + // (SCM only) If specified, the name of the branch to build. + BranchName *string `json:"branch_name,omitempty"` + // (Custom Only) If specified, the ref/SHA1 used to checkout a git repository. + CommitSha *string `json:"commit_sha,omitempty"` +} + +// NewRunParameters instantiates a new RunParameters 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 NewRunParameters() *RunParameters { + this := RunParameters{} + return &this +} + +// NewRunParametersWithDefaults instantiates a new RunParameters 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 NewRunParametersWithDefaults() *RunParameters { + this := RunParameters{} + return &this +} + +// GetBranchName returns the BranchName field value if set, zero value otherwise. +func (o *RunParameters) GetBranchName() string { + if o == nil || IsNil(o.BranchName) { + var ret string + return ret + } + return *o.BranchName +} + +// GetBranchNameOk returns a tuple with the BranchName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunParameters) GetBranchNameOk() (*string, bool) { + if o == nil || IsNil(o.BranchName) { + return nil, false + } + return o.BranchName, true +} + +// HasBranchName returns a boolean if a field has been set. +func (o *RunParameters) HasBranchName() bool { + if o != nil && !IsNil(o.BranchName) { + return true + } + + return false +} + +// SetBranchName gets a reference to the given string and assigns it to the BranchName field. +func (o *RunParameters) SetBranchName(v string) { + o.BranchName = &v +} + +// GetCommitSha returns the CommitSha field value if set, zero value otherwise. +func (o *RunParameters) GetCommitSha() string { + if o == nil || IsNil(o.CommitSha) { + var ret string + return ret + } + return *o.CommitSha +} + +// GetCommitShaOk returns a tuple with the CommitSha field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunParameters) GetCommitShaOk() (*string, bool) { + if o == nil || IsNil(o.CommitSha) { + return nil, false + } + return o.CommitSha, true +} + +// HasCommitSha returns a boolean if a field has been set. +func (o *RunParameters) HasCommitSha() bool { + if o != nil && !IsNil(o.CommitSha) { + return true + } + + return false +} + +// SetCommitSha gets a reference to the given string and assigns it to the CommitSha field. +func (o *RunParameters) SetCommitSha(v string) { + o.CommitSha = &v +} + +func (o RunParameters) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BranchName) { + toSerialize["branch_name"] = o.BranchName + } + if !IsNil(o.CommitSha) { + toSerialize["commit_sha"] = o.CommitSha + } + return toSerialize, nil +} + +type NullableRunParameters struct { + value *RunParameters + isSet bool +} + +func (v NullableRunParameters) Get() *RunParameters { + return v.value +} + +func (v *NullableRunParameters) Set(val *RunParameters) { + v.value = val + v.isSet = true +} + +func (v NullableRunParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableRunParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunParameters(val *RunParameters) *NullableRunParameters { + return &NullableRunParameters{value: val, isSet: true} +} + +func (v NullableRunParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_team_description.go b/quay_api/model_team_description.go new file mode 100644 index 0000000..35a3000 --- /dev/null +++ b/quay_api/model_team_description.go @@ -0,0 +1,195 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TeamDescription type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TeamDescription{} + +// TeamDescription Description of a team +type TeamDescription struct { + // Org wide permissions that should apply to the team + Role string `json:"role"` + // Markdown description for the team + Description *string `json:"description,omitempty"` +} + +type _TeamDescription TeamDescription + +// NewTeamDescription instantiates a new TeamDescription 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 NewTeamDescription(role string) *TeamDescription { + this := TeamDescription{} + this.Role = role + return &this +} + +// NewTeamDescriptionWithDefaults instantiates a new TeamDescription 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 NewTeamDescriptionWithDefaults() *TeamDescription { + this := TeamDescription{} + return &this +} + +// GetRole returns the Role field value +func (o *TeamDescription) GetRole() string { + if o == nil { + var ret string + return ret + } + + return o.Role +} + +// GetRoleOk returns a tuple with the Role field value +// and a boolean to check if the value has been set. +func (o *TeamDescription) GetRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Role, true +} + +// SetRole sets field value +func (o *TeamDescription) SetRole(v string) { + o.Role = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *TeamDescription) 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 *TeamDescription) 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 *TeamDescription) 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 *TeamDescription) SetDescription(v string) { + o.Description = &v +} + +func (o TeamDescription) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TeamDescription) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["role"] = o.Role + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + return toSerialize, nil +} + +func (o *TeamDescription) 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{ + "role", + } + + 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) + } + } + + varTeamDescription := _TeamDescription{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTeamDescription) + + if err != nil { + return err + } + + *o = TeamDescription(varTeamDescription) + + return err +} + +type NullableTeamDescription struct { + value *TeamDescription + isSet bool +} + +func (v NullableTeamDescription) Get() *TeamDescription { + return v.value +} + +func (v *NullableTeamDescription) Set(val *TeamDescription) { + v.value = val + v.isSet = true +} + +func (v NullableTeamDescription) IsSet() bool { + return v.isSet +} + +func (v *NullableTeamDescription) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTeamDescription(val *TeamDescription) *NullableTeamDescription { + return &NullableTeamDescription{value: val, isSet: true} +} + +func (v NullableTeamDescription) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTeamDescription) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_team_permission.go b/quay_api/model_team_permission.go new file mode 100644 index 0000000..719f828 --- /dev/null +++ b/quay_api/model_team_permission.go @@ -0,0 +1,158 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TeamPermission type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TeamPermission{} + +// TeamPermission Description of a team permission. +type TeamPermission struct { + // Role to use for the team + Role string `json:"role"` +} + +type _TeamPermission TeamPermission + +// NewTeamPermission instantiates a new TeamPermission 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 NewTeamPermission(role string) *TeamPermission { + this := TeamPermission{} + this.Role = role + return &this +} + +// NewTeamPermissionWithDefaults instantiates a new TeamPermission 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 NewTeamPermissionWithDefaults() *TeamPermission { + this := TeamPermission{} + return &this +} + +// GetRole returns the Role field value +func (o *TeamPermission) GetRole() string { + if o == nil { + var ret string + return ret + } + + return o.Role +} + +// GetRoleOk returns a tuple with the Role field value +// and a boolean to check if the value has been set. +func (o *TeamPermission) GetRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Role, true +} + +// SetRole sets field value +func (o *TeamPermission) SetRole(v string) { + o.Role = v +} + +func (o TeamPermission) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TeamPermission) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["role"] = o.Role + return toSerialize, nil +} + +func (o *TeamPermission) 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{ + "role", + } + + 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) + } + } + + varTeamPermission := _TeamPermission{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTeamPermission) + + if err != nil { + return err + } + + *o = TeamPermission(varTeamPermission) + + return err +} + +type NullableTeamPermission struct { + value *TeamPermission + isSet bool +} + +func (v NullableTeamPermission) Get() *TeamPermission { + return v.value +} + +func (v *NullableTeamPermission) Set(val *TeamPermission) { + v.value = val + v.isSet = true +} + +func (v NullableTeamPermission) IsSet() bool { + return v.isSet +} + +func (v *NullableTeamPermission) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTeamPermission(val *TeamPermission) *NullableTeamPermission { + return &NullableTeamPermission{value: val, isSet: true} +} + +func (v NullableTeamPermission) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTeamPermission) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_token_permission.go b/quay_api/model_token_permission.go new file mode 100644 index 0000000..4a1545f --- /dev/null +++ b/quay_api/model_token_permission.go @@ -0,0 +1,158 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the TokenPermission type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TokenPermission{} + +// TokenPermission Description of a token permission +type TokenPermission struct { + // Role to use for the token + Role string `json:"role"` +} + +type _TokenPermission TokenPermission + +// NewTokenPermission instantiates a new TokenPermission 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 NewTokenPermission(role string) *TokenPermission { + this := TokenPermission{} + this.Role = role + return &this +} + +// NewTokenPermissionWithDefaults instantiates a new TokenPermission 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 NewTokenPermissionWithDefaults() *TokenPermission { + this := TokenPermission{} + return &this +} + +// GetRole returns the Role field value +func (o *TokenPermission) GetRole() string { + if o == nil { + var ret string + return ret + } + + return o.Role +} + +// GetRoleOk returns a tuple with the Role field value +// and a boolean to check if the value has been set. +func (o *TokenPermission) GetRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Role, true +} + +// SetRole sets field value +func (o *TokenPermission) SetRole(v string) { + o.Role = v +} + +func (o TokenPermission) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TokenPermission) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["role"] = o.Role + return toSerialize, nil +} + +func (o *TokenPermission) 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{ + "role", + } + + 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) + } + } + + varTokenPermission := _TokenPermission{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTokenPermission) + + if err != nil { + return err + } + + *o = TokenPermission(varTokenPermission) + + return err +} + +type NullableTokenPermission struct { + value *TokenPermission + isSet bool +} + +func (v NullableTokenPermission) Get() *TokenPermission { + return v.value +} + +func (v *NullableTokenPermission) Set(val *TokenPermission) { + v.value = val + v.isSet = true +} + +func (v NullableTokenPermission) IsSet() bool { + return v.isSet +} + +func (v *NullableTokenPermission) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTokenPermission(val *TokenPermission) *NullableTokenPermission { + return &NullableTokenPermission{value: val, isSet: true} +} + +func (v NullableTokenPermission) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTokenPermission) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_update_app.go b/quay_api/model_update_app.go new file mode 100644 index 0000000..26f75a8 --- /dev/null +++ b/quay_api/model_update_app.go @@ -0,0 +1,290 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the UpdateApp type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateApp{} + +// UpdateApp Description of an updated application. +type UpdateApp struct { + // The name of the application + Name string `json:"name"` + // The URI for the application's OAuth redirect + RedirectUri string `json:"redirect_uri"` + // The URI for the application's homepage + ApplicationUri string `json:"application_uri"` + // The human-readable description for the application + Description *string `json:"description,omitempty"` + // The e-mail address of the avatar to use for the application + AvatarEmail *string `json:"avatar_email,omitempty"` +} + +type _UpdateApp UpdateApp + +// NewUpdateApp instantiates a new UpdateApp 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 NewUpdateApp(name string, redirectUri string, applicationUri string) *UpdateApp { + this := UpdateApp{} + this.Name = name + this.RedirectUri = redirectUri + this.ApplicationUri = applicationUri + return &this +} + +// NewUpdateAppWithDefaults instantiates a new UpdateApp 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 NewUpdateAppWithDefaults() *UpdateApp { + this := UpdateApp{} + return &this +} + +// GetName returns the Name field value +func (o *UpdateApp) 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 *UpdateApp) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UpdateApp) SetName(v string) { + o.Name = v +} + +// GetRedirectUri returns the RedirectUri field value +func (o *UpdateApp) GetRedirectUri() string { + if o == nil { + var ret string + return ret + } + + return o.RedirectUri +} + +// GetRedirectUriOk returns a tuple with the RedirectUri field value +// and a boolean to check if the value has been set. +func (o *UpdateApp) GetRedirectUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RedirectUri, true +} + +// SetRedirectUri sets field value +func (o *UpdateApp) SetRedirectUri(v string) { + o.RedirectUri = v +} + +// GetApplicationUri returns the ApplicationUri field value +func (o *UpdateApp) GetApplicationUri() string { + if o == nil { + var ret string + return ret + } + + return o.ApplicationUri +} + +// GetApplicationUriOk returns a tuple with the ApplicationUri field value +// and a boolean to check if the value has been set. +func (o *UpdateApp) GetApplicationUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApplicationUri, true +} + +// SetApplicationUri sets field value +func (o *UpdateApp) SetApplicationUri(v string) { + o.ApplicationUri = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *UpdateApp) 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 *UpdateApp) 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 *UpdateApp) 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 *UpdateApp) SetDescription(v string) { + o.Description = &v +} + +// GetAvatarEmail returns the AvatarEmail field value if set, zero value otherwise. +func (o *UpdateApp) GetAvatarEmail() string { + if o == nil || IsNil(o.AvatarEmail) { + var ret string + return ret + } + return *o.AvatarEmail +} + +// GetAvatarEmailOk returns a tuple with the AvatarEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateApp) GetAvatarEmailOk() (*string, bool) { + if o == nil || IsNil(o.AvatarEmail) { + return nil, false + } + return o.AvatarEmail, true +} + +// HasAvatarEmail returns a boolean if a field has been set. +func (o *UpdateApp) HasAvatarEmail() bool { + if o != nil && !IsNil(o.AvatarEmail) { + return true + } + + return false +} + +// SetAvatarEmail gets a reference to the given string and assigns it to the AvatarEmail field. +func (o *UpdateApp) SetAvatarEmail(v string) { + o.AvatarEmail = &v +} + +func (o UpdateApp) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateApp) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["redirect_uri"] = o.RedirectUri + toSerialize["application_uri"] = o.ApplicationUri + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.AvatarEmail) { + toSerialize["avatar_email"] = o.AvatarEmail + } + return toSerialize, nil +} + +func (o *UpdateApp) 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", + "redirect_uri", + "application_uri", + } + + 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) + } + } + + varUpdateApp := _UpdateApp{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUpdateApp) + + if err != nil { + return err + } + + *o = UpdateApp(varUpdateApp) + + return err +} + +type NullableUpdateApp struct { + value *UpdateApp + isSet bool +} + +func (v NullableUpdateApp) Get() *UpdateApp { + return v.value +} + +func (v *NullableUpdateApp) Set(val *UpdateApp) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateApp) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateApp) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateApp(val *UpdateApp) *NullableUpdateApp { + return &NullableUpdateApp{value: val, isSet: true} +} + +func (v NullableUpdateApp) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateApp) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_update_namespace_quota.go b/quay_api/model_update_namespace_quota.go new file mode 100644 index 0000000..210518e --- /dev/null +++ b/quay_api/model_update_namespace_quota.go @@ -0,0 +1,126 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "encoding/json" +) + +// checks if the UpdateNamespaceQuota type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateNamespaceQuota{} + +// UpdateNamespaceQuota Description of a new organization quota +type UpdateNamespaceQuota struct { + // Number of bytes the organization is allowed + LimitBytes *int32 `json:"limit_bytes,omitempty"` +} + +// NewUpdateNamespaceQuota instantiates a new UpdateNamespaceQuota 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 NewUpdateNamespaceQuota() *UpdateNamespaceQuota { + this := UpdateNamespaceQuota{} + return &this +} + +// NewUpdateNamespaceQuotaWithDefaults instantiates a new UpdateNamespaceQuota 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 NewUpdateNamespaceQuotaWithDefaults() *UpdateNamespaceQuota { + this := UpdateNamespaceQuota{} + return &this +} + +// GetLimitBytes returns the LimitBytes field value if set, zero value otherwise. +func (o *UpdateNamespaceQuota) GetLimitBytes() int32 { + if o == nil || IsNil(o.LimitBytes) { + var ret int32 + return ret + } + return *o.LimitBytes +} + +// GetLimitBytesOk returns a tuple with the LimitBytes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateNamespaceQuota) GetLimitBytesOk() (*int32, bool) { + if o == nil || IsNil(o.LimitBytes) { + return nil, false + } + return o.LimitBytes, true +} + +// HasLimitBytes returns a boolean if a field has been set. +func (o *UpdateNamespaceQuota) HasLimitBytes() bool { + if o != nil && !IsNil(o.LimitBytes) { + return true + } + + return false +} + +// SetLimitBytes gets a reference to the given int32 and assigns it to the LimitBytes field. +func (o *UpdateNamespaceQuota) SetLimitBytes(v int32) { + o.LimitBytes = &v +} + +func (o UpdateNamespaceQuota) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateNamespaceQuota) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.LimitBytes) { + toSerialize["limit_bytes"] = o.LimitBytes + } + return toSerialize, nil +} + +type NullableUpdateNamespaceQuota struct { + value *UpdateNamespaceQuota + isSet bool +} + +func (v NullableUpdateNamespaceQuota) Get() *UpdateNamespaceQuota { + return v.value +} + +func (v *NullableUpdateNamespaceQuota) Set(val *UpdateNamespaceQuota) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateNamespaceQuota) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateNamespaceQuota) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateNamespaceQuota(val *UpdateNamespaceQuota) *NullableUpdateNamespaceQuota { + return &NullableUpdateNamespaceQuota{value: val, isSet: true} +} + +func (v NullableUpdateNamespaceQuota) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateNamespaceQuota) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_update_org.go b/quay_api/model_update_org.go new file mode 100644 index 0000000..2a80f26 --- /dev/null +++ b/quay_api/model_update_org.go @@ -0,0 +1,163 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "encoding/json" +) + +// checks if the UpdateOrg type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateOrg{} + +// UpdateOrg Description of updates for an organization +type UpdateOrg struct { + // The new name for the organization + Name *string `json:"name,omitempty"` + // Organization contact email + Email *string `json:"email,omitempty"` +} + +// NewUpdateOrg instantiates a new UpdateOrg 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 NewUpdateOrg() *UpdateOrg { + this := UpdateOrg{} + return &this +} + +// NewUpdateOrgWithDefaults instantiates a new UpdateOrg 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 NewUpdateOrgWithDefaults() *UpdateOrg { + this := UpdateOrg{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateOrg) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateOrg) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateOrg) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateOrg) SetName(v string) { + o.Name = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *UpdateOrg) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateOrg) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *UpdateOrg) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *UpdateOrg) SetEmail(v string) { + o.Email = &v +} + +func (o UpdateOrg) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateOrg) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + return toSerialize, nil +} + +type NullableUpdateOrg struct { + value *UpdateOrg + isSet bool +} + +func (v NullableUpdateOrg) Get() *UpdateOrg { + return v.value +} + +func (v *NullableUpdateOrg) Set(val *UpdateOrg) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateOrg) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateOrg) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateOrg(val *UpdateOrg) *NullableUpdateOrg { + return &NullableUpdateOrg{value: val, isSet: true} +} + +func (v NullableUpdateOrg) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateOrg) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_update_org_quota.go b/quay_api/model_update_org_quota.go new file mode 100644 index 0000000..c681c30 --- /dev/null +++ b/quay_api/model_update_org_quota.go @@ -0,0 +1,126 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "encoding/json" +) + +// checks if the UpdateOrgQuota type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateOrgQuota{} + +// UpdateOrgQuota Description of a new organization quota +type UpdateOrgQuota struct { + // Number of bytes the organization is allowed + LimitBytes *int32 `json:"limit_bytes,omitempty"` +} + +// NewUpdateOrgQuota instantiates a new UpdateOrgQuota 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 NewUpdateOrgQuota() *UpdateOrgQuota { + this := UpdateOrgQuota{} + return &this +} + +// NewUpdateOrgQuotaWithDefaults instantiates a new UpdateOrgQuota 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 NewUpdateOrgQuotaWithDefaults() *UpdateOrgQuota { + this := UpdateOrgQuota{} + return &this +} + +// GetLimitBytes returns the LimitBytes field value if set, zero value otherwise. +func (o *UpdateOrgQuota) GetLimitBytes() int32 { + if o == nil || IsNil(o.LimitBytes) { + var ret int32 + return ret + } + return *o.LimitBytes +} + +// GetLimitBytesOk returns a tuple with the LimitBytes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateOrgQuota) GetLimitBytesOk() (*int32, bool) { + if o == nil || IsNil(o.LimitBytes) { + return nil, false + } + return o.LimitBytes, true +} + +// HasLimitBytes returns a boolean if a field has been set. +func (o *UpdateOrgQuota) HasLimitBytes() bool { + if o != nil && !IsNil(o.LimitBytes) { + return true + } + + return false +} + +// SetLimitBytes gets a reference to the given int32 and assigns it to the LimitBytes field. +func (o *UpdateOrgQuota) SetLimitBytes(v int32) { + o.LimitBytes = &v +} + +func (o UpdateOrgQuota) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateOrgQuota) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.LimitBytes) { + toSerialize["limit_bytes"] = o.LimitBytes + } + return toSerialize, nil +} + +type NullableUpdateOrgQuota struct { + value *UpdateOrgQuota + isSet bool +} + +func (v NullableUpdateOrgQuota) Get() *UpdateOrgQuota { + return v.value +} + +func (v *NullableUpdateOrgQuota) Set(val *UpdateOrgQuota) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateOrgQuota) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateOrgQuota) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateOrgQuota(val *UpdateOrgQuota) *NullableUpdateOrgQuota { + return &NullableUpdateOrgQuota{value: val, isSet: true} +} + +func (v NullableUpdateOrgQuota) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateOrgQuota) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_update_org_quota_limit.go b/quay_api/model_update_org_quota_limit.go new file mode 100644 index 0000000..4c984ad --- /dev/null +++ b/quay_api/model_update_org_quota_limit.go @@ -0,0 +1,163 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "encoding/json" +) + +// checks if the UpdateOrgQuotaLimit type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateOrgQuotaLimit{} + +// UpdateOrgQuotaLimit Description of changing organization quota limit +type UpdateOrgQuotaLimit struct { + // Type of quota limit: \"Warning\" or \"Reject\" + Type *string `json:"type,omitempty"` + // Quota threshold, in percent of quota + ThresholdPercent *int32 `json:"threshold_percent,omitempty"` +} + +// NewUpdateOrgQuotaLimit instantiates a new UpdateOrgQuotaLimit 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 NewUpdateOrgQuotaLimit() *UpdateOrgQuotaLimit { + this := UpdateOrgQuotaLimit{} + return &this +} + +// NewUpdateOrgQuotaLimitWithDefaults instantiates a new UpdateOrgQuotaLimit 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 NewUpdateOrgQuotaLimitWithDefaults() *UpdateOrgQuotaLimit { + this := UpdateOrgQuotaLimit{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *UpdateOrgQuotaLimit) 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 *UpdateOrgQuotaLimit) 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 *UpdateOrgQuotaLimit) 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 *UpdateOrgQuotaLimit) SetType(v string) { + o.Type = &v +} + +// GetThresholdPercent returns the ThresholdPercent field value if set, zero value otherwise. +func (o *UpdateOrgQuotaLimit) GetThresholdPercent() int32 { + if o == nil || IsNil(o.ThresholdPercent) { + var ret int32 + return ret + } + return *o.ThresholdPercent +} + +// GetThresholdPercentOk returns a tuple with the ThresholdPercent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateOrgQuotaLimit) GetThresholdPercentOk() (*int32, bool) { + if o == nil || IsNil(o.ThresholdPercent) { + return nil, false + } + return o.ThresholdPercent, true +} + +// HasThresholdPercent returns a boolean if a field has been set. +func (o *UpdateOrgQuotaLimit) HasThresholdPercent() bool { + if o != nil && !IsNil(o.ThresholdPercent) { + return true + } + + return false +} + +// SetThresholdPercent gets a reference to the given int32 and assigns it to the ThresholdPercent field. +func (o *UpdateOrgQuotaLimit) SetThresholdPercent(v int32) { + o.ThresholdPercent = &v +} + +func (o UpdateOrgQuotaLimit) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateOrgQuotaLimit) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.ThresholdPercent) { + toSerialize["threshold_percent"] = o.ThresholdPercent + } + return toSerialize, nil +} + +type NullableUpdateOrgQuotaLimit struct { + value *UpdateOrgQuotaLimit + isSet bool +} + +func (v NullableUpdateOrgQuotaLimit) Get() *UpdateOrgQuotaLimit { + return v.value +} + +func (v *NullableUpdateOrgQuotaLimit) Set(val *UpdateOrgQuotaLimit) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateOrgQuotaLimit) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateOrgQuotaLimit) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateOrgQuotaLimit(val *UpdateOrgQuotaLimit) *NullableUpdateOrgQuotaLimit { + return &NullableUpdateOrgQuotaLimit{value: val, isSet: true} +} + +func (v NullableUpdateOrgQuotaLimit) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateOrgQuotaLimit) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_update_trigger.go b/quay_api/model_update_trigger.go new file mode 100644 index 0000000..93e1972 --- /dev/null +++ b/quay_api/model_update_trigger.go @@ -0,0 +1,158 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the UpdateTrigger type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateTrigger{} + +// UpdateTrigger Options for updating a build trigger +type UpdateTrigger struct { + // Whether the build trigger is enabled + Enabled bool `json:"enabled"` +} + +type _UpdateTrigger UpdateTrigger + +// NewUpdateTrigger instantiates a new UpdateTrigger 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 NewUpdateTrigger(enabled bool) *UpdateTrigger { + this := UpdateTrigger{} + this.Enabled = enabled + return &this +} + +// NewUpdateTriggerWithDefaults instantiates a new UpdateTrigger 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 NewUpdateTriggerWithDefaults() *UpdateTrigger { + this := UpdateTrigger{} + return &this +} + +// GetEnabled returns the Enabled field value +func (o *UpdateTrigger) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *UpdateTrigger) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *UpdateTrigger) SetEnabled(v bool) { + o.Enabled = v +} + +func (o UpdateTrigger) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateTrigger) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["enabled"] = o.Enabled + return toSerialize, nil +} + +func (o *UpdateTrigger) 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{ + "enabled", + } + + 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) + } + } + + varUpdateTrigger := _UpdateTrigger{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUpdateTrigger) + + if err != nil { + return err + } + + *o = UpdateTrigger(varUpdateTrigger) + + return err +} + +type NullableUpdateTrigger struct { + value *UpdateTrigger + isSet bool +} + +func (v NullableUpdateTrigger) Get() *UpdateTrigger { + return v.value +} + +func (v *NullableUpdateTrigger) Set(val *UpdateTrigger) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateTrigger) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateTrigger) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateTrigger(val *UpdateTrigger) *NullableUpdateTrigger { + return &NullableUpdateTrigger{value: val, isSet: true} +} + +func (v NullableUpdateTrigger) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateTrigger) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_update_user.go b/quay_api/model_update_user.go new file mode 100644 index 0000000..8f8f15f --- /dev/null +++ b/quay_api/model_update_user.go @@ -0,0 +1,274 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "encoding/json" +) + +// checks if the UpdateUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateUser{} + +// UpdateUser Fields which can be updated in a user. +type UpdateUser struct { + // The user's password + Password *string `json:"password,omitempty"` + // Whether the user desires to receive an invoice email. + InvoiceEmail *bool `json:"invoice_email,omitempty"` + // The user's email address + Email *string `json:"email,omitempty"` + // The number of seconds for tag expiration + TagExpirationS *int32 `json:"tag_expiration_s,omitempty"` + // The user's username + Username *string `json:"username,omitempty"` +} + +// NewUpdateUser instantiates a new UpdateUser 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 NewUpdateUser() *UpdateUser { + this := UpdateUser{} + return &this +} + +// NewUpdateUserWithDefaults instantiates a new UpdateUser 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 NewUpdateUserWithDefaults() *UpdateUser { + this := UpdateUser{} + return &this +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *UpdateUser) GetPassword() string { + if o == nil || IsNil(o.Password) { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateUser) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *UpdateUser) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *UpdateUser) SetPassword(v string) { + o.Password = &v +} + +// GetInvoiceEmail returns the InvoiceEmail field value if set, zero value otherwise. +func (o *UpdateUser) GetInvoiceEmail() bool { + if o == nil || IsNil(o.InvoiceEmail) { + var ret bool + return ret + } + return *o.InvoiceEmail +} + +// GetInvoiceEmailOk returns a tuple with the InvoiceEmail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateUser) GetInvoiceEmailOk() (*bool, bool) { + if o == nil || IsNil(o.InvoiceEmail) { + return nil, false + } + return o.InvoiceEmail, true +} + +// HasInvoiceEmail returns a boolean if a field has been set. +func (o *UpdateUser) HasInvoiceEmail() bool { + if o != nil && !IsNil(o.InvoiceEmail) { + return true + } + + return false +} + +// SetInvoiceEmail gets a reference to the given bool and assigns it to the InvoiceEmail field. +func (o *UpdateUser) SetInvoiceEmail(v bool) { + o.InvoiceEmail = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *UpdateUser) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateUser) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *UpdateUser) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *UpdateUser) SetEmail(v string) { + o.Email = &v +} + +// GetTagExpirationS returns the TagExpirationS field value if set, zero value otherwise. +func (o *UpdateUser) GetTagExpirationS() int32 { + if o == nil || IsNil(o.TagExpirationS) { + var ret int32 + return ret + } + return *o.TagExpirationS +} + +// GetTagExpirationSOk returns a tuple with the TagExpirationS field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateUser) GetTagExpirationSOk() (*int32, bool) { + if o == nil || IsNil(o.TagExpirationS) { + return nil, false + } + return o.TagExpirationS, true +} + +// HasTagExpirationS returns a boolean if a field has been set. +func (o *UpdateUser) HasTagExpirationS() bool { + if o != nil && !IsNil(o.TagExpirationS) { + return true + } + + return false +} + +// SetTagExpirationS gets a reference to the given int32 and assigns it to the TagExpirationS field. +func (o *UpdateUser) SetTagExpirationS(v int32) { + o.TagExpirationS = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *UpdateUser) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateUser) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *UpdateUser) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *UpdateUser) SetUsername(v string) { + o.Username = &v +} + +func (o UpdateUser) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + if !IsNil(o.InvoiceEmail) { + toSerialize["invoice_email"] = o.InvoiceEmail + } + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.TagExpirationS) { + toSerialize["tag_expiration_s"] = o.TagExpirationS + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableUpdateUser struct { + value *UpdateUser + isSet bool +} + +func (v NullableUpdateUser) Get() *UpdateUser { + return v.value +} + +func (v *NullableUpdateUser) Set(val *UpdateUser) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateUser) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateUser(val *UpdateUser) *NullableUpdateUser { + return &NullableUpdateUser{value: val, isSet: true} +} + +func (v NullableUpdateUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_user_permission.go b/quay_api/model_user_permission.go new file mode 100644 index 0000000..5b562d3 --- /dev/null +++ b/quay_api/model_user_permission.go @@ -0,0 +1,158 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the UserPermission type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserPermission{} + +// UserPermission Description of a user permission. +type UserPermission struct { + // Role to use for the user + Role string `json:"role"` +} + +type _UserPermission UserPermission + +// NewUserPermission instantiates a new UserPermission 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 NewUserPermission(role string) *UserPermission { + this := UserPermission{} + this.Role = role + return &this +} + +// NewUserPermissionWithDefaults instantiates a new UserPermission 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 NewUserPermissionWithDefaults() *UserPermission { + this := UserPermission{} + return &this +} + +// GetRole returns the Role field value +func (o *UserPermission) GetRole() string { + if o == nil { + var ret string + return ret + } + + return o.Role +} + +// GetRoleOk returns a tuple with the Role field value +// and a boolean to check if the value has been set. +func (o *UserPermission) GetRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Role, true +} + +// SetRole sets field value +func (o *UserPermission) SetRole(v string) { + o.Role = v +} + +func (o UserPermission) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserPermission) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["role"] = o.Role + return toSerialize, nil +} + +func (o *UserPermission) 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{ + "role", + } + + 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) + } + } + + varUserPermission := _UserPermission{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserPermission) + + if err != nil { + return err + } + + *o = UserPermission(varUserPermission) + + return err +} + +type NullableUserPermission struct { + value *UserPermission + isSet bool +} + +func (v NullableUserPermission) Get() *UserPermission { + return v.value +} + +func (v *NullableUserPermission) Set(val *UserPermission) { + v.value = val + v.isSet = true +} + +func (v NullableUserPermission) IsSet() bool { + return v.isSet +} + +func (v *NullableUserPermission) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserPermission(val *UserPermission) *NullableUserPermission { + return &NullableUserPermission{value: val, isSet: true} +} + +func (v NullableUserPermission) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserPermission) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/model_user_view.go b/quay_api/model_user_view.go new file mode 100644 index 0000000..fc3ce52 --- /dev/null +++ b/quay_api/model_user_view.go @@ -0,0 +1,409 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the UserView type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserView{} + +// UserView Describes a user +type UserView struct { + // Whether the user's email address has been verified + Verified *bool `json:"verified,omitempty"` + // true if this user data represents a guest user + Anonymous bool `json:"anonymous"` + // The user's email address + Email *string `json:"email,omitempty"` + // Avatar data representing the user's icon + Avatar map[string]interface{} `json:"avatar"` + // Information about the organizations in which the user is a member + Organizations []map[string]interface{} `json:"organizations,omitempty"` + // The list of external login providers against which the user has authenticated + Logins []map[string]interface{} `json:"logins,omitempty"` + // Whether the user has permission to create repositories + CanCreateRepo *bool `json:"can_create_repo,omitempty"` + // If true, the user's namespace is the preferred namespace to display + PreferredNamespace *bool `json:"preferred_namespace,omitempty"` +} + +type _UserView UserView + +// NewUserView instantiates a new UserView 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 NewUserView(anonymous bool, avatar map[string]interface{}) *UserView { + this := UserView{} + this.Anonymous = anonymous + this.Avatar = avatar + return &this +} + +// NewUserViewWithDefaults instantiates a new UserView 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 NewUserViewWithDefaults() *UserView { + this := UserView{} + return &this +} + +// GetVerified returns the Verified field value if set, zero value otherwise. +func (o *UserView) GetVerified() bool { + if o == nil || IsNil(o.Verified) { + var ret bool + return ret + } + return *o.Verified +} + +// GetVerifiedOk returns a tuple with the Verified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserView) GetVerifiedOk() (*bool, bool) { + if o == nil || IsNil(o.Verified) { + return nil, false + } + return o.Verified, true +} + +// HasVerified returns a boolean if a field has been set. +func (o *UserView) HasVerified() bool { + if o != nil && !IsNil(o.Verified) { + return true + } + + return false +} + +// SetVerified gets a reference to the given bool and assigns it to the Verified field. +func (o *UserView) SetVerified(v bool) { + o.Verified = &v +} + +// GetAnonymous returns the Anonymous field value +func (o *UserView) GetAnonymous() bool { + if o == nil { + var ret bool + return ret + } + + return o.Anonymous +} + +// GetAnonymousOk returns a tuple with the Anonymous field value +// and a boolean to check if the value has been set. +func (o *UserView) GetAnonymousOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Anonymous, true +} + +// SetAnonymous sets field value +func (o *UserView) SetAnonymous(v bool) { + o.Anonymous = v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *UserView) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserView) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *UserView) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *UserView) SetEmail(v string) { + o.Email = &v +} + +// GetAvatar returns the Avatar field value +func (o *UserView) GetAvatar() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Avatar +} + +// GetAvatarOk returns a tuple with the Avatar field value +// and a boolean to check if the value has been set. +func (o *UserView) GetAvatarOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Avatar, true +} + +// SetAvatar sets field value +func (o *UserView) SetAvatar(v map[string]interface{}) { + o.Avatar = v +} + +// GetOrganizations returns the Organizations field value if set, zero value otherwise. +func (o *UserView) GetOrganizations() []map[string]interface{} { + if o == nil || IsNil(o.Organizations) { + var ret []map[string]interface{} + return ret + } + return o.Organizations +} + +// GetOrganizationsOk returns a tuple with the Organizations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserView) GetOrganizationsOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Organizations) { + return nil, false + } + return o.Organizations, true +} + +// HasOrganizations returns a boolean if a field has been set. +func (o *UserView) HasOrganizations() bool { + if o != nil && !IsNil(o.Organizations) { + return true + } + + return false +} + +// SetOrganizations gets a reference to the given []map[string]interface{} and assigns it to the Organizations field. +func (o *UserView) SetOrganizations(v []map[string]interface{}) { + o.Organizations = v +} + +// GetLogins returns the Logins field value if set, zero value otherwise. +func (o *UserView) GetLogins() []map[string]interface{} { + if o == nil || IsNil(o.Logins) { + var ret []map[string]interface{} + return ret + } + return o.Logins +} + +// GetLoginsOk returns a tuple with the Logins field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserView) GetLoginsOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Logins) { + return nil, false + } + return o.Logins, true +} + +// HasLogins returns a boolean if a field has been set. +func (o *UserView) HasLogins() bool { + if o != nil && !IsNil(o.Logins) { + return true + } + + return false +} + +// SetLogins gets a reference to the given []map[string]interface{} and assigns it to the Logins field. +func (o *UserView) SetLogins(v []map[string]interface{}) { + o.Logins = v +} + +// GetCanCreateRepo returns the CanCreateRepo field value if set, zero value otherwise. +func (o *UserView) GetCanCreateRepo() bool { + if o == nil || IsNil(o.CanCreateRepo) { + var ret bool + return ret + } + return *o.CanCreateRepo +} + +// GetCanCreateRepoOk returns a tuple with the CanCreateRepo field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserView) GetCanCreateRepoOk() (*bool, bool) { + if o == nil || IsNil(o.CanCreateRepo) { + return nil, false + } + return o.CanCreateRepo, true +} + +// HasCanCreateRepo returns a boolean if a field has been set. +func (o *UserView) HasCanCreateRepo() bool { + if o != nil && !IsNil(o.CanCreateRepo) { + return true + } + + return false +} + +// SetCanCreateRepo gets a reference to the given bool and assigns it to the CanCreateRepo field. +func (o *UserView) SetCanCreateRepo(v bool) { + o.CanCreateRepo = &v +} + +// GetPreferredNamespace returns the PreferredNamespace field value if set, zero value otherwise. +func (o *UserView) GetPreferredNamespace() bool { + if o == nil || IsNil(o.PreferredNamespace) { + var ret bool + return ret + } + return *o.PreferredNamespace +} + +// GetPreferredNamespaceOk returns a tuple with the PreferredNamespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserView) GetPreferredNamespaceOk() (*bool, bool) { + if o == nil || IsNil(o.PreferredNamespace) { + return nil, false + } + return o.PreferredNamespace, true +} + +// HasPreferredNamespace returns a boolean if a field has been set. +func (o *UserView) HasPreferredNamespace() bool { + if o != nil && !IsNil(o.PreferredNamespace) { + return true + } + + return false +} + +// SetPreferredNamespace gets a reference to the given bool and assigns it to the PreferredNamespace field. +func (o *UserView) SetPreferredNamespace(v bool) { + o.PreferredNamespace = &v +} + +func (o UserView) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserView) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Verified) { + toSerialize["verified"] = o.Verified + } + toSerialize["anonymous"] = o.Anonymous + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + toSerialize["avatar"] = o.Avatar + if !IsNil(o.Organizations) { + toSerialize["organizations"] = o.Organizations + } + if !IsNil(o.Logins) { + toSerialize["logins"] = o.Logins + } + if !IsNil(o.CanCreateRepo) { + toSerialize["can_create_repo"] = o.CanCreateRepo + } + if !IsNil(o.PreferredNamespace) { + toSerialize["preferred_namespace"] = o.PreferredNamespace + } + return toSerialize, nil +} + +func (o *UserView) 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{ + "anonymous", + "avatar", + } + + 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) + } + } + + varUserView := _UserView{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserView) + + if err != nil { + return err + } + + *o = UserView(varUserView) + + return err +} + +type NullableUserView struct { + value *UserView + isSet bool +} + +func (v NullableUserView) Get() *UserView { + return v.value +} + +func (v *NullableUserView) Set(val *UserView) { + v.value = val + v.isSet = true +} + +func (v NullableUserView) IsSet() bool { + return v.isSet +} + +func (v *NullableUserView) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserView(val *UserView) *NullableUserView { + return &NullableUserView{value: val, isSet: true} +} + +func (v NullableUserView) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserView) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/quay_api/response.go b/quay_api/response.go new file mode 100644 index 0000000..608ec89 --- /dev/null +++ b/quay_api/response.go @@ -0,0 +1,48 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +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/quay_api/test/api_appspecifictokens_test.go b/quay_api/test/api_appspecifictokens_test.go new file mode 100644 index 0000000..977cd29 --- /dev/null +++ b/quay_api/test/api_appspecifictokens_test.go @@ -0,0 +1,73 @@ +/* +Quay Frontend + +Testing AppspecifictokensAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package quay_api + +import ( + "context" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_quay_api_AppspecifictokensAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AppspecifictokensAPIService CreateAppToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.AppspecifictokensAPI.CreateAppToken(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppspecifictokensAPIService GetAppToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var tokenUuid string + + httpRes, err := apiClient.AppspecifictokensAPI.GetAppToken(context.Background(), tokenUuid).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppspecifictokensAPIService ListAppTokens", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.AppspecifictokensAPI.ListAppTokens(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AppspecifictokensAPIService RevokeAppToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var tokenUuid string + + httpRes, err := apiClient.AppspecifictokensAPI.RevokeAppToken(context.Background(), tokenUuid).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_build_test.go b/quay_api/test/api_build_test.go new file mode 100644 index 0000000..112f7fe --- /dev/null +++ b/quay_api/test/api_build_test.go @@ -0,0 +1,107 @@ +/* +Quay Frontend + +Testing BuildAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package quay_api + +import ( + "context" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_quay_api_BuildAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test BuildAPIService CancelRepoBuild", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var buildUuid string + var repository string + + httpRes, err := apiClient.BuildAPI.CancelRepoBuild(context.Background(), buildUuid, repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BuildAPIService GetRepoBuild", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var buildUuid string + var repository string + + httpRes, err := apiClient.BuildAPI.GetRepoBuild(context.Background(), buildUuid, repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BuildAPIService GetRepoBuildLogs", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var buildUuid string + var repository string + + httpRes, err := apiClient.BuildAPI.GetRepoBuildLogs(context.Background(), buildUuid, repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BuildAPIService GetRepoBuildStatus", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var buildUuid string + var repository string + + httpRes, err := apiClient.BuildAPI.GetRepoBuildStatus(context.Background(), buildUuid, repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BuildAPIService GetRepoBuilds", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + + httpRes, err := apiClient.BuildAPI.GetRepoBuilds(context.Background(), repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BuildAPIService RequestRepoBuild", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + + httpRes, err := apiClient.BuildAPI.RequestRepoBuild(context.Background(), repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_discovery_test.go b/quay_api/test/api_discovery_test.go new file mode 100644 index 0000000..c35df2e --- /dev/null +++ b/quay_api/test/api_discovery_test.go @@ -0,0 +1,36 @@ +/* +Quay Frontend + +Testing DiscoveryAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package quay_api + +import ( + "context" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_quay_api_DiscoveryAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test DiscoveryAPIService Discovery", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.DiscoveryAPI.Discovery(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_error_test.go b/quay_api/test/api_error_test.go new file mode 100644 index 0000000..bcf4bc1 --- /dev/null +++ b/quay_api/test/api_error_test.go @@ -0,0 +1,39 @@ +/* +Quay Frontend + +Testing ErrorAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package quay_api + +import ( + "context" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_quay_api_ErrorAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ErrorAPIService GetErrorDescription", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var errorType string + + resp, httpRes, err := apiClient.ErrorAPI.GetErrorDescription(context.Background(), errorType).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_globalmessages_test.go b/quay_api/test/api_globalmessages_test.go new file mode 100644 index 0000000..4eb6fdb --- /dev/null +++ b/quay_api/test/api_globalmessages_test.go @@ -0,0 +1,60 @@ +/* +Quay Frontend + +Testing GlobalmessagesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package quay_api + +import ( + "context" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_quay_api_GlobalmessagesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test GlobalmessagesAPIService CreateGlobalMessage", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.GlobalmessagesAPI.CreateGlobalMessage(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test GlobalmessagesAPIService DeleteGlobalMessage", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var uuid string + + httpRes, err := apiClient.GlobalmessagesAPI.DeleteGlobalMessage(context.Background(), uuid).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test GlobalmessagesAPIService GetGlobalMessages", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.GlobalmessagesAPI.GetGlobalMessages(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_logs_test.go b/quay_api/test/api_logs_test.go new file mode 100644 index 0000000..790df0b --- /dev/null +++ b/quay_api/test/api_logs_test.go @@ -0,0 +1,136 @@ +/* +Quay Frontend + +Testing LogsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package quay_api + +import ( + "context" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_quay_api_LogsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test LogsAPIService ExportOrgLogs", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + + httpRes, err := apiClient.LogsAPI.ExportOrgLogs(context.Background(), orgname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LogsAPIService ExportRepoLogs", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + + httpRes, err := apiClient.LogsAPI.ExportRepoLogs(context.Background(), repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LogsAPIService ExportUserLogs", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.LogsAPI.ExportUserLogs(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LogsAPIService GetAggregateOrgLogs", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + + httpRes, err := apiClient.LogsAPI.GetAggregateOrgLogs(context.Background(), orgname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LogsAPIService GetAggregateRepoLogs", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + + httpRes, err := apiClient.LogsAPI.GetAggregateRepoLogs(context.Background(), repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LogsAPIService GetAggregateUserLogs", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.LogsAPI.GetAggregateUserLogs(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LogsAPIService ListOrgLogs", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + + httpRes, err := apiClient.LogsAPI.ListOrgLogs(context.Background(), orgname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LogsAPIService ListRepoLogs", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + + httpRes, err := apiClient.LogsAPI.ListRepoLogs(context.Background(), repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test LogsAPIService ListUserLogs", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.LogsAPI.ListUserLogs(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_manifest_test.go b/quay_api/test/api_manifest_test.go new file mode 100644 index 0000000..702d2e2 --- /dev/null +++ b/quay_api/test/api_manifest_test.go @@ -0,0 +1,97 @@ +/* +Quay Frontend + +Testing ManifestAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package quay_api + +import ( + "context" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_quay_api_ManifestAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ManifestAPIService AddManifestLabel", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var manifestref string + var repository string + + httpRes, err := apiClient.ManifestAPI.AddManifestLabel(context.Background(), manifestref, repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ManifestAPIService DeleteManifestLabel", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var manifestref string + var repository string + var labelid string + + httpRes, err := apiClient.ManifestAPI.DeleteManifestLabel(context.Background(), manifestref, repository, labelid).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ManifestAPIService GetManifestLabel", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var manifestref string + var repository string + var labelid string + + httpRes, err := apiClient.ManifestAPI.GetManifestLabel(context.Background(), manifestref, repository, labelid).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ManifestAPIService GetRepoManifest", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var manifestref string + var repository string + + httpRes, err := apiClient.ManifestAPI.GetRepoManifest(context.Background(), manifestref, repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ManifestAPIService ListManifestLabels", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var manifestref string + var repository string + + httpRes, err := apiClient.ManifestAPI.ListManifestLabels(context.Background(), manifestref, repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_namespacequota_test.go b/quay_api/test/api_namespacequota_test.go new file mode 100644 index 0000000..8c1b5f5 --- /dev/null +++ b/quay_api/test/api_namespacequota_test.go @@ -0,0 +1,217 @@ +/* +Quay Frontend + +Testing NamespacequotaAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package quay_api + +import ( + "context" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_quay_api_NamespacequotaAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test NamespacequotaAPIService ChangeOrganizationQuota", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var quotaId string + + httpRes, err := apiClient.NamespacequotaAPI.ChangeOrganizationQuota(context.Background(), orgname, quotaId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NamespacequotaAPIService ChangeOrganizationQuotaLimit", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var limitId string + var quotaId string + + httpRes, err := apiClient.NamespacequotaAPI.ChangeOrganizationQuotaLimit(context.Background(), orgname, limitId, quotaId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NamespacequotaAPIService CreateOrganizationQuota", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + + httpRes, err := apiClient.NamespacequotaAPI.CreateOrganizationQuota(context.Background(), orgname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NamespacequotaAPIService CreateOrganizationQuotaLimit", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var quotaId string + + httpRes, err := apiClient.NamespacequotaAPI.CreateOrganizationQuotaLimit(context.Background(), orgname, quotaId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NamespacequotaAPIService DeleteOrganizationQuota", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var quotaId string + + httpRes, err := apiClient.NamespacequotaAPI.DeleteOrganizationQuota(context.Background(), orgname, quotaId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NamespacequotaAPIService DeleteOrganizationQuotaLimit", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var limitId string + var quotaId string + + httpRes, err := apiClient.NamespacequotaAPI.DeleteOrganizationQuotaLimit(context.Background(), orgname, limitId, quotaId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NamespacequotaAPIService GetOrganizationQuota", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var quotaId string + + httpRes, err := apiClient.NamespacequotaAPI.GetOrganizationQuota(context.Background(), orgname, quotaId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NamespacequotaAPIService GetOrganizationQuotaLimit", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var limitId string + var quotaId string + + httpRes, err := apiClient.NamespacequotaAPI.GetOrganizationQuotaLimit(context.Background(), orgname, limitId, quotaId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NamespacequotaAPIService GetUserQuota", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var quotaId string + + httpRes, err := apiClient.NamespacequotaAPI.GetUserQuota(context.Background(), quotaId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NamespacequotaAPIService GetUserQuotaLimit", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var limitId string + var quotaId string + + httpRes, err := apiClient.NamespacequotaAPI.GetUserQuotaLimit(context.Background(), limitId, quotaId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NamespacequotaAPIService ListOrganizationQuota", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + + httpRes, err := apiClient.NamespacequotaAPI.ListOrganizationQuota(context.Background(), orgname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NamespacequotaAPIService ListOrganizationQuotaLimit", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var quotaId string + + httpRes, err := apiClient.NamespacequotaAPI.ListOrganizationQuotaLimit(context.Background(), orgname, quotaId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NamespacequotaAPIService ListUserQuota", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.NamespacequotaAPI.ListUserQuota(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NamespacequotaAPIService ListUserQuotaLimit", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var quotaId string + + httpRes, err := apiClient.NamespacequotaAPI.ListUserQuotaLimit(context.Background(), quotaId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_organization_test.go b/quay_api/test/api_organization_test.go new file mode 100644 index 0000000..d9ae435 --- /dev/null +++ b/quay_api/test/api_organization_test.go @@ -0,0 +1,237 @@ +package quay_api + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/enthought/terraform-provider-quay/quay_api" +) + +func Test_quay_api_OrganizationAPIService(t *testing.T) { + configuration := newConfiguration() + apiClient := quay_api.NewAPIClient(configuration) + + t.Run("Test OrganizationAPIService ChangeOrganizationDetails", func(t *testing.T) { + // We can only change the org email with this function + orgName := "change-org-details" + + // Ensure resource is destroyed + defer func(organization quay_api.ApiDeleteAdminedOrganizationRequest) { + _, err := organization.Execute() + handleQuayAPIError(t, err) + }(apiClient.OrganizationAPI.DeleteAdminedOrganization(context.Background(), orgName)) + + // Create resource + newOrg := quay_api.NewNewOrg(orgName, orgName+"@example.com") + httpRes, err := apiClient.OrganizationAPI.CreateOrganization(context.Background()).Body(*newOrg).Execute() + handleQuayAPIError(t, err) + assert.Equal(t, 201, httpRes.StatusCode) + + // Change resource + newOrgEmail := "neworgname@example.com" + updateOrg := quay_api.UpdateOrg{Email: &newOrgEmail} + httpRes, err = apiClient.OrganizationAPI.ChangeOrganizationDetails(context.Background(), orgName).Body(updateOrg).Execute() + handleQuayAPIError(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + // Verify resource + httpRes, err = apiClient.OrganizationAPI.GetOrganization(context.Background(), orgName).Execute() + handleQuayAPIError(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + data, err := unmarshallArbitraryJSON(httpRes) + require.Nil(t, err) + assert.Equal(t, newOrgEmail, data["email"]) + }) + + t.Run("Test OrganizationAPIService CreateOrganization", func(t *testing.T) { + orgName := "create-org" + + // Ensure resource is destroyed + defer func(organization quay_api.ApiDeleteAdminedOrganizationRequest) { + _, err := organization.Execute() + handleQuayAPIError(t, err) + }(apiClient.OrganizationAPI.DeleteAdminedOrganization(context.Background(), orgName)) + + // Create resource + newOrg := quay_api.NewNewOrg(orgName, orgName+"@example.com") + httpRes, err := apiClient.OrganizationAPI.CreateOrganization(context.Background()).Body(*newOrg).Execute() + handleQuayAPIError(t, err) + assert.Equal(t, 201, httpRes.StatusCode) + }) + + t.Run("Test OrganizationAPIService CreateOrganizationApplication", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + + httpRes, err := apiClient.OrganizationAPI.CreateOrganizationApplication(context.Background(), orgname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService DeleteAdminedOrganization", func(t *testing.T) { + orgName := "delete-org" + + // Create resource + newOrg := quay_api.NewNewOrg(orgName, orgName+"@example.com") + httpRes, err := apiClient.OrganizationAPI.CreateOrganization(context.Background()).Body(*newOrg).Execute() + handleQuayAPIError(t, err) + assert.Equal(t, 201, httpRes.StatusCode) + + // Delete resource + httpRes, err = apiClient.OrganizationAPI.DeleteAdminedOrganization(context.Background(), orgName).Execute() + handleQuayAPIError(t, err) + assert.Equal(t, 204, httpRes.StatusCode) + }) + + t.Run("Test OrganizationAPIService DeleteOrganizationApplication", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var clientId string + + httpRes, err := apiClient.OrganizationAPI.DeleteOrganizationApplication(context.Background(), orgname, clientId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetApplicationInformation", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var clientId string + + httpRes, err := apiClient.OrganizationAPI.GetApplicationInformation(context.Background(), clientId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetOrganization", func(t *testing.T) { + orgName := "get-org" + + // Ensure resource is destroyed + defer func(organization quay_api.ApiDeleteAdminedOrganizationRequest) { + _, err := organization.Execute() + handleQuayAPIError(t, err) + }(apiClient.OrganizationAPI.DeleteAdminedOrganization(context.Background(), orgName)) + + // Create resource + newOrg := quay_api.NewNewOrg(orgName, orgName+"@example.com") + httpRes, err := apiClient.OrganizationAPI.CreateOrganization(context.Background()).Body(*newOrg).Execute() + handleQuayAPIError(t, err) + assert.Equal(t, 201, httpRes.StatusCode) + + // Get resource + httpRes, err = apiClient.OrganizationAPI.GetOrganization(context.Background(), orgName).Execute() + handleQuayAPIError(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + }) + + t.Run("Test OrganizationAPIService GetOrganizationApplication", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var clientId string + + httpRes, err := apiClient.OrganizationAPI.GetOrganizationApplication(context.Background(), orgname, clientId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetOrganizationApplications", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + + httpRes, err := apiClient.OrganizationAPI.GetOrganizationApplications(context.Background(), orgname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetOrganizationCollaborators", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + + httpRes, err := apiClient.OrganizationAPI.GetOrganizationCollaborators(context.Background(), orgname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetOrganizationMember", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var membername string + + httpRes, err := apiClient.OrganizationAPI.GetOrganizationMember(context.Background(), orgname, membername).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService GetOrganizationMembers", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + + httpRes, err := apiClient.OrganizationAPI.GetOrganizationMembers(context.Background(), orgname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService RemoveOrganizationMember", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var membername string + + httpRes, err := apiClient.OrganizationAPI.RemoveOrganizationMember(context.Background(), orgname, membername).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrganizationAPIService UpdateOrganizationApplication", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var clientId string + + httpRes, err := apiClient.OrganizationAPI.UpdateOrganizationApplication(context.Background(), orgname, clientId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_permission_test.go b/quay_api/test/api_permission_test.go new file mode 100644 index 0000000..b1e5d9e --- /dev/null +++ b/quay_api/test/api_permission_test.go @@ -0,0 +1,149 @@ +/* +Quay Frontend + +Testing PermissionAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package quay_api + +import ( + "context" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_quay_api_PermissionAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test PermissionAPIService ChangeTeamPermissions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + var teamname string + + httpRes, err := apiClient.PermissionAPI.ChangeTeamPermissions(context.Background(), repository, teamname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PermissionAPIService ChangeUserPermissions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + var username string + + httpRes, err := apiClient.PermissionAPI.ChangeUserPermissions(context.Background(), repository, username).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PermissionAPIService DeleteTeamPermissions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + var teamname string + + httpRes, err := apiClient.PermissionAPI.DeleteTeamPermissions(context.Background(), repository, teamname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PermissionAPIService DeleteUserPermissions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + var username string + + httpRes, err := apiClient.PermissionAPI.DeleteUserPermissions(context.Background(), repository, username).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PermissionAPIService GetTeamPermissions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + var teamname string + + httpRes, err := apiClient.PermissionAPI.GetTeamPermissions(context.Background(), repository, teamname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PermissionAPIService GetUserPermissions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + var username string + + httpRes, err := apiClient.PermissionAPI.GetUserPermissions(context.Background(), repository, username).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PermissionAPIService GetUserTransitivePermission", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + var username string + + httpRes, err := apiClient.PermissionAPI.GetUserTransitivePermission(context.Background(), repository, username).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PermissionAPIService ListRepoTeamPermissions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + + httpRes, err := apiClient.PermissionAPI.ListRepoTeamPermissions(context.Background(), repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PermissionAPIService ListRepoUserPermissions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + + httpRes, err := apiClient.PermissionAPI.ListRepoUserPermissions(context.Background(), repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_prototype_test.go b/quay_api/test/api_prototype_test.go new file mode 100644 index 0000000..6634978 --- /dev/null +++ b/quay_api/test/api_prototype_test.go @@ -0,0 +1,79 @@ +/* +Quay Frontend + +Testing PrototypeAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package quay_api + +import ( + "context" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_quay_api_PrototypeAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test PrototypeAPIService CreateOrganizationPrototypePermission", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + + httpRes, err := apiClient.PrototypeAPI.CreateOrganizationPrototypePermission(context.Background(), orgname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PrototypeAPIService DeleteOrganizationPrototypePermission", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var prototypeid string + + httpRes, err := apiClient.PrototypeAPI.DeleteOrganizationPrototypePermission(context.Background(), orgname, prototypeid).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PrototypeAPIService GetOrganizationPrototypePermissions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + + httpRes, err := apiClient.PrototypeAPI.GetOrganizationPrototypePermissions(context.Background(), orgname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PrototypeAPIService UpdateOrganizationPrototypePermission", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var prototypeid string + + httpRes, err := apiClient.PrototypeAPI.UpdateOrganizationPrototypePermission(context.Background(), orgname, prototypeid).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_repository_test.go b/quay_api/test/api_repository_test.go new file mode 100644 index 0000000..783d69c --- /dev/null +++ b/quay_api/test/api_repository_test.go @@ -0,0 +1,99 @@ +/* +Quay Frontend + +Testing RepositoryAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package quay_api + +import ( + "context" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_quay_api_RepositoryAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test RepositoryAPIService ChangeRepoVisibility", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + + httpRes, err := apiClient.RepositoryAPI.ChangeRepoVisibility(context.Background(), repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RepositoryAPIService CreateRepo", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.RepositoryAPI.CreateRepo(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RepositoryAPIService DeleteRepository", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + + httpRes, err := apiClient.RepositoryAPI.DeleteRepository(context.Background(), repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RepositoryAPIService GetRepo", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + + httpRes, err := apiClient.RepositoryAPI.GetRepo(context.Background(), repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RepositoryAPIService ListRepos", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.RepositoryAPI.ListRepos(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RepositoryAPIService UpdateRepo", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + + httpRes, err := apiClient.RepositoryAPI.UpdateRepo(context.Background(), repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_repositorynotification_test.go b/quay_api/test/api_repositorynotification_test.go new file mode 100644 index 0000000..f30a888 --- /dev/null +++ b/quay_api/test/api_repositorynotification_test.go @@ -0,0 +1,107 @@ +/* +Quay Frontend + +Testing RepositorynotificationAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package quay_api + +import ( + "context" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_quay_api_RepositorynotificationAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test RepositorynotificationAPIService CreateRepoNotification", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + + httpRes, err := apiClient.RepositorynotificationAPI.CreateRepoNotification(context.Background(), repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RepositorynotificationAPIService DeleteRepoNotification", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + var uuid string + + httpRes, err := apiClient.RepositorynotificationAPI.DeleteRepoNotification(context.Background(), repository, uuid).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RepositorynotificationAPIService GetRepoNotification", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + var uuid string + + httpRes, err := apiClient.RepositorynotificationAPI.GetRepoNotification(context.Background(), repository, uuid).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RepositorynotificationAPIService ListRepoNotifications", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + + httpRes, err := apiClient.RepositorynotificationAPI.ListRepoNotifications(context.Background(), repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RepositorynotificationAPIService ResetRepositoryNotificationFailures", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + var uuid string + + httpRes, err := apiClient.RepositorynotificationAPI.ResetRepositoryNotificationFailures(context.Background(), repository, uuid).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RepositorynotificationAPIService TestRepoNotification", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + var uuid string + + httpRes, err := apiClient.RepositorynotificationAPI.TestRepoNotification(context.Background(), repository, uuid).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_repotoken_test.go b/quay_api/test/api_repotoken_test.go new file mode 100644 index 0000000..3b8571a --- /dev/null +++ b/quay_api/test/api_repotoken_test.go @@ -0,0 +1,93 @@ +/* +Quay Frontend + +Testing RepotokenAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package quay_api + +import ( + "context" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_quay_api_RepotokenAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test RepotokenAPIService ChangeToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + var code string + + httpRes, err := apiClient.RepotokenAPI.ChangeToken(context.Background(), repository, code).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RepotokenAPIService CreateToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + + httpRes, err := apiClient.RepotokenAPI.CreateToken(context.Background(), repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RepotokenAPIService DeleteToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + var code string + + httpRes, err := apiClient.RepotokenAPI.DeleteToken(context.Background(), repository, code).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RepotokenAPIService GetTokens", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + var code string + + httpRes, err := apiClient.RepotokenAPI.GetTokens(context.Background(), repository, code).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RepotokenAPIService ListRepoTokens", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + + httpRes, err := apiClient.RepotokenAPI.ListRepoTokens(context.Background(), repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_robot_test.go b/quay_api/test/api_robot_test.go new file mode 100644 index 0000000..631d72e --- /dev/null +++ b/quay_api/test/api_robot_test.go @@ -0,0 +1,184 @@ +/* +Quay Frontend + +Testing RobotAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package quay_api + +import ( + "context" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_quay_api_RobotAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test RobotAPIService CreateOrgRobot", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var robotShortname string + + httpRes, err := apiClient.RobotAPI.CreateOrgRobot(context.Background(), orgname, robotShortname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RobotAPIService CreateUserRobot", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var robotShortname string + + httpRes, err := apiClient.RobotAPI.CreateUserRobot(context.Background(), robotShortname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RobotAPIService DeleteOrgRobot", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var robotShortname string + + httpRes, err := apiClient.RobotAPI.DeleteOrgRobot(context.Background(), orgname, robotShortname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RobotAPIService DeleteUserRobot", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var robotShortname string + + httpRes, err := apiClient.RobotAPI.DeleteUserRobot(context.Background(), robotShortname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RobotAPIService GetOrgRobot", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var robotShortname string + + httpRes, err := apiClient.RobotAPI.GetOrgRobot(context.Background(), orgname, robotShortname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RobotAPIService GetOrgRobotPermissions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var robotShortname string + + httpRes, err := apiClient.RobotAPI.GetOrgRobotPermissions(context.Background(), orgname, robotShortname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RobotAPIService GetOrgRobots", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + + httpRes, err := apiClient.RobotAPI.GetOrgRobots(context.Background(), orgname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RobotAPIService GetUserRobot", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var robotShortname string + + httpRes, err := apiClient.RobotAPI.GetUserRobot(context.Background(), robotShortname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RobotAPIService GetUserRobotPermissions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var robotShortname string + + httpRes, err := apiClient.RobotAPI.GetUserRobotPermissions(context.Background(), robotShortname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RobotAPIService GetUserRobots", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.RobotAPI.GetUserRobots(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RobotAPIService RegenerateOrgRobotToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var robotShortname string + + httpRes, err := apiClient.RobotAPI.RegenerateOrgRobotToken(context.Background(), orgname, robotShortname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test RobotAPIService RegenerateUserRobotToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var robotShortname string + + httpRes, err := apiClient.RobotAPI.RegenerateUserRobotToken(context.Background(), robotShortname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_search_test.go b/quay_api/test/api_search_test.go new file mode 100644 index 0000000..53367be --- /dev/null +++ b/quay_api/test/api_search_test.go @@ -0,0 +1,60 @@ +/* +Quay Frontend + +Testing SearchAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package quay_api + +import ( + "context" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_quay_api_SearchAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test SearchAPIService ConductRepoSearch", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.SearchAPI.ConductRepoSearch(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SearchAPIService ConductSearch", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.SearchAPI.ConductSearch(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SearchAPIService GetMatchingEntities", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var prefix string + + httpRes, err := apiClient.SearchAPI.GetMatchingEntities(context.Background(), prefix).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_superuser_test.go b/quay_api/test/api_superuser_test.go new file mode 100644 index 0000000..4202df5 --- /dev/null +++ b/quay_api/test/api_superuser_test.go @@ -0,0 +1,327 @@ +package quay_api + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/enthought/terraform-provider-quay/quay_api" +) + +func Test_quay_api_SuperuserAPIService(t *testing.T) { + configuration := newConfiguration() + apiClient := quay_api.NewAPIClient(configuration) + + t.Run("Test SuperuserAPIService ApproveServiceKey", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var kid string + + httpRes, err := apiClient.SuperuserAPI.ApproveServiceKey(context.Background(), kid).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService ChangeOrganization", func(t *testing.T) { + // We can only change the org name with this function + orgList := []string{ + "superuser-change-org-0", + "superuser-change-org-1", + } + + // Ensure resource is destroyed + defer func(organization quay_api.ApiDeleteAdminedOrganizationRequest) { + _, err := organization.Execute() + handleQuayAPIError(t, err) + }(apiClient.OrganizationAPI.DeleteAdminedOrganization(context.Background(), orgList[0])) + + // Create resource + newOrg := quay_api.NewNewOrg(orgList[0], orgList[0]+"@example.com") + httpRes, err := apiClient.OrganizationAPI.CreateOrganization(context.Background()).Body(*newOrg).Execute() + handleQuayAPIError(t, err) + assert.Equal(t, 201, httpRes.StatusCode) + + // Change resource + updateOrg := quay_api.UpdateOrg{Name: &orgList[1]} + httpRes, err = apiClient.SuperuserAPI.ChangeOrganization(context.Background(), orgList[0]).Body(updateOrg).Execute() + handleQuayAPIError(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + // Verify resource + httpRes, err = apiClient.OrganizationAPI.GetOrganization(context.Background(), orgList[1]).Execute() + handleQuayAPIError(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + data, err := unmarshallArbitraryJSON(httpRes) + require.Nil(t, err) + assert.Equal(t, orgList[1], data["name"]) + + // Change resource back + updateOrg = quay_api.UpdateOrg{Name: &orgList[0]} + httpRes, err = apiClient.SuperuserAPI.ChangeOrganization(context.Background(), orgList[1]).Body(updateOrg).Execute() + handleQuayAPIError(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + }) + + t.Run("Test SuperuserAPIService ChangeOrganizationQuotaSuperUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var quotaId string + var namespace string + + httpRes, err := apiClient.SuperuserAPI.ChangeOrganizationQuotaSuperUser(context.Background(), quotaId, namespace).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService ChangeUserQuotaSuperUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var quotaId string + var namespace string + + httpRes, err := apiClient.SuperuserAPI.ChangeUserQuotaSuperUser(context.Background(), quotaId, namespace).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService CreateInstallUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.SuperuserAPI.CreateInstallUser(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService CreateOrganizationQuotaSuperUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var namespace string + + httpRes, err := apiClient.SuperuserAPI.CreateOrganizationQuotaSuperUser(context.Background(), namespace).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService CreateServiceKey", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.SuperuserAPI.CreateServiceKey(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService CreateUserQuotaSuperUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var namespace string + + httpRes, err := apiClient.SuperuserAPI.CreateUserQuotaSuperUser(context.Background(), namespace).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService DeleteOrganization", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var name string + + httpRes, err := apiClient.SuperuserAPI.DeleteOrganization(context.Background(), name).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService DeleteOrganizationQuotaSuperUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var quotaId string + var namespace string + + httpRes, err := apiClient.SuperuserAPI.DeleteOrganizationQuotaSuperUser(context.Background(), quotaId, namespace).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService DeleteServiceKey", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var kid string + + httpRes, err := apiClient.SuperuserAPI.DeleteServiceKey(context.Background(), kid).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService DeleteUserQuotaSuperUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var quotaId string + var namespace string + + httpRes, err := apiClient.SuperuserAPI.DeleteUserQuotaSuperUser(context.Background(), quotaId, namespace).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService GetRepoBuildLogsSuperUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var buildUuid string + + httpRes, err := apiClient.SuperuserAPI.GetRepoBuildLogsSuperUser(context.Background(), buildUuid).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService GetRepoBuildStatusSuperUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + var buildUuid string + + httpRes, err := apiClient.SuperuserAPI.GetRepoBuildStatusSuperUser(context.Background(), repository, buildUuid).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService GetRepoBuildSuperUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + var buildUuid string + + httpRes, err := apiClient.SuperuserAPI.GetRepoBuildSuperUser(context.Background(), repository, buildUuid).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService GetServiceKey", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var kid string + + httpRes, err := apiClient.SuperuserAPI.GetServiceKey(context.Background(), kid).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService ListAllLogs", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.SuperuserAPI.ListAllLogs(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService ListAllUsers", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.SuperuserAPI.ListAllUsers(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService ListOrganizationQuotaSuperUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var namespace string + + httpRes, err := apiClient.SuperuserAPI.ListOrganizationQuotaSuperUser(context.Background(), namespace).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService ListServiceKeys", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.SuperuserAPI.ListServiceKeys(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService ListUserQuotaSuperUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var namespace string + + httpRes, err := apiClient.SuperuserAPI.ListUserQuotaSuperUser(context.Background(), namespace).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SuperuserAPIService UpdateServiceKey", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var kid string + + httpRes, err := apiClient.SuperuserAPI.UpdateServiceKey(context.Background(), kid).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_tag_test.go b/quay_api/test/api_tag_test.go new file mode 100644 index 0000000..4c5e63e --- /dev/null +++ b/quay_api/test/api_tag_test.go @@ -0,0 +1,80 @@ +/* +Quay Frontend + +Testing TagAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package quay_api + +import ( + "context" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_quay_api_TagAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test TagAPIService ChangeTag", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + var tag string + + httpRes, err := apiClient.TagAPI.ChangeTag(context.Background(), repository, tag).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TagAPIService DeleteFullTag", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + var tag string + + httpRes, err := apiClient.TagAPI.DeleteFullTag(context.Background(), repository, tag).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TagAPIService ListRepoTags", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + + httpRes, err := apiClient.TagAPI.ListRepoTags(context.Background(), repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TagAPIService RestoreTag", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + var tag string + + httpRes, err := apiClient.TagAPI.RestoreTag(context.Background(), repository, tag).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_team_test.go b/quay_api/test/api_team_test.go new file mode 100644 index 0000000..1b56a87 --- /dev/null +++ b/quay_api/test/api_team_test.go @@ -0,0 +1,169 @@ +/* +Quay Frontend + +Testing TeamAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package quay_api + +import ( + "context" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_quay_api_TeamAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test TeamAPIService DeleteOrganizationTeam", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var teamname string + + httpRes, err := apiClient.TeamAPI.DeleteOrganizationTeam(context.Background(), orgname, teamname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TeamAPIService DeleteOrganizationTeamMember", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var membername string + var teamname string + + httpRes, err := apiClient.TeamAPI.DeleteOrganizationTeamMember(context.Background(), orgname, membername, teamname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TeamAPIService DeleteTeamMemberEmailInvite", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var email string + var teamname string + + httpRes, err := apiClient.TeamAPI.DeleteTeamMemberEmailInvite(context.Background(), orgname, email, teamname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TeamAPIService DisableOrganizationTeamSync", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var teamname string + + httpRes, err := apiClient.TeamAPI.DisableOrganizationTeamSync(context.Background(), orgname, teamname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TeamAPIService EnableOrganizationTeamSync", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var teamname string + + httpRes, err := apiClient.TeamAPI.EnableOrganizationTeamSync(context.Background(), orgname, teamname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TeamAPIService GetOrganizationTeamMembers", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var teamname string + + httpRes, err := apiClient.TeamAPI.GetOrganizationTeamMembers(context.Background(), orgname, teamname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TeamAPIService GetOrganizationTeamPermissions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var teamname string + + httpRes, err := apiClient.TeamAPI.GetOrganizationTeamPermissions(context.Background(), orgname, teamname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TeamAPIService InviteTeamMemberEmail", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var email string + var teamname string + + httpRes, err := apiClient.TeamAPI.InviteTeamMemberEmail(context.Background(), orgname, email, teamname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TeamAPIService UpdateOrganizationTeam", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var teamname string + + httpRes, err := apiClient.TeamAPI.UpdateOrganizationTeam(context.Background(), orgname, teamname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TeamAPIService UpdateOrganizationTeamMember", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var orgname string + var membername string + var teamname string + + httpRes, err := apiClient.TeamAPI.UpdateOrganizationTeamMember(context.Background(), orgname, membername, teamname).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_trigger_test.go b/quay_api/test/api_trigger_test.go new file mode 100644 index 0000000..9cb8c3f --- /dev/null +++ b/quay_api/test/api_trigger_test.go @@ -0,0 +1,122 @@ +/* +Quay Frontend + +Testing TriggerAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package quay_api + +import ( + "context" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_quay_api_TriggerAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test TriggerAPIService ActivateBuildTrigger", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var triggerUuid string + var repository string + + httpRes, err := apiClient.TriggerAPI.ActivateBuildTrigger(context.Background(), triggerUuid, repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TriggerAPIService DeleteBuildTrigger", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var triggerUuid string + var repository string + + httpRes, err := apiClient.TriggerAPI.DeleteBuildTrigger(context.Background(), triggerUuid, repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TriggerAPIService GetBuildTrigger", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var triggerUuid string + var repository string + + httpRes, err := apiClient.TriggerAPI.GetBuildTrigger(context.Background(), triggerUuid, repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TriggerAPIService ListBuildTriggers", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + + httpRes, err := apiClient.TriggerAPI.ListBuildTriggers(context.Background(), repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TriggerAPIService ListTriggerRecentBuilds", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var triggerUuid string + var repository string + + httpRes, err := apiClient.TriggerAPI.ListTriggerRecentBuilds(context.Background(), triggerUuid, repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TriggerAPIService ManuallyStartBuildTrigger", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var triggerUuid string + var repository string + + httpRes, err := apiClient.TriggerAPI.ManuallyStartBuildTrigger(context.Background(), triggerUuid, repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test TriggerAPIService UpdateBuildTrigger", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var triggerUuid string + var repository string + + httpRes, err := apiClient.TriggerAPI.UpdateBuildTrigger(context.Background(), triggerUuid, repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/api_user_test.go b/quay_api/test/api_user_test.go new file mode 100644 index 0000000..7d0a2e8 --- /dev/null +++ b/quay_api/test/api_user_test.go @@ -0,0 +1,85 @@ +/* +Quay Frontend + +Testing UserAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package quay_api + +import ( + "context" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_quay_api_UserAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test UserAPIService CreateStar", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.UserAPI.CreateStar(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserAPIService DeleteStar", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var repository string + + httpRes, err := apiClient.UserAPI.DeleteStar(context.Background(), repository).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserAPIService GetLoggedInUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.UserAPI.GetLoggedInUser(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserAPIService GetUserInformation", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var username string + + httpRes, err := apiClient.UserAPI.GetUserInformation(context.Background(), username).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test UserAPIService ListStarredRepos", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + httpRes, err := apiClient.UserAPI.ListStarredRepos(context.Background()).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/quay_api/test/test_helpers.go b/quay_api/test/test_helpers.go new file mode 100644 index 0000000..4b38537 --- /dev/null +++ b/quay_api/test/test_helpers.go @@ -0,0 +1,60 @@ +package quay_api + +import ( + "encoding/json" + "errors" + openapiclient "github.com/enthought/terraform-provider-quay/quay_api" + "github.com/stretchr/testify/require" + "io" + "net/http" + "os" + "testing" +) + +func handleQuayAPIError(t *testing.T, err error) { + var apiErr *openapiclient.GenericOpenAPIError + if err != nil { + if errors.As(err, &apiErr) { + require.Nil(t, err, string(apiErr.Body())) + } else { + require.Nil(t, err) + } + } +} + +func newConfiguration() *openapiclient.Configuration { + quayURL := os.Getenv("QUAY_URL") + configuration := &openapiclient.Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Servers: openapiclient.ServerConfigurations{ + { + URL: quayURL, + Description: "No description provided", + }, + }, + OperationServers: map[string]openapiclient.ServerConfigurations{}, + } + + authToken := os.Getenv("QUAY_TOKEN") + configuration.AddDefaultHeader("Authorization", "Bearer "+authToken) + + return configuration +} + +func unmarshallArbitraryJSON(httpRes *http.Response) (map[string]interface{}, error) { + var data map[string]interface{} + + body, err := io.ReadAll(httpRes.Body) + if err != nil { + return nil, err + } + + err = json.Unmarshal(body, &data) + if err != nil { + return nil, err + } + + return data, nil +} diff --git a/quay_api/utils.go b/quay_api/utils.go new file mode 100644 index 0000000..3d3d3f5 --- /dev/null +++ b/quay_api/utils.go @@ -0,0 +1,362 @@ +/* +Quay Frontend + +This API allows you to perform many of the operations required to work with Quay repositories, users, and organizations. + +API version: v1 +Contact: admin@example.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package quay_api + +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...) +} diff --git a/templates/index.md.tmpl b/templates/index.md.tmpl new file mode 100644 index 0000000..c26af47 --- /dev/null +++ b/templates/index.md.tmpl @@ -0,0 +1,21 @@ +--- +page_title: "{{ .RenderedProviderName }} Provider" +subcategory: "" +description: |- + Terraform provider for the [Quay Project](https://github.com/quay/quay). +--- + +# {{ .RenderedProviderName }} Provider +The Quay provider provides resources and data sources for managing Quay organizations and repositories. + +## Authentication +An authentication token can be generated in the Quay application settings page. The Quay documentation refers to it as +an `OAuth 2 Access Token`. Since there is no mechanism in Quay for creating applications outside of an organization, it +is recommended to create a separate organization and application for Terraform. Be sure to create the +`OAuth 2 Access Token` using a service account since the token will be tied to that account. + +## Example Usage + +{{ tffile "examples/provider/provider.tf" }} + +{{ .SchemaMarkdown }} \ No newline at end of file From aac1402f0e2f452b89247b45ec5fbe6a8f5d06d2 Mon Sep 17 00:00:00 2001 From: David Debeau Date: Fri, 2 Aug 2024 11:44:51 -0500 Subject: [PATCH 2/4] Add files for building in GitHub Actions --- .github/dependabot.yml | 18 +++++++++ .github/workflows/release.yml | 47 ++++++++++++++++++++++ .github/workflows/test.yml | 41 +++++++++++++++++++ .golangci.yml | 33 ++++++++++++++++ .goreleaser.yml | 67 ++++++++++++++++++++++++++++++++ terraform-registry-manifest.json | 6 +++ 6 files changed, 212 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/test.yml create mode 100644 .golangci.yml create mode 100644 .goreleaser.yml create mode 100644 terraform-registry-manifest.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..138f290 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,18 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +# Modifications copyright (c) Enthought, Inc. +# SPDX-License-Identifier: BSD-3-Clause + +# See GitHub's documentation for more information on this file: +# https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates +version: 2 +updates: + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..6051cce --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,47 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +# Modifications copyright (c) Enthought, Inc. +# SPDX-License-Identifier: BSD-3-Clause + +# Terraform Provider release workflow. +name: Release + +# This GitHub action creates a release when a tag that matches the pattern +# "v*" (e.g. v0.1.0) is created. +on: + push: + tags: + - 'v*' + +# Releases need permissions to read and write the repository contents. +# GitHub considers creating releases and uploading assets as writing contents. +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + # Allow goreleaser to access older tag information. + fetch-depth: 0 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 + with: + go-version-file: 'go.mod' + cache: true + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0 + id: import_gpg + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.PASSPHRASE }} + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0 + with: + args: release --clean + env: + # GitHub sets the GITHUB_TOKEN secret automatically. + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..abeb6c7 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,41 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +# Modifications copyright (c) Enthought, Inc. +# SPDX-License-Identifier: BSD-3-Clause + +# Terraform Provider testing workflow. +name: Tests + +# This GitHub action runs your tests for each pull request and push. +# Optionally, you can turn it on using a schedule for regular testing. +on: + pull_request: + paths-ignore: + - 'README.md' + push: + paths-ignore: + - 'README.md' + +# Testing only needs permissions to read the repository contents. +permissions: + contents: read + +jobs: + # Ensure project builds before running testing matrix + build: + name: Build + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 + with: + go-version-file: 'go.mod' + cache: true + - run: go mod download + - run: go build -v . + - name: Run linters + uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1 + with: + version: latest diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..af1e14a --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,33 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +# Modifications copyright (c) Enthought, Inc. +# SPDX-License-Identifier: BSD-3-Clause + +# Visit https://golangci-lint.run/ for usage documentation +# and information on other useful linters +issues: + max-issues-per-linter: 0 + max-same-issues: 0 + +linters: + disable-all: true + enable: + - durationcheck + - errcheck + - exportloopref + - forcetypeassert + - godot + - gofmt + - gosimple + - ineffassign + - makezero + - misspell + - nilerr + - predeclared + - staticcheck + - tenv + - unconvert + - unparam + - unused + - govet diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..cdfa46c --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,67 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +# Modifications copyright (c) Enthought, Inc. +# SPDX-License-Identifier: BSD-3-Clause + +# Visit https://goreleaser.com for documentation on how to customize this +# behavior. +version: 2 +before: + hooks: + # this is just an example and not a requirement for provider building/publishing + - go mod tidy +builds: + - env: + # goreleaser does not work with CGO, it could also complicate + # usage by users in CI/CD systems like HCP Terraform where + # they are unable to install libraries. + - CGO_ENABLED=0 + mod_timestamp: '{{ .CommitTimestamp }}' + flags: + - -trimpath + ldflags: + - '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}' + goos: + - freebsd + - windows + - linux + - darwin + goarch: + - amd64 + - '386' + - arm + - arm64 + ignore: + - goos: darwin + goarch: '386' + binary: '{{ .ProjectName }}_v{{ .Version }}' +archives: + - format: zip + name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}' +checksum: + extra_files: + - glob: 'terraform-registry-manifest.json' + name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json' + name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS' + algorithm: sha256 +signs: + - artifacts: checksum + args: + # if you are using this in a GitHub action or some other automated pipeline, you + # need to pass the batch flag to indicate its not interactive. + - "--batch" + - "--local-user" + - "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key + - "--output" + - "${signature}" + - "--detach-sign" + - "${artifact}" +release: + extra_files: + - glob: 'terraform-registry-manifest.json' + name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json' + # If you want to manually examine the release before its live, uncomment this line: + # draft: true +changelog: + disable: true diff --git a/terraform-registry-manifest.json b/terraform-registry-manifest.json new file mode 100644 index 0000000..295001a --- /dev/null +++ b/terraform-registry-manifest.json @@ -0,0 +1,6 @@ +{ + "version": 1, + "metadata": { + "protocol_versions": ["6.0"] + } +} From 80461753e95dfbf130df4c6ef1cb751f8d169712 Mon Sep 17 00:00:00 2001 From: David Debeau Date: Fri, 2 Aug 2024 11:50:46 -0500 Subject: [PATCH 3/4] Add docs --- docs/data-sources/organization.md | 30 +++++++++++++++++++++++++ docs/index.md | 32 ++++++++++++++++++++++++++ docs/resources/organization.md | 37 +++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 docs/data-sources/organization.md create mode 100644 docs/index.md create mode 100644 docs/resources/organization.md diff --git a/docs/data-sources/organization.md b/docs/data-sources/organization.md new file mode 100644 index 0000000..445022e --- /dev/null +++ b/docs/data-sources/organization.md @@ -0,0 +1,30 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "quay_organization Data Source - quay" +subcategory: "" +description: |- + +--- + +# quay_organization (Data Source) + + + +## Example Usage + +```terraform +data "quay_organization" "main" { + name = "main" +} +``` + + +## Schema + +### Required + +- `name` (String) Organization name + +### Read-Only + +- `email` (String) Organization contact email diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..8ba932b --- /dev/null +++ b/docs/index.md @@ -0,0 +1,32 @@ +--- +page_title: "Quay Provider" +subcategory: "" +description: |- + Terraform provider for the [Quay Project](https://github.com/quay/quay). +--- + +# Quay Provider +The Quay provider provides resources and data sources for managing Quay organizations and repositories. + +## Authentication +An authentication token can be generated in the Quay application settings page. The Quay documentation refers to it as +an `OAuth 2 Access Token`. Since there is no mechanism in Quay for creating applications outside of an organization, it +is recommended to create a separate organization and application for Terraform. Be sure to create the +`OAuth 2 Access Token` using a service account since the token will be tied to that account. + +## Example Usage + +```terraform +provider "quay" { + url = "https://quay.example.com" +} +``` + + +## Schema + +### Optional + +- `token` (String, Sensitive) Quay token. May also be provided via the QUAY_TOKEN environment variable. +- `url` (String) Quay URL. May also be provided via the QUAY_URL environment variable. Example: https://quay.example.com + diff --git a/docs/resources/organization.md b/docs/resources/organization.md new file mode 100644 index 0000000..091ed55 --- /dev/null +++ b/docs/resources/organization.md @@ -0,0 +1,37 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "quay_organization Resource - quay" +subcategory: "" +description: |- + +--- + +# quay_organization (Resource) + + + +## Example Usage + +```terraform +resource "quay_organization" "main" { + name = "main" + email = "quay+main@example.com" +} +``` + + +## Schema + +### Required + +- `email` (String) Organization contact email +- `name` (String) Organization name + +## Import + +Import is supported using the following syntax: + +```shell +# An organization can be imported using its name. +terraform import quay_organization.main main +``` From 61d62e1087434bc6a9646535445ad033890de393 Mon Sep 17 00:00:00 2001 From: David Debeau Date: Fri, 2 Aug 2024 13:07:21 -0500 Subject: [PATCH 4/4] Add README and GNUmakefile --- GNUmakefile | 20 ++++++++++++++++++++ README.md | 25 +++++++++++++++++++++++++ generate_quay_api.sh | 6 ------ 3 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 GNUmakefile create mode 100644 README.md delete mode 100644 generate_quay_api.sh diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000..5211f2e --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,20 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +# Modifications copyright (c) Enthought, Inc. +# SPDX-License-Identifier: BSD-3-Clause + +default: testacc + +# Run acceptance tests +.PHONY: testacc +testacc: + TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m + +# Generate Quay API +.PHONY: generate-quay-api +generate-quay-api: + openapi-generator generate --generator-name go --git-user-id enthought --git-repo-id terraform-provider-quay --additional-properties=packageName=quay_api,isGoSubmodule=true --skip-validate-spec --input-spec code_generator/quay_api.json --output quay_api && \ + gofmt -w quay_api && \ + cd quay_api && \ + go mod tidy diff --git a/README.md b/README.md new file mode 100644 index 0000000..b16468f --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# terraform-provider-quay +Terraform provider for the [Quay Project](https://github.com/quay/quay). + +Please visit the Terraform registry site for instructions on how to use the provider: + +https://registry.terraform.io/providers/enthought/quay/latest/docs + +## Developer Instructions +### Build Documentation +The documentation should be updated every time the provider code is changed. +```bash +go generate . +``` + +### Run Tests +```bash +export QUAY_URL="https://quay.example.com" +export QUAY_TOKEN="" +make testacc +``` + +### Generate Quay API +```bash +make generate-quay-api +``` diff --git a/generate_quay_api.sh b/generate_quay_api.sh deleted file mode 100644 index a64825f..0000000 --- a/generate_quay_api.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -openapi-generator generate --generator-name go --git-user-id enthought --git-repo-id terraform-provider-quay --additional-properties=packageName=quay_api,isGoSubmodule=true --skip-validate-spec --input-spec code_generator/quay_api.json --output quay_api -gofmt -w quay_api -cd quay_api -go mod tidy