From 464e04d57a952938a2d862c71c6b0e48367bdf1f Mon Sep 17 00:00:00 2001 From: Torrey Payne <11740989+torreypayne@users.noreply.github.com> Date: Wed, 12 Aug 2026 21:45:06 +0000 Subject: [PATCH] feat(google-cloud-apigee_registry-v1)!: replace gem with tombstone --- google-cloud-apigee_registry-v1/.OwlBot.yaml | 3 - google-cloud-apigee_registry-v1/.gitignore | 21 - .../.owlbot-manifest.json | 111 - .../.repo-metadata.json | 17 - google-cloud-apigee_registry-v1/.rubocop.yml | 33 - google-cloud-apigee_registry-v1/.toys.rb | 28 - google-cloud-apigee_registry-v1/.yardopts | 5 +- .../AUTHENTICATION.md | 122 - google-cloud-apigee_registry-v1/CHANGELOG.md | 145 - google-cloud-apigee_registry-v1/Gemfile | 14 - google-cloud-apigee_registry-v1/Gemfile.lock | 305 -- google-cloud-apigee_registry-v1/LICENSE.md | 4 +- google-cloud-apigee_registry-v1/README.md | 156 +- google-cloud-apigee_registry-v1/Rakefile | 153 +- .../gapic_metadata.json | 217 - .../google-cloud-apigee_registry-v1.gemspec | 43 +- .../lib/google-cloud-apigee_registry-v1.rb | 21 - .../lib/google/cloud/apigee_registry/v1.rb | 46 - .../apigee_registry/v1/bindings_override.rb | 324 -- .../cloud/apigee_registry/v1/provisioning.rb | 57 - .../apigee_registry/v1/provisioning/client.rb | 732 --- .../v1/provisioning/credentials.rb | 47 - .../v1/provisioning/operations.rb | 843 ---- .../apigee_registry/v1/provisioning/paths.rb | 69 - .../apigee_registry/v1/provisioning/rest.rb | 55 - .../v1/provisioning/rest/client.rb | 677 --- .../v1/provisioning/rest/operations.rb | 927 ---- .../v1/provisioning/rest/service_stub.rb | 265 -- .../cloud/apigee_registry/v1/registry.rb | 55 - .../apigee_registry/v1/registry/client.rb | 4097 ----------------- .../v1/registry/credentials.rb | 47 - .../apigee_registry/v1/registry/paths.rb | 238 - .../cloud/apigee_registry/v1/registry/rest.rb | 53 - .../v1/registry/rest/client.rb | 3818 --------------- .../v1/registry/rest/service_stub.rb | 2406 ---------- .../google/cloud/apigee_registry/v1/rest.rb | 39 - .../cloud/apigee_registry/v1/version.rb | 9 +- .../v1/provisioning_service_pb.rb | 34 - .../v1/provisioning_service_services_pb.rb | 50 - .../apigeeregistry/v1/registry_models_pb.rb | 29 - .../apigeeregistry/v1/registry_service_pb.rb | 71 - .../v1/registry_service_services_pb.rb | 128 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/httpbody.rb | 80 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../apigeeregistry/v1/provisioning_service.rb | 157 - .../apigeeregistry/v1/registry_models.rb | 407 -- .../apigeeregistry/v1/registry_service.rb | 712 --- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../snippets/provisioning/create_instance.rb | 54 - .../snippets/provisioning/delete_instance.rb | 54 - .../snippets/provisioning/get_instance.rb | 47 - .../snippets/registry/create_api.rb | 47 - .../registry/create_api_deployment.rb | 47 - .../snippets/registry/create_api_spec.rb | 47 - .../snippets/registry/create_api_version.rb | 47 - .../snippets/registry/create_artifact.rb | 47 - .../snippets/registry/delete_api.rb | 47 - .../registry/delete_api_deployment.rb | 47 - .../delete_api_deployment_revision.rb | 47 - .../snippets/registry/delete_api_spec.rb | 47 - .../registry/delete_api_spec_revision.rb | 47 - .../snippets/registry/delete_api_version.rb | 47 - .../snippets/registry/delete_artifact.rb | 47 - .../snippets/registry/get_api.rb | 47 - .../snippets/registry/get_api_deployment.rb | 47 - .../snippets/registry/get_api_spec.rb | 47 - .../registry/get_api_spec_contents.rb | 47 - .../snippets/registry/get_api_version.rb | 47 - .../snippets/registry/get_artifact.rb | 47 - .../registry/get_artifact_contents.rb | 47 - .../registry/list_api_deployment_revisions.rb | 51 - .../snippets/registry/list_api_deployments.rb | 51 - .../registry/list_api_spec_revisions.rb | 51 - .../snippets/registry/list_api_specs.rb | 51 - .../snippets/registry/list_api_versions.rb | 51 - .../snippets/registry/list_apis.rb | 51 - .../snippets/registry/list_artifacts.rb | 51 - .../snippets/registry/replace_artifact.rb | 47 - .../registry/rollback_api_deployment.rb | 47 - .../snippets/registry/rollback_api_spec.rb | 47 - .../registry/tag_api_deployment_revision.rb | 47 - .../registry/tag_api_spec_revision.rb | 47 - .../snippets/registry/update_api.rb | 47 - .../registry/update_api_deployment.rb | 47 - .../snippets/registry/update_api_spec.rb | 47 - .../snippets/registry/update_api_version.rb | 47 - ...tadata_google.cloud.apigeeregistry.v1.json | 1535 ------ .../v1/provisioning_operations_test.rb | 400 -- .../v1/provisioning_paths_test.rb | 67 - .../v1/provisioning_rest_test.rb | 263 -- .../apigee_registry/v1/provisioning_test.rb | 306 -- .../apigee_registry/v1/registry_paths_test.rb | 127 - .../apigee_registry/v1/registry_rest_test.rb | 2034 -------- .../cloud/apigee_registry/v1/registry_test.rb | 2259 --------- .../test/helper.rb | 26 - 107 files changed, 29 insertions(+), 28645 deletions(-) delete mode 100644 google-cloud-apigee_registry-v1/.OwlBot.yaml delete mode 100644 google-cloud-apigee_registry-v1/.gitignore delete mode 100644 google-cloud-apigee_registry-v1/.owlbot-manifest.json delete mode 100644 google-cloud-apigee_registry-v1/.repo-metadata.json delete mode 100644 google-cloud-apigee_registry-v1/.rubocop.yml delete mode 100644 google-cloud-apigee_registry-v1/.toys.rb delete mode 100644 google-cloud-apigee_registry-v1/AUTHENTICATION.md delete mode 100644 google-cloud-apigee_registry-v1/CHANGELOG.md delete mode 100644 google-cloud-apigee_registry-v1/Gemfile delete mode 100644 google-cloud-apigee_registry-v1/Gemfile.lock delete mode 100644 google-cloud-apigee_registry-v1/gapic_metadata.json delete mode 100644 google-cloud-apigee_registry-v1/lib/google-cloud-apigee_registry-v1.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/bindings_override.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/client.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/credentials.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/operations.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/paths.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/client.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/operations.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/service_stub.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/client.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/credentials.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/paths.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/client.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/service_stub.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/rest.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/provisioning_service_pb.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/provisioning_service_services_pb.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/registry_models_pb.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/registry_service_pb.rb delete mode 100644 google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/registry_service_services_pb.rb delete mode 100644 google-cloud-apigee_registry-v1/proto_docs/README.md delete mode 100644 google-cloud-apigee_registry-v1/proto_docs/google/api/client.rb delete mode 100644 google-cloud-apigee_registry-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 google-cloud-apigee_registry-v1/proto_docs/google/api/httpbody.rb delete mode 100644 google-cloud-apigee_registry-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 google-cloud-apigee_registry-v1/proto_docs/google/api/resource.rb delete mode 100644 google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/provisioning_service.rb delete mode 100644 google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_models.rb delete mode 100644 google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_service.rb delete mode 100644 google-cloud-apigee_registry-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 google-cloud-apigee_registry-v1/proto_docs/google/protobuf/any.rb delete mode 100644 google-cloud-apigee_registry-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 google-cloud-apigee_registry-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 google-cloud-apigee_registry-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 google-cloud-apigee_registry-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 google-cloud-apigee_registry-v1/proto_docs/google/rpc/status.rb delete mode 100644 google-cloud-apigee_registry-v1/proto_docs/google/type/expr.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/Gemfile delete mode 100644 google-cloud-apigee_registry-v1/snippets/provisioning/create_instance.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/provisioning/delete_instance.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/provisioning/get_instance.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/create_api.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/create_api_deployment.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/create_api_spec.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/create_api_version.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/create_artifact.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/delete_api.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment_revision.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec_revision.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/delete_api_version.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/delete_artifact.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/get_api.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/get_api_deployment.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/get_api_spec.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/get_api_spec_contents.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/get_api_version.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/get_artifact.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/get_artifact_contents.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/list_api_deployment_revisions.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/list_api_deployments.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/list_api_spec_revisions.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/list_api_specs.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/list_api_versions.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/list_apis.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/list_artifacts.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/replace_artifact.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/rollback_api_deployment.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/rollback_api_spec.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/tag_api_deployment_revision.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/tag_api_spec_revision.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/update_api.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/update_api_deployment.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/update_api_spec.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/registry/update_api_version.rb delete mode 100644 google-cloud-apigee_registry-v1/snippets/snippet_metadata_google.cloud.apigeeregistry.v1.json delete mode 100644 google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_operations_test.rb delete mode 100644 google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_paths_test.rb delete mode 100644 google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_rest_test.rb delete mode 100644 google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_test.rb delete mode 100644 google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_paths_test.rb delete mode 100644 google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_rest_test.rb delete mode 100644 google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_test.rb delete mode 100644 google-cloud-apigee_registry-v1/test/helper.rb diff --git a/google-cloud-apigee_registry-v1/.OwlBot.yaml b/google-cloud-apigee_registry-v1/.OwlBot.yaml deleted file mode 100644 index 88551cdf69dd..000000000000 --- a/google-cloud-apigee_registry-v1/.OwlBot.yaml +++ /dev/null @@ -1,3 +0,0 @@ -deep-copy-regex: - - source: /google/cloud/apigeeregistry/v1/[^/]+-ruby/(.*) - dest: /owl-bot-staging/google-cloud-apigee_registry-v1/$1 diff --git a/google-cloud-apigee_registry-v1/.gitignore b/google-cloud-apigee_registry-v1/.gitignore deleted file mode 100644 index f08dc5949683..000000000000 --- a/google-cloud-apigee_registry-v1/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -# Ignore bundler lockfiles -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/google-cloud-apigee_registry-v1/.owlbot-manifest.json b/google-cloud-apigee_registry-v1/.owlbot-manifest.json deleted file mode 100644 index 3e13002830c3..000000000000 --- a/google-cloud-apigee_registry-v1/.owlbot-manifest.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "generated": [ - ".gitignore", - ".repo-metadata.json", - ".rubocop.yml", - ".toys.rb", - ".yardopts", - "AUTHENTICATION.md", - "CHANGELOG.md", - "Gemfile", - "LICENSE.md", - "README.md", - "Rakefile", - "gapic_metadata.json", - "google-cloud-apigee_registry-v1.gemspec", - "lib/google-cloud-apigee_registry-v1.rb", - "lib/google/cloud/apigee_registry/v1.rb", - "lib/google/cloud/apigee_registry/v1/bindings_override.rb", - "lib/google/cloud/apigee_registry/v1/provisioning.rb", - "lib/google/cloud/apigee_registry/v1/provisioning/client.rb", - "lib/google/cloud/apigee_registry/v1/provisioning/credentials.rb", - "lib/google/cloud/apigee_registry/v1/provisioning/operations.rb", - "lib/google/cloud/apigee_registry/v1/provisioning/paths.rb", - "lib/google/cloud/apigee_registry/v1/provisioning/rest.rb", - "lib/google/cloud/apigee_registry/v1/provisioning/rest/client.rb", - "lib/google/cloud/apigee_registry/v1/provisioning/rest/operations.rb", - "lib/google/cloud/apigee_registry/v1/provisioning/rest/service_stub.rb", - "lib/google/cloud/apigee_registry/v1/registry.rb", - "lib/google/cloud/apigee_registry/v1/registry/client.rb", - "lib/google/cloud/apigee_registry/v1/registry/credentials.rb", - "lib/google/cloud/apigee_registry/v1/registry/paths.rb", - "lib/google/cloud/apigee_registry/v1/registry/rest.rb", - "lib/google/cloud/apigee_registry/v1/registry/rest/client.rb", - "lib/google/cloud/apigee_registry/v1/registry/rest/service_stub.rb", - "lib/google/cloud/apigee_registry/v1/rest.rb", - "lib/google/cloud/apigee_registry/v1/version.rb", - "lib/google/cloud/apigeeregistry/v1/provisioning_service_pb.rb", - "lib/google/cloud/apigeeregistry/v1/provisioning_service_services_pb.rb", - "lib/google/cloud/apigeeregistry/v1/registry_models_pb.rb", - "lib/google/cloud/apigeeregistry/v1/registry_service_pb.rb", - "lib/google/cloud/apigeeregistry/v1/registry_service_services_pb.rb", - "proto_docs/README.md", - "proto_docs/google/api/client.rb", - "proto_docs/google/api/field_behavior.rb", - "proto_docs/google/api/httpbody.rb", - "proto_docs/google/api/launch_stage.rb", - "proto_docs/google/api/resource.rb", - "proto_docs/google/cloud/apigeeregistry/v1/provisioning_service.rb", - "proto_docs/google/cloud/apigeeregistry/v1/registry_models.rb", - "proto_docs/google/cloud/apigeeregistry/v1/registry_service.rb", - "proto_docs/google/longrunning/operations.rb", - "proto_docs/google/protobuf/any.rb", - "proto_docs/google/protobuf/duration.rb", - "proto_docs/google/protobuf/empty.rb", - "proto_docs/google/protobuf/field_mask.rb", - "proto_docs/google/protobuf/timestamp.rb", - "proto_docs/google/rpc/status.rb", - "proto_docs/google/type/expr.rb", - "snippets/Gemfile", - "snippets/provisioning/create_instance.rb", - "snippets/provisioning/delete_instance.rb", - "snippets/provisioning/get_instance.rb", - "snippets/registry/create_api.rb", - "snippets/registry/create_api_deployment.rb", - "snippets/registry/create_api_spec.rb", - "snippets/registry/create_api_version.rb", - "snippets/registry/create_artifact.rb", - "snippets/registry/delete_api.rb", - "snippets/registry/delete_api_deployment.rb", - "snippets/registry/delete_api_deployment_revision.rb", - "snippets/registry/delete_api_spec.rb", - "snippets/registry/delete_api_spec_revision.rb", - "snippets/registry/delete_api_version.rb", - "snippets/registry/delete_artifact.rb", - "snippets/registry/get_api.rb", - "snippets/registry/get_api_deployment.rb", - "snippets/registry/get_api_spec.rb", - "snippets/registry/get_api_spec_contents.rb", - "snippets/registry/get_api_version.rb", - "snippets/registry/get_artifact.rb", - "snippets/registry/get_artifact_contents.rb", - "snippets/registry/list_api_deployment_revisions.rb", - "snippets/registry/list_api_deployments.rb", - "snippets/registry/list_api_spec_revisions.rb", - "snippets/registry/list_api_specs.rb", - "snippets/registry/list_api_versions.rb", - "snippets/registry/list_apis.rb", - "snippets/registry/list_artifacts.rb", - "snippets/registry/replace_artifact.rb", - "snippets/registry/rollback_api_deployment.rb", - "snippets/registry/rollback_api_spec.rb", - "snippets/registry/tag_api_deployment_revision.rb", - "snippets/registry/tag_api_spec_revision.rb", - "snippets/registry/update_api.rb", - "snippets/registry/update_api_deployment.rb", - "snippets/registry/update_api_spec.rb", - "snippets/registry/update_api_version.rb", - "snippets/snippet_metadata_google.cloud.apigeeregistry.v1.json", - "test/google/cloud/apigee_registry/v1/provisioning_operations_test.rb", - "test/google/cloud/apigee_registry/v1/provisioning_paths_test.rb", - "test/google/cloud/apigee_registry/v1/provisioning_rest_test.rb", - "test/google/cloud/apigee_registry/v1/provisioning_test.rb", - "test/google/cloud/apigee_registry/v1/registry_paths_test.rb", - "test/google/cloud/apigee_registry/v1/registry_rest_test.rb", - "test/google/cloud/apigee_registry/v1/registry_test.rb", - "test/helper.rb" - ], - "static": [ - ".OwlBot.yaml" - ] -} diff --git a/google-cloud-apigee_registry-v1/.repo-metadata.json b/google-cloud-apigee_registry-v1/.repo-metadata.json deleted file mode 100644 index dacb396d313b..000000000000 --- a/google-cloud-apigee_registry-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "apigeeregistry.googleapis.com", - "api_shortname": "apigeeregistry", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-apigee_registry-v1/latest", - "distribution_name": "google-cloud-apigee_registry-v1", - "is_cloud": true, - "language": "ruby", - "name": "apigeeregistry", - "name_pretty": "Apigee Registry V1 API", - "product_documentation": "https://cloud.google.com/apigee/docs/api-hub/get-started-registry-api/", - "release_level": "preview", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Apigee Registry API allows teams to upload and share machine-readable descriptions of APIs that are in use and in development. These descriptions include API specifications in standard formats like OpenAPI, the Google API Discovery Service Format, and the Protocol Buffers Language. These API specifications can be used by tools like linters, browsers, documentation generators, test runners, proxies, and API client and server generators. The Registry API itself can be seen as a machine-readable enterprise API catalog designed to back online directories, portals, and workflow managers. Note that google-cloud-apigee_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-apigee_registry instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/apigee/docs/api-hub/get-started-registry-api/", - "library_type": "GAPIC_AUTO" -} diff --git a/google-cloud-apigee_registry-v1/.rubocop.yml b/google-cloud-apigee_registry-v1/.rubocop.yml deleted file mode 100644 index 5d59c0e0425a..000000000000 --- a/google-cloud-apigee_registry-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-apigee_registry-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-apigee_registry-v1.rb" diff --git a/google-cloud-apigee_registry-v1/.toys.rb b/google-cloud-apigee_registry-v1/.toys.rb deleted file mode 100644 index 23434bdd5d5b..000000000000 --- a/google-cloud-apigee_registry-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2024 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/google-cloud-apigee_registry-v1/.yardopts b/google-cloud-apigee_registry-v1/.yardopts index 5e20653c53b0..7bd54500a375 100644 --- a/google-cloud-apigee_registry-v1/.yardopts +++ b/google-cloud-apigee_registry-v1/.yardopts @@ -1,12 +1,9 @@ --no-private ---title="Apigee Registry V1 API" ---exclude _pb\.rb$ +--title="Obsolete Gem google-cloud-apigee_registry-v1" --markup markdown --markup-provider redcarpet ./lib/**/*.rb -./proto_docs/**/*.rb - README.md LICENSE.md -AUTHENTICATION.md diff --git a/google-cloud-apigee_registry-v1/AUTHENTICATION.md b/google-cloud-apigee_registry-v1/AUTHENTICATION.md deleted file mode 100644 index 8164d590dd10..000000000000 --- a/google-cloud-apigee_registry-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-apigee_registry-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-apigee_registry-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/apigee_registry/v1" - -client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/apigee_registry/v1" - -::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-apigee_registry-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/apigee_registry/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/google-cloud-apigee_registry-v1/CHANGELOG.md b/google-cloud-apigee_registry-v1/CHANGELOG.md deleted file mode 100644 index 7925d62bc6f1..000000000000 --- a/google-cloud-apigee_registry-v1/CHANGELOG.md +++ /dev/null @@ -1,145 +0,0 @@ -# Changelog - -### 0.16.0 (2026-06-11) - -#### Features - -* update gapic-common dependency to 1.3 and document retry jitter ([#34038](https://github.com/googleapis/google-cloud-ruby/issues/34038)) - -### 0.15.0 (2026-04-02) - -#### Features - -* publish client batch config schema ([#33430](https://github.com/googleapis/google-cloud-ruby/issues/33430)) - -### 0.14.0 (2026-03-19) - -#### Features - -* Upgrade dependencies for Ruby v4.0 and drop Ruby v3.1 support - -### 0.13.1 (2025-10-27) - -#### Documentation - -* add warning about loading unvalidated credentials - -### 0.13.0 (2025-10-08) - -#### Features - -* add ListOperations partial success flag ([#31575](https://github.com/googleapis/google-cloud-ruby/issues/31575)) -* add ListOperations unreachable resources - -### 0.12.0 (2025-09-11) - -#### Features - -* update gapic-common dependency for generated libraries to 1.2 which requires google-protobuf v4.26+ - -### 0.11.0 (2025-05-12) - -#### Features - -* Updated core dependencies including gapic-common -* Updated required Ruby version to 3.1 - -### 0.10.1 (2025-04-29) - -#### Bug Fixes - -* Fixed several issues with validating credential configs - -### 0.10.0 (2025-01-28) - -#### Features - -* Update Ruby version requirement to 3.0 -#### Documentation - -* Clarify behavior of protobuf message fields that are part of mutually-exclusive sets -* Include note about validating externally-provided credentials - -### 0.9.0 (2024-12-10) - -#### Features - -* Provide opt-in debug logging - -### 0.8.1 (2024-08-30) - -#### Documentation - -* Add field `experimental_features` to message `PythonSettings` ([#27002](https://github.com/googleapis/google-cloud-ruby/issues/27002)) - -### 0.8.0 (2024-02-26) - -#### Features - -* Updated minimum Ruby version to 2.7 ([#24863](https://github.com/googleapis/google-cloud-ruby/issues/24863)) - -### 0.7.2 (2024-02-01) - -#### Bug Fixes - -* Eliminated a harmless but annoying warning in the protobuf class files - -### 0.7.1 (2024-01-12) - -#### Bug Fixes - -* Ensure endpoints are correct for mixin clients ([#24032](https://github.com/googleapis/google-cloud-ruby/issues/24032)) - -### 0.7.0 (2024-01-11) - -#### Features - -* Support for universe_domain ([#23773](https://github.com/googleapis/google-cloud-ruby/issues/23773)) - -### 0.6.0 (2023-09-12) - -#### Features - -* Support for channel pool configuration ([#22916](https://github.com/googleapis/google-cloud-ruby/issues/22916)) - -### 0.5.0 (2023-06-06) - -#### Features - -* Uses binary protobuf definitions for better forward compatibility ([#21671](https://github.com/googleapis/google-cloud-ruby/issues/21671)) -#### Bug Fixes - -* Don't use self-signed JWT credentials if the global configuration endpoint has been modified - -### 0.4.0 (2023-03-08) - -#### Features - -* Support REST transport ([#20624](https://github.com/googleapis/google-cloud-ruby/issues/20624)) - -### 0.3.1 (2022-09-02) - -#### Bug Fixes - -* Updates to retry delay and retryable error codes ([#19099](https://github.com/googleapis/google-cloud-ruby/issues/19099)) - -### 0.3.0 (2022-08-24) - -#### Features - -* added support for the "force" argument for delete operations ([#19042](https://github.com/googleapis/google-cloud-ruby/issues/19042)) - -### 0.2.0 (2022-07-01) - -#### Features - -* Updated minimum Ruby version to 2.6 ([#18443](https://github.com/googleapis/google-cloud-ruby/issues/18443)) -#### Bug Fixes - -* Fixed a crash when making certain long-running-operations status calls ([#18441](https://github.com/googleapis/google-cloud-ruby/issues/18441)) - -### 0.1.0 (2022-06-22) - -#### Features - -* Initial generation of google-cloud-apigee_registry-v1 diff --git a/google-cloud-apigee_registry-v1/Gemfile b/google-cloud-apigee_registry-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/google-cloud-apigee_registry-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/google-cloud-apigee_registry-v1/Gemfile.lock b/google-cloud-apigee_registry-v1/Gemfile.lock deleted file mode 100644 index 0a2607f06a1d..000000000000 --- a/google-cloud-apigee_registry-v1/Gemfile.lock +++ /dev/null @@ -1,305 +0,0 @@ -PATH - remote: . - specs: - google-cloud-apigee_registry-v1 (0.16.0) - gapic-common (~> 1.3) - google-cloud-errors (~> 1.0) - google-cloud-location (~> 1.0) - google-iam-v1 (~> 1.3) - -GEM - remote: https://rubygems.org/ - specs: - addressable (2.9.0) - public_suffix (>= 2.0.2, < 8.0) - ast (2.4.3) - base64 (0.3.0) - bigdecimal (4.1.2) - drb (2.2.3) - erb (6.0.6) - faraday (2.14.3) - faraday-net_http (>= 2.0, < 3.5) - json - logger - faraday-net_http (3.4.4) - net-http (~> 0.5) - faraday-retry (2.4.0) - faraday (~> 2.0) - gapic-common (1.3.0) - faraday (>= 1.9, < 3.a) - faraday-retry (>= 1.0, < 3.a) - google-cloud-env (~> 2.2) - google-logging-utils (~> 0.1) - google-protobuf (~> 4.26) - googleapis-common-protos (~> 1.6) - googleapis-common-protos-types (~> 1.15) - googleauth (~> 1.12) - grpc (~> 1.66) - google-cloud-env (2.4.0) - base64 (~> 0.2) - faraday (>= 1.0, < 3.a) - google-cloud-errors (1.7.0) - google-cloud-location (1.5.0) - gapic-common (~> 1.3) - google-cloud-errors (~> 1.0) - google-iam-v1 (1.7.0) - gapic-common (~> 1.3) - google-cloud-errors (~> 1.0) - grpc-google-iam-v1 (~> 1.11) - google-logging-utils (0.2.0) - google-protobuf (4.35.1) - bigdecimal - rake (~> 13.3) - google-protobuf (4.35.1-aarch64-linux-gnu) - bigdecimal - rake (~> 13.3) - google-protobuf (4.35.1-aarch64-linux-musl) - bigdecimal - rake (~> 13.3) - google-protobuf (4.35.1-arm64-darwin) - bigdecimal - rake (~> 13.3) - google-protobuf (4.35.1-x86-linux-gnu) - bigdecimal - rake (~> 13.3) - google-protobuf (4.35.1-x86-linux-musl) - bigdecimal - rake (~> 13.3) - google-protobuf (4.35.1-x86_64-darwin) - bigdecimal - rake (~> 13.3) - google-protobuf (4.35.1-x86_64-linux-gnu) - bigdecimal - rake (~> 13.3) - google-protobuf (4.35.1-x86_64-linux-musl) - bigdecimal - rake (~> 13.3) - google-style (1.32.0) - rubocop (~> 1.76) - googleapis-common-protos (1.9.0) - google-protobuf (~> 4.26) - googleapis-common-protos-types (~> 1.21) - grpc (~> 1.41) - googleapis-common-protos-types (1.23.0) - google-protobuf (~> 4.26) - googleauth (1.17.3) - faraday (>= 1.0, < 3.a) - google-cloud-env (~> 2.2) - google-logging-utils (~> 0.1) - jwt (>= 1.4, < 4.0) - os (>= 0.9, < 2.0) - pstore (~> 0.1) - signet (>= 0.16, < 2.a) - grpc (1.83.0) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.83.0-aarch64-linux-gnu) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.83.0-aarch64-linux-musl) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.83.0-arm64-darwin) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.83.0-x86-linux-gnu) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.83.0-x86-linux-musl) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.83.0-x86_64-darwin) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.83.0-x86_64-linux-gnu) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.83.0-x86_64-linux-musl) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc-google-iam-v1 (1.12.0) - google-protobuf (>= 3.18, < 5.a) - googleapis-common-protos (~> 1.9.0) - grpc (~> 1.41) - io-console (0.8.2) - irb (1.18.0) - pp (>= 0.6.0) - prism (>= 1.3.0) - rdoc (>= 4.0.0) - reline (>= 0.4.2) - json (2.21.2) - jwt (3.2.0) - base64 - language_server-protocol (3.17.0.6) - lint_roller (1.1.0) - logger (1.7.0) - minitest (6.0.6) - drb (~> 2.0) - prism (~> 1.5) - minitest-focus (1.4.1) - minitest (> 5.0) - minitest-mock (5.27.0) - minitest-rg (5.4.0) - minitest (>= 5.0, < 7) - net-http (0.9.1) - uri (>= 0.11.1) - os (1.1.4) - ostruct (0.5.5) - parallel (1.28.0) - parser (3.3.12.0) - ast (~> 2.4.1) - racc - pp (0.6.4) - prettyprint - prettyprint (0.2.0) - prism (1.9.0) - pstore (0.2.1) - public_suffix (7.0.5) - racc (1.8.1) - rainbow (3.1.1) - rake (13.4.2) - rbs (4.1.1) - logger - prism (>= 1.6.0) - tsort - rdoc (8.0.0) - erb - prism (>= 1.6.0) - rbs (>= 4.0.0) - tsort - redcarpet (3.6.1) - regexp_parser (2.12.0) - reline (0.6.3) - io-console (~> 0.5) - rubocop (1.88.2) - json (~> 2.3) - language_server-protocol (~> 3.17.0.2) - lint_roller (~> 1.1.0) - parallel (>= 1.10) - parser (>= 3.3.0.2) - rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.49.0, < 2.0) - ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.50.0) - parser (>= 3.3.7.2) - prism (~> 1.7) - ruby-progressbar (1.13.0) - signet (0.22.0) - addressable (~> 2.8) - faraday (>= 0.17.5, < 3.a) - jwt (>= 1.5, < 4.0) - tsort (0.2.0) - unicode-display_width (3.2.0) - unicode-emoji (~> 4.1) - unicode-emoji (4.2.0) - uri (1.1.1) - yard (0.9.45) - -PLATFORMS - aarch64-linux-gnu - aarch64-linux-musl - arm64-darwin - ruby - x86-linux-gnu - x86-linux-musl - x86_64-darwin - x86_64-linux-gnu - x86_64-linux-musl - -DEPENDENCIES - google-cloud-apigee_registry-v1! - google-style (~> 1.32.0) - irb (~> 1.17) - minitest (~> 6.0.2) - minitest-focus (~> 1.4) - minitest-mock (~> 5.27) - minitest-rg (~> 5.3) - ostruct (~> 0.5.5) - rake (>= 13.0) - redcarpet (~> 3.6) - yard (~> 0.9) - -CHECKSUMS - addressable (2.9.0) sha256=7fdf6ac3660f7f4e867a0838be3f6cf722ace541dd97767fa42bc6cfa980c7af - ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383 - base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b - bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd - bundler (4.0.14) sha256=d09a0a965cf772266a7e49e83610be7c2f4e49e61134c42a56804bb383cc24b8 - drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373 - erb (6.0.6) sha256=a9b24986700f5bf127c4f297c5403c3ca41b83b0a316c0cd09a096b56e644ae5 - faraday (2.14.3) sha256=1882247e6766615c8220b4392bf1d27f6ebb63d8e28267587cef1fb0bf37f278 - faraday-net_http (3.4.4) sha256=0e78af151747ed1b00f33e25973b4bc220d7f16c00c39676817c8b12331eb588 - faraday-retry (2.4.0) sha256=7b79c48fb7e56526faf247b12d94a680071ff40c9fda7cf1ec1549439ad11ebe - gapic-common (1.3.0) sha256=4e5d9be1effb7366e2cda13c0f44922285d5613ac8de8b9b18c2c835fe4faa91 - google-cloud-apigee_registry-v1 (0.16.0) - google-cloud-env (2.4.0) sha256=01cb35ecee5d1c4d1cd4deaed8bb5bddc838e296bcc2a35c5d1ddd07ce40d28d - google-cloud-errors (1.7.0) sha256=6e682f42d89aae08689f36f28495de629d756da076bafff0003bac7f8042ebb3 - google-cloud-location (1.5.0) sha256=336f94609b1fb18fce1929048fac964f4d5a87d27c1e5444bfed3605469c7532 - google-iam-v1 (1.7.0) sha256=9e3ea9dcc59cbd5f8d2f62b00da41ec57a2e427b33c0e798207fa06c8fbb8b87 - google-logging-utils (0.2.0) sha256=675462b4ea5affa825a3442694ca2d75d0069455a1d0956127207498fca3df7b - google-protobuf (4.35.1) sha256=a3a6471331d918f58dfa4d014a8f6286f0af2cf4840216bde52fcf2ea3fe3726 - google-protobuf (4.35.1-aarch64-linux-gnu) sha256=50ca44d0eeff3f8475e630a1accdd974256f3510694d574e2c9d6119ea8bc9e1 - google-protobuf (4.35.1-aarch64-linux-musl) sha256=d5c65cef6bd6498a9e5ed5f88cf6cf7e341c10b0a005e32137d5d1a2b6e8c18a - google-protobuf (4.35.1-arm64-darwin) sha256=d9c957df04fa89c749fa9a72a7b383eb4296efc9b2303dc6fd6fbe39c698ad6b - google-protobuf (4.35.1-x86-linux-gnu) sha256=cc7492566b27ad8b5dfa3a7b6f9b11e905050cc53c2fa8ff22de375a9e7a70fb - google-protobuf (4.35.1-x86-linux-musl) sha256=ab403790b59e4dc588ffbed1eaacf05d4ca2f0d12ac9c13d6c64e69380d8c99e - google-protobuf (4.35.1-x86_64-darwin) sha256=66b62b4df00931018a692806df66393efa960d6d2b7da69735187249f950d3ee - google-protobuf (4.35.1-x86_64-linux-gnu) sha256=c786439087512a3fbd199e9897d265b855f951d4027e218ea55e858d45969edd - google-protobuf (4.35.1-x86_64-linux-musl) sha256=91890eb0002934a339fdb7d77a147c46b7474b6799db27872b747b905837f744 - google-style (1.32.0) sha256=3b13068979e5b8caa067ecce9bf818b6cf0e5eb706ead41c5b905f237d9bfb01 - googleapis-common-protos (1.9.0) sha256=207be372d8d25e3876e1e1155d057e14f3c92f8f5428772864a8ce04a0b756e4 - googleapis-common-protos-types (1.23.0) sha256=992e740a523794d9fc5f29a504465d8fc737aaa16c930fe7228e3346860faf0a - googleauth (1.17.3) sha256=9a655455885c0c17a8b70537acd2a992a7c7842c43c06c6612dfb0d93e755d58 - grpc (1.83.0) sha256=38119e7f9f7cbc98e79145201da4be470a7542b0befad454651d35015ea55c59 - grpc (1.83.0-aarch64-linux-gnu) sha256=11562efdded494b2277fd9c3c530dfdf90177faa111526ae9e748d0be29f1a9d - grpc (1.83.0-aarch64-linux-musl) sha256=ee745eab4f3922ed27d379cbc4bc0a99e58db367fa96312e9fe258aafd3afeb2 - grpc (1.83.0-arm64-darwin) sha256=25dd772aa80529f014d70da069787cd39b469c9edacbe493da4ff19952a147e2 - grpc (1.83.0-x86-linux-gnu) sha256=e9b20f54b8e8915f3921f12b266742e79da2c31d60e88295e15d0d16ea3cfd55 - grpc (1.83.0-x86-linux-musl) sha256=868e66d9c2a77eca1a93292fd879565219821fb5888673aedd08154303c9520c - grpc (1.83.0-x86_64-darwin) sha256=cfad91d559d1907159a5247fb12dc112a8ea0ebe2027ca7f5ab648d01a645716 - grpc (1.83.0-x86_64-linux-gnu) sha256=25d66bfa3cb1b05258b3f9632478c7e7ceb52cb16ccc0b4b26d7df36be7158b1 - grpc (1.83.0-x86_64-linux-musl) sha256=a5023264dbb8038c23b147bbf80adb06932ef11b5ab493412e9e37a43114fa8c - grpc-google-iam-v1 (1.12.0) sha256=a70ecad8987e340d5e22e7bf01be31256c84b29a3f78bebd385a4a110e1f2aef - io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc - irb (1.18.0) sha256=de9454a0703a54704b9811a5ef31a60c86949fbf4013fcf244fabc7c775248e3 - json (2.21.2) sha256=1f1d3b7cf2b3ba1a69beca0bb6db13d5438b80bff3cd54cdaaa620b9b07c1c6a - jwt (3.2.0) sha256=5419b1fe37b1da0982bd07051f573a8b8789ab724c2aa7e785e4784a3ed217d7 - language_server-protocol (3.17.0.6) sha256=5ef2c0c138f8267e1bc631d3328347d354f96724b0af22f2c79516120443b7f0 - lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87 - logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203 - minitest (6.0.6) sha256=153ea36d1d987a62942382b61075745042a2b3123b1cd48f4c3675af9cc7d6f1 - minitest-focus (1.4.1) sha256=394517cbe2dcb2d992d8ffc41a3b2b6315777a4daa69239de4fefe7110dd810e - minitest-mock (5.27.0) sha256=7040ed7185417a966920987eaa6eaf1be4ea1fc5b25bb03ff4703f98564a55b0 - minitest-rg (5.4.0) sha256=54d42bb8ce876381245be5866f3c1dd704ef79c06ba5c9ff280c0aa28c56effb - net-http (0.9.1) sha256=25ba0b67c63e89df626ed8fac771d0ad24ad151a858af2cc8e6a716ca4336996 - os (1.1.4) sha256=57816d6a334e7bd6aed048f4b0308226c5fb027433b67d90a9ab435f35108d3f - ostruct (0.5.5) sha256=bc73d0e10f85ca2afdddc7eb79b3132bee622e2281db4e6e033a4cbf7d845efb - parallel (1.28.0) sha256=33e6de1484baf2524792d178b0913fc8eb94c628d6cfe45599ad4458c638c970 - parser (3.3.12.0) sha256=21a6d7f755d5a24dfbdc6e6b772e4e879a52e7631a88bc5a3a134606052c9828 - pp (0.6.4) sha256=dfcb0fce700c41456265922884f9fe195d7fbb0674a3578e6c0f69588e82b570 - prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193 - prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85 - pstore (0.2.1) sha256=03904d0f2c66579e96d1e6704cdabc0c88df7ea8ed8782d9f3569f6f6c702c1a - public_suffix (7.0.5) sha256=1a8bb08f1bbea19228d3bed6e5ed908d1cb4f7c2726d18bd9cadf60bc676f623 - racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f - rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a - rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701 - rbs (4.1.1) sha256=1bf118f2f95d1cd3956357645d495152b661e0257e57781d18ceecd461622b9e - rdoc (8.0.0) sha256=03bf8c08a9639658855a0cfd77c0abca8325c227693f7f33f82957811348c469 - redcarpet (3.6.1) sha256=d444910e6aa55480c6bcdc0cdb057626e8a32c054c29e793fa642ba2f155f445 - regexp_parser (2.12.0) sha256=35a916a1d63190ab5c9009457136ae5f3c0c7512d60291d0d1378ba18ce08ebb - reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835 - rubocop (1.88.2) sha256=8def251c90cd955feb4daa3edc0ab56893250c4ce90ef81e6c80c03f9a939bbf - rubocop-ast (1.50.0) sha256=b9ca88300da0803ee222ad20cdb30494c0a784eed06fdc35d254b06d662788db - ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33 - signet (0.22.0) sha256=b76d495ccb07ad35dbc89f3e920665a9d8ed717141955034005d7843dcfe4780 - tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f - unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42 - unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f - uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6 - yard (0.9.45) sha256=52e211493f7cb8a3ebf7e104a25a1e73937a3103092545d34cb88fafebb3dc51 - -BUNDLED WITH - 4.0.14 diff --git a/google-cloud-apigee_registry-v1/LICENSE.md b/google-cloud-apigee_registry-v1/LICENSE.md index c261857ba6ad..60673914fcc1 100644 --- a/google-cloud-apigee_registry-v1/LICENSE.md +++ b/google-cloud-apigee_registry-v1/LICENSE.md @@ -1,6 +1,6 @@ Apache License Version 2.0, January 2004 - http://www.apache.org/licenses/ + https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION @@ -192,7 +192,7 @@ you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/google-cloud-apigee_registry-v1/README.md b/google-cloud-apigee_registry-v1/README.md index ff5eecdbb140..e6bdf48b2baa 100644 --- a/google-cloud-apigee_registry-v1/README.md +++ b/google-cloud-apigee_registry-v1/README.md @@ -1,154 +1,4 @@ -# Ruby Client for the Apigee Registry V1 API +# Tombstone for Ruby gem google-cloud-apigee_registry-v1 -API Client library for the Apigee Registry V1 API - -The Apigee Registry API allows teams to upload and share machine-readable descriptions of APIs that are in use and in development. These descriptions include API specifications in standard formats like OpenAPI, the Google API Discovery Service Format, and the Protocol Buffers Language. These API specifications can be used by tools like linters, browsers, documentation generators, test runners, proxies, and API client and server generators. The Registry API itself can be seen as a machine-readable enterprise API catalog designed to back online directories, portals, and workflow managers. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Apigee Registry V1 API. Most users should consider using -the main client gem, -[google-cloud-apigee_registry](https://rubygems.org/gems/google-cloud-apigee_registry). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-apigee_registry-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/apigeeregistry.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/apigee_registry/v1" - -client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new -request = ::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new # (request fields as keyword arguments...) -response = client.create_instance request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-apigee_registry-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/apigee/docs/api-hub/get-started-registry-api/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/apigee_registry/v1" -require "logger" - -client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-apigee_registry`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-apigee_registry-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-apigee_registry`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-apigee_registry-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. +This gem is obsolete because the related Google backend is turned down. +For more information, see https://cloud.google.com/terms/deprecation. diff --git a/google-cloud-apigee_registry-v1/Rakefile b/google-cloud-apigee_registry-v1/Rakefile index 17a00c2ca013..bbfd2ee3d1fb 100644 --- a/google-cloud-apigee_registry-v1/Rakefile +++ b/google-cloud-apigee_registry-v1/Rakefile @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,156 +14,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - require "bundler/setup" require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-apigee_registry-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/apigee_registry/v1/provisioning/credentials" - ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-apigee_registry-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-apigee_registry-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-apigee_registry-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-apigee_registry-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-apigee_registry-v1" - header "google-cloud-apigee_registry-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-apigee_registry-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-apigee_registry-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-apigee_registry-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-apigee_registry-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/google-cloud-apigee_registry-v1/gapic_metadata.json b/google-cloud-apigee_registry-v1/gapic_metadata.json deleted file mode 100644 index 3d83788c1234..000000000000 --- a/google-cloud-apigee_registry-v1/gapic_metadata.json +++ /dev/null @@ -1,217 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.apigeeregistry.v1", - "libraryPackage": "::Google::Cloud::ApigeeRegistry::V1", - "services": { - "Provisioning": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client", - "rpcs": { - "CreateInstance": { - "methods": [ - "create_instance" - ] - }, - "DeleteInstance": { - "methods": [ - "delete_instance" - ] - }, - "GetInstance": { - "methods": [ - "get_instance" - ] - } - } - } - } - }, - "Registry": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client", - "rpcs": { - "ListApis": { - "methods": [ - "list_apis" - ] - }, - "GetApi": { - "methods": [ - "get_api" - ] - }, - "CreateApi": { - "methods": [ - "create_api" - ] - }, - "UpdateApi": { - "methods": [ - "update_api" - ] - }, - "DeleteApi": { - "methods": [ - "delete_api" - ] - }, - "ListApiVersions": { - "methods": [ - "list_api_versions" - ] - }, - "GetApiVersion": { - "methods": [ - "get_api_version" - ] - }, - "CreateApiVersion": { - "methods": [ - "create_api_version" - ] - }, - "UpdateApiVersion": { - "methods": [ - "update_api_version" - ] - }, - "DeleteApiVersion": { - "methods": [ - "delete_api_version" - ] - }, - "ListApiSpecs": { - "methods": [ - "list_api_specs" - ] - }, - "GetApiSpec": { - "methods": [ - "get_api_spec" - ] - }, - "GetApiSpecContents": { - "methods": [ - "get_api_spec_contents" - ] - }, - "CreateApiSpec": { - "methods": [ - "create_api_spec" - ] - }, - "UpdateApiSpec": { - "methods": [ - "update_api_spec" - ] - }, - "DeleteApiSpec": { - "methods": [ - "delete_api_spec" - ] - }, - "TagApiSpecRevision": { - "methods": [ - "tag_api_spec_revision" - ] - }, - "ListApiSpecRevisions": { - "methods": [ - "list_api_spec_revisions" - ] - }, - "RollbackApiSpec": { - "methods": [ - "rollback_api_spec" - ] - }, - "DeleteApiSpecRevision": { - "methods": [ - "delete_api_spec_revision" - ] - }, - "ListApiDeployments": { - "methods": [ - "list_api_deployments" - ] - }, - "GetApiDeployment": { - "methods": [ - "get_api_deployment" - ] - }, - "CreateApiDeployment": { - "methods": [ - "create_api_deployment" - ] - }, - "UpdateApiDeployment": { - "methods": [ - "update_api_deployment" - ] - }, - "DeleteApiDeployment": { - "methods": [ - "delete_api_deployment" - ] - }, - "TagApiDeploymentRevision": { - "methods": [ - "tag_api_deployment_revision" - ] - }, - "ListApiDeploymentRevisions": { - "methods": [ - "list_api_deployment_revisions" - ] - }, - "RollbackApiDeployment": { - "methods": [ - "rollback_api_deployment" - ] - }, - "DeleteApiDeploymentRevision": { - "methods": [ - "delete_api_deployment_revision" - ] - }, - "ListArtifacts": { - "methods": [ - "list_artifacts" - ] - }, - "GetArtifact": { - "methods": [ - "get_artifact" - ] - }, - "GetArtifactContents": { - "methods": [ - "get_artifact_contents" - ] - }, - "CreateArtifact": { - "methods": [ - "create_artifact" - ] - }, - "ReplaceArtifact": { - "methods": [ - "replace_artifact" - ] - }, - "DeleteArtifact": { - "methods": [ - "delete_artifact" - ] - } - } - } - } - } - } -} diff --git a/google-cloud-apigee_registry-v1/google-cloud-apigee_registry-v1.gemspec b/google-cloud-apigee_registry-v1/google-cloud-apigee_registry-v1.gemspec index d0a92421ba32..144429932ece 100644 --- a/google-cloud-apigee_registry-v1/google-cloud-apigee_registry-v1.gemspec +++ b/google-cloud-apigee_registry-v1/google-cloud-apigee_registry-v1.gemspec @@ -1,30 +1,27 @@ -# -*- ruby -*- -# encoding: utf-8 - require File.expand_path("lib/google/cloud/apigee_registry/v1/version", __dir__) Gem::Specification.new do |gem| - gem.name = "google-cloud-apigee_registry-v1" - gem.version = Google::Cloud::ApigeeRegistry::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Apigee Registry API allows teams to upload and share machine-readable descriptions of APIs that are in use and in development. These descriptions include API specifications in standard formats like OpenAPI, the Google API Discovery Service Format, and the Protocol Buffers Language. These API specifications can be used by tools like linters, browsers, documentation generators, test runners, proxies, and API client and server generators. The Registry API itself can be seen as a machine-readable enterprise API catalog designed to back online directories, portals, and workflow managers. Note that google-cloud-apigee_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-apigee_registry instead. See the readme for more details." - gem.summary = "API Client library for the Apigee Registry V1 API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" + gem.name = "google-cloud-apigee_registry-v1" + gem.version = Google::Cloud::ApigeeRegistry::V1::VERSION + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = + "This gem is obsolete because the related Google backend is turned down. " \ + "For more information, see https://cloud.google.com/terms/deprecation." + gem.summary = "This gem is obsolete because the related backend is turned down." + gem.post_install_message = <<~MESSAGE - gem.platform = Gem::Platform::RUBY + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + The google-cloud-apigee_registry-v1 gem is OBSOLETE. + For more information, see: + https://cloud.google.com/terms/deprecation + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + MESSAGE + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + gem.platform = Gem::Platform::RUBY + gem.files = ["README.md", "LICENSE.md", ".yardopts", "lib/google/cloud/apigee_registry/v1/version.rb"] gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" + gem.required_ruby_version = ">= 3.0" end diff --git a/google-cloud-apigee_registry-v1/lib/google-cloud-apigee_registry-v1.rb b/google-cloud-apigee_registry-v1/lib/google-cloud-apigee_registry-v1.rb deleted file mode 100644 index 52455507afff..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google-cloud-apigee_registry-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/apigee_registry/v1" diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1.rb deleted file mode 100644 index 8c0374af71aa..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/apigee_registry/v1/provisioning" -require "google/cloud/apigee_registry/v1/registry" -require "google/cloud/apigee_registry/v1/version" - -module Google - module Cloud - module ApigeeRegistry - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/apigee_registry/v1" - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/apigee_registry/v1" - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/apigee_registry/v1/_helpers" if ::File.file? helper_path diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/bindings_override.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/bindings_override.rb deleted file mode 100644 index ce1c18a81ea6..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/bindings_override.rb +++ /dev/null @@ -1,324 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module ApigeeRegistry - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/apigee_registry/v1/rest" - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ApigeeRegistry"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/runtime/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/runtime/?$}, false] - ], - body: "*" - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/runtime/?$}, false] - ], - body: "*" - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning.rb deleted file mode 100644 index ff56c1990fd9..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/apigee_registry/v1/version" - -require "google/cloud/apigee_registry/v1/provisioning/credentials" -require "google/cloud/apigee_registry/v1/provisioning/paths" -require "google/cloud/apigee_registry/v1/provisioning/operations" -require "google/cloud/apigee_registry/v1/provisioning/client" -require "google/cloud/apigee_registry/v1/provisioning/rest" - -module Google - module Cloud - module ApigeeRegistry - module V1 - ## - # The service that is used for managing the data plane provisioning of the - # Registry. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/apigee_registry/v1/provisioning" - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/apigee_registry/v1/provisioning/rest" - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new - # - module Provisioning - end - end - end - end -end - -helper_path = ::File.join __dir__, "provisioning", "helpers.rb" -require "google/cloud/apigee_registry/v1/provisioning/helpers" if ::File.file? helper_path diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/client.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/client.rb deleted file mode 100644 index 212298110280..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/client.rb +++ /dev/null @@ -1,732 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/apigeeregistry/v1/provisioning_service_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Provisioning - ## - # Client for the Provisioning service. - # - # The service that is used for managing the data plane provisioning of the - # Registry. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apigeeregistry.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :provisioning_stub - - ## - # Configure the Provisioning Client class. - # - # See {::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Provisioning clients - # ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ApigeeRegistry", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Provisioning Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @provisioning_stub.universe_domain - end - - ## - # Create a new Provisioning client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Provisioning client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/apigeeregistry/v1/provisioning_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @provisioning_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @provisioning_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @provisioning_stub.endpoint - config.universe_domain = @provisioning_stub.universe_domain - config.logger = @provisioning_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @provisioning_stub.endpoint - config.universe_domain = @provisioning_stub.universe_domain - config.logger = @provisioning_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @provisioning_stub.logger - end - - # Service calls - - ## - # Provisions instance resources for the Registry. - # - # @overload create_instance(request, options = nil) - # Pass arguments to `create_instance` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_instance(parent: nil, instance_id: nil, instance: nil) - # Pass arguments to `create_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource of the Instance, of the form: `projects/*/locations/*` - # @param instance_id [::String] - # Required. Identifier to assign to the Instance. Must be unique within scope of the - # parent resource. - # @param instance [::Google::Cloud::ApigeeRegistry::V1::Instance, ::Hash] - # Required. The Instance. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new - # - # # Call the create_instance method. - # result = client.create_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @provisioning_stub.call_rpc :create_instance, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the Registry instance. - # - # @overload delete_instance(request, options = nil) - # Pass arguments to `delete_instance` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_instance(name: nil) - # Pass arguments to `delete_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the Instance to delete. - # Format: `projects/*/locations/*/instances/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.new - # - # # Call the delete_instance method. - # result = client.delete_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @provisioning_stub.call_rpc :delete_instance, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Instance. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_instance(name: nil) - # Pass arguments to `get_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the Instance to retrieve. - # Format: `projects/*/locations/*/instances/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Instance] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Instance] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Instance. - # p result - # - def get_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @provisioning_stub.call_rpc :get_instance, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Provisioning API. - # - # This class represents the configuration for Provisioning, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_instance to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_instance.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_instance.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "apigeeregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Provisioning API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :create_instance - ## - # RPC-specific configuration for `delete_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_instance - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - - # @private - def initialize parent_rpcs = nil - create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance - @create_instance = ::Gapic::Config::Method.new create_instance_config - delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance - @delete_instance = ::Gapic::Config::Method.new delete_instance_config - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/credentials.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/credentials.rb deleted file mode 100644 index 213a5d5b12fa..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Provisioning - # Credentials for the Provisioning API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/operations.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/operations.rb deleted file mode 100644 index 26abb8d4f1d8..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/operations.rb +++ /dev/null @@ -1,843 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Provisioning - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apigeeregistry.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Provisioning Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the Provisioning Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "apigeeregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/paths.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/paths.rb deleted file mode 100644 index 28b2bef1487d..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/paths.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Provisioning - # Path helper methods for the Provisioning API. - module Paths - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest.rb deleted file mode 100644 index 73dc990b680e..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/apigee_registry/v1/version" -require "google/cloud/apigee_registry/v1/bindings_override" - -require "google/cloud/apigee_registry/v1/provisioning/credentials" -require "google/cloud/apigee_registry/v1/provisioning/paths" -require "google/cloud/apigee_registry/v1/provisioning/rest/operations" -require "google/cloud/apigee_registry/v1/provisioning/rest/client" - -module Google - module Cloud - module ApigeeRegistry - module V1 - ## - # The service that is used for managing the data plane provisioning of the - # Registry. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/apigee_registry/v1/provisioning/rest" - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new - # - module Provisioning - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/apigee_registry/v1/provisioning/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/client.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/client.rb deleted file mode 100644 index 368eae8fcdb7..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/client.rb +++ /dev/null @@ -1,677 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/apigeeregistry/v1/provisioning_service_pb" -require "google/cloud/apigee_registry/v1/provisioning/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Provisioning - module Rest - ## - # REST client for the Provisioning service. - # - # The service that is used for managing the data plane provisioning of the - # Registry. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apigeeregistry.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :provisioning_stub - - ## - # Configure the Provisioning Client class. - # - # See {::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Provisioning clients - # ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ApigeeRegistry", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Provisioning Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @provisioning_stub.universe_domain - end - - ## - # Create a new Provisioning REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Provisioning client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @provisioning_stub = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @provisioning_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @provisioning_stub.endpoint - config.universe_domain = @provisioning_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @provisioning_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @provisioning_stub.endpoint - config.universe_domain = @provisioning_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @provisioning_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @provisioning_stub.logger - end - - # Service calls - - ## - # Provisions instance resources for the Registry. - # - # @overload create_instance(request, options = nil) - # Pass arguments to `create_instance` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_instance(parent: nil, instance_id: nil, instance: nil) - # Pass arguments to `create_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource of the Instance, of the form: `projects/*/locations/*` - # @param instance_id [::String] - # Required. Identifier to assign to the Instance. Must be unique within scope of the - # parent resource. - # @param instance [::Google::Cloud::ApigeeRegistry::V1::Instance, ::Hash] - # Required. The Instance. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new - # - # # Call the create_instance method. - # result = client.create_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @provisioning_stub.create_instance request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the Registry instance. - # - # @overload delete_instance(request, options = nil) - # Pass arguments to `delete_instance` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_instance(name: nil) - # Pass arguments to `delete_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the Instance to delete. - # Format: `projects/*/locations/*/instances/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.new - # - # # Call the delete_instance method. - # result = client.delete_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @provisioning_stub.delete_instance request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Instance. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_instance(name: nil) - # Pass arguments to `get_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the Instance to retrieve. - # Format: `projects/*/locations/*/instances/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Instance] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Instance. - # p result - # - def get_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @provisioning_stub.get_instance request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Provisioning REST API. - # - # This class represents the configuration for Provisioning REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_instance to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_instance.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_instance.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "apigeeregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Provisioning API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :create_instance - ## - # RPC-specific configuration for `delete_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_instance - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - - # @private - def initialize parent_rpcs = nil - create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance - @create_instance = ::Gapic::Config::Method.new create_instance_config - delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance - @delete_instance = ::Gapic::Config::Method.new delete_instance_config - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/operations.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/operations.rb deleted file mode 100644 index 1950f319b3e8..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/operations.rb +++ /dev/null @@ -1,927 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Provisioning - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apigeeregistry.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Provisioning Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the Provisioning Operations instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "apigeeregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/service_stub.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/service_stub.rb deleted file mode 100644 index a245efe39a95..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/provisioning/rest/service_stub.rb +++ /dev/null @@ -1,265 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/apigeeregistry/v1/provisioning_service_pb" - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Provisioning - module Rest - ## - # REST service stub for the Provisioning service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_instance REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_instance REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_instance REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Instance] - # A result object deserialized from the server's reply - def get_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::Instance.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_instance REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/instances", - body: "instance", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_instance REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_instance REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry.rb deleted file mode 100644 index 9db29fd5bbe7..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/apigee_registry/v1/version" - -require "google/cloud/apigee_registry/v1/registry/credentials" -require "google/cloud/apigee_registry/v1/registry/paths" -require "google/cloud/apigee_registry/v1/registry/client" -require "google/cloud/apigee_registry/v1/registry/rest" - -module Google - module Cloud - module ApigeeRegistry - module V1 - ## - # The Registry service allows teams to manage descriptions of APIs. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/apigee_registry/v1/registry" - # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/apigee_registry/v1/registry/rest" - # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - module Registry - end - end - end - end -end - -helper_path = ::File.join __dir__, "registry", "helpers.rb" -require "google/cloud/apigee_registry/v1/registry/helpers" if ::File.file? helper_path diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/client.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/client.rb deleted file mode 100644 index 9cedf487b5f3..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/client.rb +++ /dev/null @@ -1,4097 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/apigeeregistry/v1/registry_service_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Registry - ## - # Client for the Registry service. - # - # The Registry service allows teams to manage descriptions of APIs. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apigeeregistry.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :registry_stub - - ## - # Configure the Registry Client class. - # - # See {::Google::Cloud::ApigeeRegistry::V1::Registry::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Registry clients - # ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ApigeeRegistry", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_apis.timeout = 60.0 - default_config.rpcs.list_apis.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api.timeout = 60.0 - default_config.rpcs.get_api.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_api.timeout = 60.0 - default_config.rpcs.create_api.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.update_api.timeout = 60.0 - default_config.rpcs.update_api.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_api.timeout = 60.0 - default_config.rpcs.delete_api.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_versions.timeout = 60.0 - default_config.rpcs.list_api_versions.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api_version.timeout = 60.0 - default_config.rpcs.get_api_version.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_api_version.timeout = 60.0 - default_config.rpcs.create_api_version.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.update_api_version.timeout = 60.0 - default_config.rpcs.update_api_version.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_api_version.timeout = 60.0 - default_config.rpcs.delete_api_version.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_specs.timeout = 60.0 - default_config.rpcs.list_api_specs.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api_spec.timeout = 60.0 - default_config.rpcs.get_api_spec.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api_spec_contents.timeout = 60.0 - default_config.rpcs.get_api_spec_contents.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_api_spec.timeout = 60.0 - default_config.rpcs.create_api_spec.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.update_api_spec.timeout = 60.0 - default_config.rpcs.update_api_spec.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_api_spec.timeout = 60.0 - default_config.rpcs.delete_api_spec.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.tag_api_spec_revision.timeout = 60.0 - default_config.rpcs.tag_api_spec_revision.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_spec_revisions.timeout = 60.0 - default_config.rpcs.list_api_spec_revisions.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.rollback_api_spec.timeout = 60.0 - - default_config.rpcs.delete_api_spec_revision.timeout = 60.0 - default_config.rpcs.delete_api_spec_revision.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_deployments.timeout = 60.0 - default_config.rpcs.list_api_deployments.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api_deployment.timeout = 60.0 - default_config.rpcs.get_api_deployment.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_api_deployment.timeout = 60.0 - default_config.rpcs.create_api_deployment.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.update_api_deployment.timeout = 60.0 - default_config.rpcs.update_api_deployment.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_api_deployment.timeout = 60.0 - default_config.rpcs.delete_api_deployment.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.tag_api_deployment_revision.timeout = 60.0 - default_config.rpcs.tag_api_deployment_revision.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_deployment_revisions.timeout = 60.0 - default_config.rpcs.list_api_deployment_revisions.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.rollback_api_deployment.timeout = 60.0 - - default_config.rpcs.delete_api_deployment_revision.timeout = 60.0 - default_config.rpcs.delete_api_deployment_revision.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_artifacts.timeout = 60.0 - default_config.rpcs.list_artifacts.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_artifact.timeout = 60.0 - default_config.rpcs.get_artifact.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_artifact_contents.timeout = 60.0 - default_config.rpcs.get_artifact_contents.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_artifact.timeout = 60.0 - default_config.rpcs.create_artifact.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.replace_artifact.timeout = 60.0 - default_config.rpcs.replace_artifact.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_artifact.timeout = 60.0 - default_config.rpcs.delete_artifact.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Registry Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ApigeeRegistry::V1::Registry::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @registry_stub.universe_domain - end - - ## - # Create a new Registry client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Registry client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/apigeeregistry/v1/registry_service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @registry_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::ApigeeRegistry::V1::Registry::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @registry_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @registry_stub.endpoint - config.universe_domain = @registry_stub.universe_domain - config.logger = @registry_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @registry_stub.endpoint - config.universe_domain = @registry_stub.universe_domain - config.logger = @registry_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @registry_stub.logger - end - - # Service calls - - ## - # Returns matching APIs. - # - # @overload list_apis(request, options = nil) - # Pass arguments to `list_apis` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApisRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApisRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_apis(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_apis` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of APIs. - # Format: `projects/*/locations/*` - # @param page_size [::Integer] - # The maximum number of APIs to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListApis` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApis` must match - # the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Api>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Api>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApisRequest.new - # - # # Call the list_apis method. - # result = client.list_apis request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Api. - # p item - # end - # - def list_apis request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_apis.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_apis.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_apis.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :list_apis, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @registry_stub, :list_apis, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a specified API. - # - # @overload get_api(request, options = nil) - # Pass arguments to `get_api` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_api(name: nil) - # Pass arguments to `get_api` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the API to retrieve. - # Format: `projects/*/locations/*/apis/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Api] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new - # - # # Call the get_api method. - # result = client.get_api request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. - # p result - # - def get_api request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_api.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_api.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_api.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :get_api, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a specified API. - # - # @overload create_api(request, options = nil) - # Pass arguments to `create_api` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_api(parent: nil, api: nil, api_id: nil) - # Pass arguments to `create_api` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of APIs. - # Format: `projects/*/locations/*` - # @param api [::Google::Cloud::ApigeeRegistry::V1::Api, ::Hash] - # Required. The API to create. - # @param api_id [::String] - # Required. The ID to use for the API, which will become the final component of - # the API's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Api] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new - # - # # Call the create_api method. - # result = client.create_api request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. - # p result - # - def create_api request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_api.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_api.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_api.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :create_api, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to modify a specified API. - # - # @overload update_api(request, options = nil) - # Pass arguments to `update_api` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_api(api: nil, update_mask: nil, allow_missing: nil) - # Pass arguments to `update_api` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param api [::Google::Cloud::ApigeeRegistry::V1::Api, ::Hash] - # Required. The API to update. - # - # The `name` field is used to identify the API to update. - # Format: `projects/*/locations/*/apis/*` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @param allow_missing [::Boolean] - # If set to true, and the API is not found, a new API will be created. - # In this situation, `update_mask` is ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Api] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new - # - # # Call the update_api method. - # result = client.update_api request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. - # p result - # - def update_api request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_api.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.api&.name - header_params["api.name"] = request.api.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_api.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_api.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :update_api, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified API and all of the resources that it - # owns. - # - # @overload delete_api(request, options = nil) - # Pass arguments to `delete_api` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_api(name: nil, force: nil) - # Pass arguments to `delete_api` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the API to delete. - # Format: `projects/*/locations/*/apis/*` - # @param force [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.new - # - # # Call the delete_api method. - # result = client.delete_api request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_api request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_api.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_api.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_api.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :delete_api, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns matching versions. - # - # @overload list_api_versions(request, options = nil) - # Pass arguments to `list_api_versions` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_api_versions(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_api_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of versions. - # Format: `projects/*/locations/*/apis/*` - # @param page_size [::Integer] - # The maximum number of versions to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListApiVersions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApiVersions` must - # match the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.new - # - # # Call the list_api_versions method. - # result = client.list_api_versions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiVersion. - # p item - # end - # - def list_api_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_api_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_api_versions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_api_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :list_api_versions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_versions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a specified version. - # - # @overload get_api_version(request, options = nil) - # Pass arguments to `get_api_version` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_api_version(name: nil) - # Pass arguments to `get_api_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the version to retrieve. - # Format: `projects/*/locations/*/apis/*/versions/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new - # - # # Call the get_api_version method. - # result = client.get_api_version request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. - # p result - # - def get_api_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_api_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_api_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_api_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :get_api_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a specified version. - # - # @overload create_api_version(request, options = nil) - # Pass arguments to `create_api_version` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_api_version(parent: nil, api_version: nil, api_version_id: nil) - # Pass arguments to `create_api_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of versions. - # Format: `projects/*/locations/*/apis/*` - # @param api_version [::Google::Cloud::ApigeeRegistry::V1::ApiVersion, ::Hash] - # Required. The version to create. - # @param api_version_id [::String] - # Required. The ID to use for the version, which will become the final component of - # the version's resource name. - # - # This value should be 1-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new - # - # # Call the create_api_version method. - # result = client.create_api_version request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. - # p result - # - def create_api_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_api_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_api_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_api_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :create_api_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to modify a specified version. - # - # @overload update_api_version(request, options = nil) - # Pass arguments to `update_api_version` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_api_version(api_version: nil, update_mask: nil, allow_missing: nil) - # Pass arguments to `update_api_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param api_version [::Google::Cloud::ApigeeRegistry::V1::ApiVersion, ::Hash] - # Required. The version to update. - # - # The `name` field is used to identify the version to update. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @param allow_missing [::Boolean] - # If set to true, and the version is not found, a new version will be - # created. In this situation, `update_mask` is ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new - # - # # Call the update_api_version method. - # result = client.update_api_version request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. - # p result - # - def update_api_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_api_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.api_version&.name - header_params["api_version.name"] = request.api_version.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_api_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_api_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :update_api_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified version and all of the resources that - # it owns. - # - # @overload delete_api_version(request, options = nil) - # Pass arguments to `delete_api_version` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_api_version(name: nil, force: nil) - # Pass arguments to `delete_api_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the version to delete. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @param force [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.new - # - # # Call the delete_api_version method. - # result = client.delete_api_version request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_api_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_api_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_api_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_api_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :delete_api_version, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns matching specs. - # - # @overload list_api_specs(request, options = nil) - # Pass arguments to `list_api_specs` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_api_specs(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_api_specs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of specs. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @param page_size [::Integer] - # The maximum number of specs to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListApiSpecs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApiSpecs` must match - # the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields except contents. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.new - # - # # Call the list_api_specs method. - # result = client.list_api_specs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p item - # end - # - def list_api_specs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_api_specs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_api_specs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_api_specs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :list_api_specs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_specs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a specified spec. - # - # @overload get_api_spec(request, options = nil) - # Pass arguments to `get_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_api_spec(name: nil) - # Pass arguments to `get_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec to retrieve. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new - # - # # Call the get_api_spec method. - # result = client.get_api_spec request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def get_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_api_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :get_api_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the contents of a specified spec. - # If specs are stored with GZip compression, the default behavior - # is to return the spec uncompressed (the mime_type response field - # indicates the exact format returned). - # - # @overload get_api_spec_contents(request, options = nil) - # Pass arguments to `get_api_spec_contents` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_api_spec_contents(name: nil) - # Pass arguments to `get_api_spec_contents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec whose contents should be retrieved. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Api::HttpBody] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Api::HttpBody] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new - # - # # Call the get_api_spec_contents method. - # result = client.get_api_spec_contents request - # - # # The returned object is of type Google::Api::HttpBody. - # p result - # - def get_api_spec_contents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_api_spec_contents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_api_spec_contents.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_api_spec_contents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :get_api_spec_contents, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a specified spec. - # - # @overload create_api_spec(request, options = nil) - # Pass arguments to `create_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_api_spec(parent: nil, api_spec: nil, api_spec_id: nil) - # Pass arguments to `create_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of specs. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @param api_spec [::Google::Cloud::ApigeeRegistry::V1::ApiSpec, ::Hash] - # Required. The spec to create. - # @param api_spec_id [::String] - # Required. The ID to use for the spec, which will become the final component of - # the spec's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new - # - # # Call the create_api_spec method. - # result = client.create_api_spec request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def create_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_api_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :create_api_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to modify a specified spec. - # - # @overload update_api_spec(request, options = nil) - # Pass arguments to `update_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_api_spec(api_spec: nil, update_mask: nil, allow_missing: nil) - # Pass arguments to `update_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param api_spec [::Google::Cloud::ApigeeRegistry::V1::ApiSpec, ::Hash] - # Required. The spec to update. - # - # The `name` field is used to identify the spec to update. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @param allow_missing [::Boolean] - # If set to true, and the spec is not found, a new spec will be created. - # In this situation, `update_mask` is ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new - # - # # Call the update_api_spec method. - # result = client.update_api_spec request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def update_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.api_spec&.name - header_params["api_spec.name"] = request.api_spec.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_api_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :update_api_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified spec, all revisions, and all child - # resources (e.g., artifacts). - # - # @overload delete_api_spec(request, options = nil) - # Pass arguments to `delete_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_api_spec(name: nil, force: nil) - # Pass arguments to `delete_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec to delete. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # @param force [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.new - # - # # Call the delete_api_spec method. - # result = client.delete_api_spec request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_api_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :delete_api_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Adds a tag to a specified revision of a spec. - # - # @overload tag_api_spec_revision(request, options = nil) - # Pass arguments to `tag_api_spec_revision` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload tag_api_spec_revision(name: nil, tag: nil) - # Pass arguments to `tag_api_spec_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec to be tagged, including the revision ID. - # @param tag [::String] - # Required. The tag to apply. - # The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new - # - # # Call the tag_api_spec_revision method. - # result = client.tag_api_spec_revision request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def tag_api_spec_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.tag_api_spec_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.tag_api_spec_revision.timeout, - metadata: metadata, - retry_policy: @config.rpcs.tag_api_spec_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :tag_api_spec_revision, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all revisions of a spec. - # Revisions are returned in descending order of revision creation time. - # - # @overload list_api_spec_revisions(request, options = nil) - # Pass arguments to `list_api_spec_revisions` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_api_spec_revisions(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_api_spec_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec to list revisions for. - # @param page_size [::Integer] - # The maximum number of revisions to return per page. - # @param page_token [::String] - # The page token, received from a previous ListApiSpecRevisions call. - # Provide this to retrieve the subsequent page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.new - # - # # Call the list_api_spec_revisions method. - # result = client.list_api_spec_revisions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p item - # end - # - def list_api_spec_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_api_spec_revisions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_api_spec_revisions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_api_spec_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :list_api_spec_revisions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_spec_revisions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the current revision to a specified prior revision. - # Note that this creates a new revision with a new revision ID. - # - # @overload rollback_api_spec(request, options = nil) - # Pass arguments to `rollback_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload rollback_api_spec(name: nil, revision_id: nil) - # Pass arguments to `rollback_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The spec being rolled back. - # @param revision_id [::String] - # Required. The revision ID to roll back to. - # It must be a revision of the same spec. - # - # Example: `c7cfa2a8` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.new - # - # # Call the rollback_api_spec method. - # result = client.rollback_api_spec request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def rollback_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.rollback_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.rollback_api_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.rollback_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :rollback_api_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a revision of a spec. - # - # @overload delete_api_spec_revision(request, options = nil) - # Pass arguments to `delete_api_spec_revision` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_api_spec_revision(name: nil) - # Pass arguments to `delete_api_spec_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec revision to be deleted, - # with a revision ID explicitly included. - # - # Example: - # `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new - # - # # Call the delete_api_spec_revision method. - # result = client.delete_api_spec_revision request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def delete_api_spec_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_api_spec_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_api_spec_revision.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_api_spec_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :delete_api_spec_revision, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns matching deployments. - # - # @overload list_api_deployments(request, options = nil) - # Pass arguments to `list_api_deployments` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_api_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_api_deployments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of deployments. - # Format: `projects/*/locations/*/apis/*` - # @param page_size [::Integer] - # The maximum number of deployments to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListApiDeployments` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApiDeployments` must - # match the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.new - # - # # Call the list_api_deployments method. - # result = client.list_api_deployments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p item - # end - # - def list_api_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_api_deployments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_api_deployments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_api_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :list_api_deployments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_deployments, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a specified deployment. - # - # @overload get_api_deployment(request, options = nil) - # Pass arguments to `get_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_api_deployment(name: nil) - # Pass arguments to `get_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment to retrieve. - # Format: `projects/*/locations/*/apis/*/deployments/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new - # - # # Call the get_api_deployment method. - # result = client.get_api_deployment request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def get_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_api_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :get_api_deployment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a specified deployment. - # - # @overload create_api_deployment(request, options = nil) - # Pass arguments to `create_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_api_deployment(parent: nil, api_deployment: nil, api_deployment_id: nil) - # Pass arguments to `create_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of deployments. - # Format: `projects/*/locations/*/apis/*` - # @param api_deployment [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment, ::Hash] - # Required. The deployment to create. - # @param api_deployment_id [::String] - # Required. The ID to use for the deployment, which will become the final component of - # the deployment's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new - # - # # Call the create_api_deployment method. - # result = client.create_api_deployment request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def create_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_api_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :create_api_deployment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to modify a specified deployment. - # - # @overload update_api_deployment(request, options = nil) - # Pass arguments to `update_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_api_deployment(api_deployment: nil, update_mask: nil, allow_missing: nil) - # Pass arguments to `update_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param api_deployment [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment, ::Hash] - # Required. The deployment to update. - # - # The `name` field is used to identify the deployment to update. - # Format: `projects/*/locations/*/apis/*/deployments/*` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @param allow_missing [::Boolean] - # If set to true, and the deployment is not found, a new deployment will be - # created. In this situation, `update_mask` is ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new - # - # # Call the update_api_deployment method. - # result = client.update_api_deployment request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def update_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.api_deployment&.name - header_params["api_deployment.name"] = request.api_deployment.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_api_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :update_api_deployment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified deployment, all revisions, and all - # child resources (e.g., artifacts). - # - # @overload delete_api_deployment(request, options = nil) - # Pass arguments to `delete_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_api_deployment(name: nil, force: nil) - # Pass arguments to `delete_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment to delete. - # Format: `projects/*/locations/*/apis/*/deployments/*` - # @param force [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.new - # - # # Call the delete_api_deployment method. - # result = client.delete_api_deployment request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_api_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :delete_api_deployment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Adds a tag to a specified revision of a - # deployment. - # - # @overload tag_api_deployment_revision(request, options = nil) - # Pass arguments to `tag_api_deployment_revision` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload tag_api_deployment_revision(name: nil, tag: nil) - # Pass arguments to `tag_api_deployment_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment to be tagged, including the revision ID. - # @param tag [::String] - # Required. The tag to apply. - # The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new - # - # # Call the tag_api_deployment_revision method. - # result = client.tag_api_deployment_revision request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def tag_api_deployment_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.tag_api_deployment_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.tag_api_deployment_revision.timeout, - metadata: metadata, - retry_policy: @config.rpcs.tag_api_deployment_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :tag_api_deployment_revision, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all revisions of a deployment. - # Revisions are returned in descending order of revision creation time. - # - # @overload list_api_deployment_revisions(request, options = nil) - # Pass arguments to `list_api_deployment_revisions` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_api_deployment_revisions(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_api_deployment_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment to list revisions for. - # @param page_size [::Integer] - # The maximum number of revisions to return per page. - # @param page_token [::String] - # The page token, received from a previous ListApiDeploymentRevisions call. - # Provide this to retrieve the subsequent page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.new - # - # # Call the list_api_deployment_revisions method. - # result = client.list_api_deployment_revisions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p item - # end - # - def list_api_deployment_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_api_deployment_revisions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_api_deployment_revisions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_api_deployment_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :list_api_deployment_revisions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @registry_stub, :list_api_deployment_revisions, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the current revision to a specified prior - # revision. Note that this creates a new revision with a new revision ID. - # - # @overload rollback_api_deployment(request, options = nil) - # Pass arguments to `rollback_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload rollback_api_deployment(name: nil, revision_id: nil) - # Pass arguments to `rollback_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The deployment being rolled back. - # @param revision_id [::String] - # Required. The revision ID to roll back to. - # It must be a revision of the same deployment. - # - # Example: `c7cfa2a8` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.new - # - # # Call the rollback_api_deployment method. - # result = client.rollback_api_deployment request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def rollback_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.rollback_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.rollback_api_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.rollback_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :rollback_api_deployment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a revision of a deployment. - # - # @overload delete_api_deployment_revision(request, options = nil) - # Pass arguments to `delete_api_deployment_revision` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_api_deployment_revision(name: nil) - # Pass arguments to `delete_api_deployment_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment revision to be deleted, - # with a revision ID explicitly included. - # - # Example: - # `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new - # - # # Call the delete_api_deployment_revision method. - # result = client.delete_api_deployment_revision request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def delete_api_deployment_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_api_deployment_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_api_deployment_revision.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_api_deployment_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :delete_api_deployment_revision, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns matching artifacts. - # - # @overload list_artifacts(request, options = nil) - # Pass arguments to `list_artifacts` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_artifacts(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of artifacts. - # Format: `{parent}` - # @param page_size [::Integer] - # The maximum number of artifacts to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListArtifacts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListArtifacts` must - # match the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields except contents. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Artifact>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Artifact>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.new - # - # # Call the list_artifacts method. - # result = client.list_artifacts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Artifact. - # p item - # end - # - def list_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_artifacts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :list_artifacts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @registry_stub, :list_artifacts, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a specified artifact. - # - # @overload get_artifact(request, options = nil) - # Pass arguments to `get_artifact` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_artifact(name: nil) - # Pass arguments to `get_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the artifact to retrieve. - # Format: `{parent}/artifacts/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new - # - # # Call the get_artifact method. - # result = client.get_artifact request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. - # p result - # - def get_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_artifact.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :get_artifact, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the contents of a specified artifact. - # If artifacts are stored with GZip compression, the default behavior - # is to return the artifact uncompressed (the mime_type response field - # indicates the exact format returned). - # - # @overload get_artifact_contents(request, options = nil) - # Pass arguments to `get_artifact_contents` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_artifact_contents(name: nil) - # Pass arguments to `get_artifact_contents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the artifact whose contents should be retrieved. - # Format: `{parent}/artifacts/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Api::HttpBody] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Api::HttpBody] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new - # - # # Call the get_artifact_contents method. - # result = client.get_artifact_contents request - # - # # The returned object is of type Google::Api::HttpBody. - # p result - # - def get_artifact_contents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_artifact_contents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_artifact_contents.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_artifact_contents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :get_artifact_contents, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a specified artifact. - # - # @overload create_artifact(request, options = nil) - # Pass arguments to `create_artifact` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_artifact(parent: nil, artifact: nil, artifact_id: nil) - # Pass arguments to `create_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of artifacts. - # Format: `{parent}` - # @param artifact [::Google::Cloud::ApigeeRegistry::V1::Artifact, ::Hash] - # Required. The artifact to create. - # @param artifact_id [::String] - # Required. The ID to use for the artifact, which will become the final component of - # the artifact's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new - # - # # Call the create_artifact method. - # result = client.create_artifact request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. - # p result - # - def create_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_artifact.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :create_artifact, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to replace a specified artifact. - # - # @overload replace_artifact(request, options = nil) - # Pass arguments to `replace_artifact` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload replace_artifact(artifact: nil) - # Pass arguments to `replace_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param artifact [::Google::Cloud::ApigeeRegistry::V1::Artifact, ::Hash] - # Required. The artifact to replace. - # - # The `name` field is used to identify the artifact to replace. - # Format: `{parent}/artifacts/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new - # - # # Call the replace_artifact method. - # result = client.replace_artifact request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. - # p result - # - def replace_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.replace_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.artifact&.name - header_params["artifact.name"] = request.artifact.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.replace_artifact.timeout, - metadata: metadata, - retry_policy: @config.rpcs.replace_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :replace_artifact, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified artifact. - # - # @overload delete_artifact(request, options = nil) - # Pass arguments to `delete_artifact` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_artifact(name: nil) - # Pass arguments to `delete_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the artifact to delete. - # Format: `{parent}/artifacts/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new - # - # # Call the delete_artifact method. - # result = client.delete_artifact request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_artifact.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.call_rpc :delete_artifact, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Registry API. - # - # This class represents the configuration for Registry, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ApigeeRegistry::V1::Registry::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_apis to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_apis.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_apis.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "apigeeregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Registry API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_apis` - # @return [::Gapic::Config::Method] - # - attr_reader :list_apis - ## - # RPC-specific configuration for `get_api` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api - ## - # RPC-specific configuration for `create_api` - # @return [::Gapic::Config::Method] - # - attr_reader :create_api - ## - # RPC-specific configuration for `update_api` - # @return [::Gapic::Config::Method] - # - attr_reader :update_api - ## - # RPC-specific configuration for `delete_api` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api - ## - # RPC-specific configuration for `list_api_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_versions - ## - # RPC-specific configuration for `get_api_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api_version - ## - # RPC-specific configuration for `create_api_version` - # @return [::Gapic::Config::Method] - # - attr_reader :create_api_version - ## - # RPC-specific configuration for `update_api_version` - # @return [::Gapic::Config::Method] - # - attr_reader :update_api_version - ## - # RPC-specific configuration for `delete_api_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_version - ## - # RPC-specific configuration for `list_api_specs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_specs - ## - # RPC-specific configuration for `get_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api_spec - ## - # RPC-specific configuration for `get_api_spec_contents` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api_spec_contents - ## - # RPC-specific configuration for `create_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :create_api_spec - ## - # RPC-specific configuration for `update_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :update_api_spec - ## - # RPC-specific configuration for `delete_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_spec - ## - # RPC-specific configuration for `tag_api_spec_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :tag_api_spec_revision - ## - # RPC-specific configuration for `list_api_spec_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_spec_revisions - ## - # RPC-specific configuration for `rollback_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :rollback_api_spec - ## - # RPC-specific configuration for `delete_api_spec_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_spec_revision - ## - # RPC-specific configuration for `list_api_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_deployments - ## - # RPC-specific configuration for `get_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api_deployment - ## - # RPC-specific configuration for `create_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_api_deployment - ## - # RPC-specific configuration for `update_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_api_deployment - ## - # RPC-specific configuration for `delete_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_deployment - ## - # RPC-specific configuration for `tag_api_deployment_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :tag_api_deployment_revision - ## - # RPC-specific configuration for `list_api_deployment_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_deployment_revisions - ## - # RPC-specific configuration for `rollback_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :rollback_api_deployment - ## - # RPC-specific configuration for `delete_api_deployment_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_deployment_revision - ## - # RPC-specific configuration for `list_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_artifacts - ## - # RPC-specific configuration for `get_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :get_artifact - ## - # RPC-specific configuration for `get_artifact_contents` - # @return [::Gapic::Config::Method] - # - attr_reader :get_artifact_contents - ## - # RPC-specific configuration for `create_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :create_artifact - ## - # RPC-specific configuration for `replace_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :replace_artifact - ## - # RPC-specific configuration for `delete_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_artifact - - # @private - def initialize parent_rpcs = nil - list_apis_config = parent_rpcs.list_apis if parent_rpcs.respond_to? :list_apis - @list_apis = ::Gapic::Config::Method.new list_apis_config - get_api_config = parent_rpcs.get_api if parent_rpcs.respond_to? :get_api - @get_api = ::Gapic::Config::Method.new get_api_config - create_api_config = parent_rpcs.create_api if parent_rpcs.respond_to? :create_api - @create_api = ::Gapic::Config::Method.new create_api_config - update_api_config = parent_rpcs.update_api if parent_rpcs.respond_to? :update_api - @update_api = ::Gapic::Config::Method.new update_api_config - delete_api_config = parent_rpcs.delete_api if parent_rpcs.respond_to? :delete_api - @delete_api = ::Gapic::Config::Method.new delete_api_config - list_api_versions_config = parent_rpcs.list_api_versions if parent_rpcs.respond_to? :list_api_versions - @list_api_versions = ::Gapic::Config::Method.new list_api_versions_config - get_api_version_config = parent_rpcs.get_api_version if parent_rpcs.respond_to? :get_api_version - @get_api_version = ::Gapic::Config::Method.new get_api_version_config - create_api_version_config = parent_rpcs.create_api_version if parent_rpcs.respond_to? :create_api_version - @create_api_version = ::Gapic::Config::Method.new create_api_version_config - update_api_version_config = parent_rpcs.update_api_version if parent_rpcs.respond_to? :update_api_version - @update_api_version = ::Gapic::Config::Method.new update_api_version_config - delete_api_version_config = parent_rpcs.delete_api_version if parent_rpcs.respond_to? :delete_api_version - @delete_api_version = ::Gapic::Config::Method.new delete_api_version_config - list_api_specs_config = parent_rpcs.list_api_specs if parent_rpcs.respond_to? :list_api_specs - @list_api_specs = ::Gapic::Config::Method.new list_api_specs_config - get_api_spec_config = parent_rpcs.get_api_spec if parent_rpcs.respond_to? :get_api_spec - @get_api_spec = ::Gapic::Config::Method.new get_api_spec_config - get_api_spec_contents_config = parent_rpcs.get_api_spec_contents if parent_rpcs.respond_to? :get_api_spec_contents - @get_api_spec_contents = ::Gapic::Config::Method.new get_api_spec_contents_config - create_api_spec_config = parent_rpcs.create_api_spec if parent_rpcs.respond_to? :create_api_spec - @create_api_spec = ::Gapic::Config::Method.new create_api_spec_config - update_api_spec_config = parent_rpcs.update_api_spec if parent_rpcs.respond_to? :update_api_spec - @update_api_spec = ::Gapic::Config::Method.new update_api_spec_config - delete_api_spec_config = parent_rpcs.delete_api_spec if parent_rpcs.respond_to? :delete_api_spec - @delete_api_spec = ::Gapic::Config::Method.new delete_api_spec_config - tag_api_spec_revision_config = parent_rpcs.tag_api_spec_revision if parent_rpcs.respond_to? :tag_api_spec_revision - @tag_api_spec_revision = ::Gapic::Config::Method.new tag_api_spec_revision_config - list_api_spec_revisions_config = parent_rpcs.list_api_spec_revisions if parent_rpcs.respond_to? :list_api_spec_revisions - @list_api_spec_revisions = ::Gapic::Config::Method.new list_api_spec_revisions_config - rollback_api_spec_config = parent_rpcs.rollback_api_spec if parent_rpcs.respond_to? :rollback_api_spec - @rollback_api_spec = ::Gapic::Config::Method.new rollback_api_spec_config - delete_api_spec_revision_config = parent_rpcs.delete_api_spec_revision if parent_rpcs.respond_to? :delete_api_spec_revision - @delete_api_spec_revision = ::Gapic::Config::Method.new delete_api_spec_revision_config - list_api_deployments_config = parent_rpcs.list_api_deployments if parent_rpcs.respond_to? :list_api_deployments - @list_api_deployments = ::Gapic::Config::Method.new list_api_deployments_config - get_api_deployment_config = parent_rpcs.get_api_deployment if parent_rpcs.respond_to? :get_api_deployment - @get_api_deployment = ::Gapic::Config::Method.new get_api_deployment_config - create_api_deployment_config = parent_rpcs.create_api_deployment if parent_rpcs.respond_to? :create_api_deployment - @create_api_deployment = ::Gapic::Config::Method.new create_api_deployment_config - update_api_deployment_config = parent_rpcs.update_api_deployment if parent_rpcs.respond_to? :update_api_deployment - @update_api_deployment = ::Gapic::Config::Method.new update_api_deployment_config - delete_api_deployment_config = parent_rpcs.delete_api_deployment if parent_rpcs.respond_to? :delete_api_deployment - @delete_api_deployment = ::Gapic::Config::Method.new delete_api_deployment_config - tag_api_deployment_revision_config = parent_rpcs.tag_api_deployment_revision if parent_rpcs.respond_to? :tag_api_deployment_revision - @tag_api_deployment_revision = ::Gapic::Config::Method.new tag_api_deployment_revision_config - list_api_deployment_revisions_config = parent_rpcs.list_api_deployment_revisions if parent_rpcs.respond_to? :list_api_deployment_revisions - @list_api_deployment_revisions = ::Gapic::Config::Method.new list_api_deployment_revisions_config - rollback_api_deployment_config = parent_rpcs.rollback_api_deployment if parent_rpcs.respond_to? :rollback_api_deployment - @rollback_api_deployment = ::Gapic::Config::Method.new rollback_api_deployment_config - delete_api_deployment_revision_config = parent_rpcs.delete_api_deployment_revision if parent_rpcs.respond_to? :delete_api_deployment_revision - @delete_api_deployment_revision = ::Gapic::Config::Method.new delete_api_deployment_revision_config - list_artifacts_config = parent_rpcs.list_artifacts if parent_rpcs.respond_to? :list_artifacts - @list_artifacts = ::Gapic::Config::Method.new list_artifacts_config - get_artifact_config = parent_rpcs.get_artifact if parent_rpcs.respond_to? :get_artifact - @get_artifact = ::Gapic::Config::Method.new get_artifact_config - get_artifact_contents_config = parent_rpcs.get_artifact_contents if parent_rpcs.respond_to? :get_artifact_contents - @get_artifact_contents = ::Gapic::Config::Method.new get_artifact_contents_config - create_artifact_config = parent_rpcs.create_artifact if parent_rpcs.respond_to? :create_artifact - @create_artifact = ::Gapic::Config::Method.new create_artifact_config - replace_artifact_config = parent_rpcs.replace_artifact if parent_rpcs.respond_to? :replace_artifact - @replace_artifact = ::Gapic::Config::Method.new replace_artifact_config - delete_artifact_config = parent_rpcs.delete_artifact if parent_rpcs.respond_to? :delete_artifact - @delete_artifact = ::Gapic::Config::Method.new delete_artifact_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/credentials.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/credentials.rb deleted file mode 100644 index 8bfc2c31c54a..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Registry - # Credentials for the Registry API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/paths.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/paths.rb deleted file mode 100644 index 9422757c4070..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/paths.rb +++ /dev/null @@ -1,238 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Registry - # Path helper methods for the Registry API. - module Paths - ## - # Create a fully-qualified Api resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apis/{api}` - # - # @param project [String] - # @param location [String] - # @param api [String] - # - # @return [::String] - def api_path project:, location:, api: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apis/#{api}" - end - - ## - # Create a fully-qualified ApiDeployment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}` - # - # @param project [String] - # @param location [String] - # @param api [String] - # @param deployment [String] - # - # @return [::String] - def api_deployment_path project:, location:, api:, deployment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apis/#{api}/deployments/#{deployment}" - end - - ## - # Create a fully-qualified ApiSpec resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` - # - # @param project [String] - # @param location [String] - # @param api [String] - # @param version [String] - # @param spec [String] - # - # @return [::String] - def api_spec_path project:, location:, api:, version:, spec: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" - raise ::ArgumentError, "version cannot contain /" if version.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apis/#{api}/versions/#{version}/specs/#{spec}" - end - - ## - # Create a fully-qualified ApiVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apis/{api}/versions/{version}` - # - # @param project [String] - # @param location [String] - # @param api [String] - # @param version [String] - # - # @return [::String] - def api_version_path project:, location:, api:, version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apis/#{api}/versions/#{version}" - end - - ## - # Create a fully-qualified Artifact resource string. - # - # @overload artifact_path(project:, location:, artifact:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/artifacts/{artifact}` - # - # @param project [String] - # @param location [String] - # @param artifact [String] - # - # @overload artifact_path(project:, location:, api:, artifact:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apis/{api}/artifacts/{artifact}` - # - # @param project [String] - # @param location [String] - # @param api [String] - # @param artifact [String] - # - # @overload artifact_path(project:, location:, api:, version:, artifact:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/artifacts/{artifact}` - # - # @param project [String] - # @param location [String] - # @param api [String] - # @param version [String] - # @param artifact [String] - # - # @overload artifact_path(project:, location:, api:, version:, spec:, artifact:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}/artifacts/{artifact}` - # - # @param project [String] - # @param location [String] - # @param api [String] - # @param version [String] - # @param spec [String] - # @param artifact [String] - # - # @overload artifact_path(project:, location:, api:, deployment:, artifact:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/apis/{api}/deployments/{deployment}/artifacts/{artifact}` - # - # @param project [String] - # @param location [String] - # @param api [String] - # @param deployment [String] - # @param artifact [String] - # - # @return [::String] - def artifact_path **args - resources = { - "artifact:location:project" => (proc do |project:, location:, artifact:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/artifacts/#{artifact}" - end), - "api:artifact:location:project" => (proc do |project:, location:, api:, artifact:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apis/#{api}/artifacts/#{artifact}" - end), - "api:artifact:location:project:version" => (proc do |project:, location:, api:, version:, artifact:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" - raise ::ArgumentError, "version cannot contain /" if version.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apis/#{api}/versions/#{version}/artifacts/#{artifact}" - end), - "api:artifact:location:project:spec:version" => (proc do |project:, location:, api:, version:, spec:, artifact:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" - raise ::ArgumentError, "version cannot contain /" if version.to_s.include? "/" - raise ::ArgumentError, "spec cannot contain /" if spec.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apis/#{api}/versions/#{version}/specs/#{spec}/artifacts/#{artifact}" - end), - "api:artifact:deployment:location:project" => (proc do |project:, location:, api:, deployment:, artifact:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "api cannot contain /" if api.to_s.include? "/" - raise ::ArgumentError, "deployment cannot contain /" if deployment.to_s.include? "/" - - "projects/#{project}/locations/#{location}/apis/#{api}/deployments/#{deployment}/artifacts/#{artifact}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - extend self - end - end - end - end - end -end diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest.rb deleted file mode 100644 index df0fc481fd3e..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/apigee_registry/v1/version" -require "google/cloud/apigee_registry/v1/bindings_override" - -require "google/cloud/apigee_registry/v1/registry/credentials" -require "google/cloud/apigee_registry/v1/registry/paths" -require "google/cloud/apigee_registry/v1/registry/rest/client" - -module Google - module Cloud - module ApigeeRegistry - module V1 - ## - # The Registry service allows teams to manage descriptions of APIs. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/apigee_registry/v1/registry/rest" - # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - module Registry - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/apigee_registry/v1/registry/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/client.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/client.rb deleted file mode 100644 index 3b524915d100..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/client.rb +++ /dev/null @@ -1,3818 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/apigeeregistry/v1/registry_service_pb" -require "google/cloud/apigee_registry/v1/registry/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Registry - module Rest - ## - # REST client for the Registry service. - # - # The Registry service allows teams to manage descriptions of APIs. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "apigeeregistry.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :registry_stub - - ## - # Configure the Registry Client class. - # - # See {::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Registry clients - # ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "ApigeeRegistry", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_apis.timeout = 60.0 - default_config.rpcs.list_apis.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api.timeout = 60.0 - default_config.rpcs.get_api.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_api.timeout = 60.0 - default_config.rpcs.create_api.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.update_api.timeout = 60.0 - default_config.rpcs.update_api.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_api.timeout = 60.0 - default_config.rpcs.delete_api.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_versions.timeout = 60.0 - default_config.rpcs.list_api_versions.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api_version.timeout = 60.0 - default_config.rpcs.get_api_version.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_api_version.timeout = 60.0 - default_config.rpcs.create_api_version.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.update_api_version.timeout = 60.0 - default_config.rpcs.update_api_version.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_api_version.timeout = 60.0 - default_config.rpcs.delete_api_version.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_specs.timeout = 60.0 - default_config.rpcs.list_api_specs.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api_spec.timeout = 60.0 - default_config.rpcs.get_api_spec.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api_spec_contents.timeout = 60.0 - default_config.rpcs.get_api_spec_contents.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_api_spec.timeout = 60.0 - default_config.rpcs.create_api_spec.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.update_api_spec.timeout = 60.0 - default_config.rpcs.update_api_spec.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_api_spec.timeout = 60.0 - default_config.rpcs.delete_api_spec.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.tag_api_spec_revision.timeout = 60.0 - default_config.rpcs.tag_api_spec_revision.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_spec_revisions.timeout = 60.0 - default_config.rpcs.list_api_spec_revisions.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.rollback_api_spec.timeout = 60.0 - - default_config.rpcs.delete_api_spec_revision.timeout = 60.0 - default_config.rpcs.delete_api_spec_revision.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_deployments.timeout = 60.0 - default_config.rpcs.list_api_deployments.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_api_deployment.timeout = 60.0 - default_config.rpcs.get_api_deployment.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_api_deployment.timeout = 60.0 - default_config.rpcs.create_api_deployment.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.update_api_deployment.timeout = 60.0 - default_config.rpcs.update_api_deployment.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_api_deployment.timeout = 60.0 - default_config.rpcs.delete_api_deployment.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.tag_api_deployment_revision.timeout = 60.0 - default_config.rpcs.tag_api_deployment_revision.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_api_deployment_revisions.timeout = 60.0 - default_config.rpcs.list_api_deployment_revisions.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.rollback_api_deployment.timeout = 60.0 - - default_config.rpcs.delete_api_deployment_revision.timeout = 60.0 - default_config.rpcs.delete_api_deployment_revision.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.list_artifacts.timeout = 60.0 - default_config.rpcs.list_artifacts.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_artifact.timeout = 60.0 - default_config.rpcs.get_artifact.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.get_artifact_contents.timeout = 60.0 - default_config.rpcs.get_artifact_contents.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.create_artifact.timeout = 60.0 - default_config.rpcs.create_artifact.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.replace_artifact.timeout = 60.0 - default_config.rpcs.replace_artifact.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config.rpcs.delete_artifact.timeout = 60.0 - default_config.rpcs.delete_artifact.retry_policy = { - initial_delay: 0.2, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Registry Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @registry_stub.universe_domain - end - - ## - # Create a new Registry REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Registry client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @registry_stub = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @registry_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @registry_stub.endpoint - config.universe_domain = @registry_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @registry_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @registry_stub.endpoint - config.universe_domain = @registry_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @registry_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @registry_stub.logger - end - - # Service calls - - ## - # Returns matching APIs. - # - # @overload list_apis(request, options = nil) - # Pass arguments to `list_apis` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApisRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApisRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_apis(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_apis` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of APIs. - # Format: `projects/*/locations/*` - # @param page_size [::Integer] - # The maximum number of APIs to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListApis` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApis` must match - # the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Api>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Api>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApisRequest.new - # - # # Call the list_apis method. - # result = client.list_apis request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Api. - # p item - # end - # - def list_apis request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_apis.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_apis.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_apis.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.list_apis request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_apis, "apis", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a specified API. - # - # @overload get_api(request, options = nil) - # Pass arguments to `get_api` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_api(name: nil) - # Pass arguments to `get_api` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the API to retrieve. - # Format: `projects/*/locations/*/apis/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Api] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new - # - # # Call the get_api method. - # result = client.get_api request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. - # p result - # - def get_api request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_api.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_api.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_api.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.get_api request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a specified API. - # - # @overload create_api(request, options = nil) - # Pass arguments to `create_api` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_api(parent: nil, api: nil, api_id: nil) - # Pass arguments to `create_api` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of APIs. - # Format: `projects/*/locations/*` - # @param api [::Google::Cloud::ApigeeRegistry::V1::Api, ::Hash] - # Required. The API to create. - # @param api_id [::String] - # Required. The ID to use for the API, which will become the final component of - # the API's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Api] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new - # - # # Call the create_api method. - # result = client.create_api request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. - # p result - # - def create_api request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_api.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_api.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_api.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.create_api request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to modify a specified API. - # - # @overload update_api(request, options = nil) - # Pass arguments to `update_api` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_api(api: nil, update_mask: nil, allow_missing: nil) - # Pass arguments to `update_api` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param api [::Google::Cloud::ApigeeRegistry::V1::Api, ::Hash] - # Required. The API to update. - # - # The `name` field is used to identify the API to update. - # Format: `projects/*/locations/*/apis/*` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @param allow_missing [::Boolean] - # If set to true, and the API is not found, a new API will be created. - # In this situation, `update_mask` is ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Api] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new - # - # # Call the update_api method. - # result = client.update_api request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. - # p result - # - def update_api request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_api.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_api.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_api.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.update_api request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified API and all of the resources that it - # owns. - # - # @overload delete_api(request, options = nil) - # Pass arguments to `delete_api` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_api(name: nil, force: nil) - # Pass arguments to `delete_api` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the API to delete. - # Format: `projects/*/locations/*/apis/*` - # @param force [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.new - # - # # Call the delete_api method. - # result = client.delete_api request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_api request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_api.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_api.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_api.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.delete_api request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns matching versions. - # - # @overload list_api_versions(request, options = nil) - # Pass arguments to `list_api_versions` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_api_versions(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_api_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of versions. - # Format: `projects/*/locations/*/apis/*` - # @param page_size [::Integer] - # The maximum number of versions to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListApiVersions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApiVersions` must - # match the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.new - # - # # Call the list_api_versions method. - # result = client.list_api_versions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiVersion. - # p item - # end - # - def list_api_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_api_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_api_versions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_api_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.list_api_versions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_api_versions, "api_versions", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a specified version. - # - # @overload get_api_version(request, options = nil) - # Pass arguments to `get_api_version` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_api_version(name: nil) - # Pass arguments to `get_api_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the version to retrieve. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new - # - # # Call the get_api_version method. - # result = client.get_api_version request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. - # p result - # - def get_api_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_api_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_api_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_api_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.get_api_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a specified version. - # - # @overload create_api_version(request, options = nil) - # Pass arguments to `create_api_version` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_api_version(parent: nil, api_version: nil, api_version_id: nil) - # Pass arguments to `create_api_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of versions. - # Format: `projects/*/locations/*/apis/*` - # @param api_version [::Google::Cloud::ApigeeRegistry::V1::ApiVersion, ::Hash] - # Required. The version to create. - # @param api_version_id [::String] - # Required. The ID to use for the version, which will become the final component of - # the version's resource name. - # - # This value should be 1-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new - # - # # Call the create_api_version method. - # result = client.create_api_version request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. - # p result - # - def create_api_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_api_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_api_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_api_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.create_api_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to modify a specified version. - # - # @overload update_api_version(request, options = nil) - # Pass arguments to `update_api_version` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_api_version(api_version: nil, update_mask: nil, allow_missing: nil) - # Pass arguments to `update_api_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param api_version [::Google::Cloud::ApigeeRegistry::V1::ApiVersion, ::Hash] - # Required. The version to update. - # - # The `name` field is used to identify the version to update. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @param allow_missing [::Boolean] - # If set to true, and the version is not found, a new version will be - # created. In this situation, `update_mask` is ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new - # - # # Call the update_api_version method. - # result = client.update_api_version request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. - # p result - # - def update_api_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_api_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_api_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_api_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.update_api_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified version and all of the resources that - # it owns. - # - # @overload delete_api_version(request, options = nil) - # Pass arguments to `delete_api_version` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_api_version(name: nil, force: nil) - # Pass arguments to `delete_api_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the version to delete. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @param force [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.new - # - # # Call the delete_api_version method. - # result = client.delete_api_version request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_api_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_api_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_api_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_api_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.delete_api_version request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns matching specs. - # - # @overload list_api_specs(request, options = nil) - # Pass arguments to `list_api_specs` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_api_specs(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_api_specs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of specs. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @param page_size [::Integer] - # The maximum number of specs to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListApiSpecs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApiSpecs` must match - # the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields except contents. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.new - # - # # Call the list_api_specs method. - # result = client.list_api_specs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p item - # end - # - def list_api_specs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_api_specs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_api_specs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_api_specs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.list_api_specs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_api_specs, "api_specs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a specified spec. - # - # @overload get_api_spec(request, options = nil) - # Pass arguments to `get_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_api_spec(name: nil) - # Pass arguments to `get_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec to retrieve. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new - # - # # Call the get_api_spec method. - # result = client.get_api_spec request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def get_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_api_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.get_api_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the contents of a specified spec. - # If specs are stored with GZip compression, the default behavior - # is to return the spec uncompressed (the mime_type response field - # indicates the exact format returned). - # - # @overload get_api_spec_contents(request, options = nil) - # Pass arguments to `get_api_spec_contents` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_api_spec_contents(name: nil) - # Pass arguments to `get_api_spec_contents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec whose contents should be retrieved. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Api::HttpBody] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Api::HttpBody] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new - # - # # Call the get_api_spec_contents method. - # result = client.get_api_spec_contents request - # - # # The returned object is of type Google::Api::HttpBody. - # p result - # - def get_api_spec_contents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_api_spec_contents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_api_spec_contents.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_api_spec_contents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.get_api_spec_contents request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a specified spec. - # - # @overload create_api_spec(request, options = nil) - # Pass arguments to `create_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_api_spec(parent: nil, api_spec: nil, api_spec_id: nil) - # Pass arguments to `create_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of specs. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @param api_spec [::Google::Cloud::ApigeeRegistry::V1::ApiSpec, ::Hash] - # Required. The spec to create. - # @param api_spec_id [::String] - # Required. The ID to use for the spec, which will become the final component of - # the spec's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new - # - # # Call the create_api_spec method. - # result = client.create_api_spec request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def create_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_api_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.create_api_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to modify a specified spec. - # - # @overload update_api_spec(request, options = nil) - # Pass arguments to `update_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_api_spec(api_spec: nil, update_mask: nil, allow_missing: nil) - # Pass arguments to `update_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param api_spec [::Google::Cloud::ApigeeRegistry::V1::ApiSpec, ::Hash] - # Required. The spec to update. - # - # The `name` field is used to identify the spec to update. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @param allow_missing [::Boolean] - # If set to true, and the spec is not found, a new spec will be created. - # In this situation, `update_mask` is ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new - # - # # Call the update_api_spec method. - # result = client.update_api_spec request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def update_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_api_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.update_api_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified spec, all revisions, and all child - # resources (e.g., artifacts). - # - # @overload delete_api_spec(request, options = nil) - # Pass arguments to `delete_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_api_spec(name: nil, force: nil) - # Pass arguments to `delete_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec to delete. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # @param force [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.new - # - # # Call the delete_api_spec method. - # result = client.delete_api_spec request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_api_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.delete_api_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Adds a tag to a specified revision of a spec. - # - # @overload tag_api_spec_revision(request, options = nil) - # Pass arguments to `tag_api_spec_revision` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload tag_api_spec_revision(name: nil, tag: nil) - # Pass arguments to `tag_api_spec_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec to be tagged, including the revision ID. - # @param tag [::String] - # Required. The tag to apply. - # The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new - # - # # Call the tag_api_spec_revision method. - # result = client.tag_api_spec_revision request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def tag_api_spec_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.tag_api_spec_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.tag_api_spec_revision.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.tag_api_spec_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.tag_api_spec_revision request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all revisions of a spec. - # Revisions are returned in descending order of revision creation time. - # - # @overload list_api_spec_revisions(request, options = nil) - # Pass arguments to `list_api_spec_revisions` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_api_spec_revisions(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_api_spec_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec to list revisions for. - # @param page_size [::Integer] - # The maximum number of revisions to return per page. - # @param page_token [::String] - # The page token, received from a previous ListApiSpecRevisions call. - # Provide this to retrieve the subsequent page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.new - # - # # Call the list_api_spec_revisions method. - # result = client.list_api_spec_revisions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p item - # end - # - def list_api_spec_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_api_spec_revisions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_api_spec_revisions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_api_spec_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.list_api_spec_revisions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_api_spec_revisions, "api_specs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the current revision to a specified prior revision. - # Note that this creates a new revision with a new revision ID. - # - # @overload rollback_api_spec(request, options = nil) - # Pass arguments to `rollback_api_spec` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload rollback_api_spec(name: nil, revision_id: nil) - # Pass arguments to `rollback_api_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The spec being rolled back. - # @param revision_id [::String] - # Required. The revision ID to roll back to. - # It must be a revision of the same spec. - # - # Example: `c7cfa2a8` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.new - # - # # Call the rollback_api_spec method. - # result = client.rollback_api_spec request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def rollback_api_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.rollback_api_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.rollback_api_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.rollback_api_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.rollback_api_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a revision of a spec. - # - # @overload delete_api_spec_revision(request, options = nil) - # Pass arguments to `delete_api_spec_revision` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_api_spec_revision(name: nil) - # Pass arguments to `delete_api_spec_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the spec revision to be deleted, - # with a revision ID explicitly included. - # - # Example: - # `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new - # - # # Call the delete_api_spec_revision method. - # result = client.delete_api_spec_revision request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - # p result - # - def delete_api_spec_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_api_spec_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_api_spec_revision.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_api_spec_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.delete_api_spec_revision request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns matching deployments. - # - # @overload list_api_deployments(request, options = nil) - # Pass arguments to `list_api_deployments` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_api_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_api_deployments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of deployments. - # Format: `projects/*/locations/*/apis/*` - # @param page_size [::Integer] - # The maximum number of deployments to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListApiDeployments` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApiDeployments` must - # match the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.new - # - # # Call the list_api_deployments method. - # result = client.list_api_deployments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p item - # end - # - def list_api_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_api_deployments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_api_deployments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_api_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.list_api_deployments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_api_deployments, "api_deployments", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a specified deployment. - # - # @overload get_api_deployment(request, options = nil) - # Pass arguments to `get_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_api_deployment(name: nil) - # Pass arguments to `get_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment to retrieve. - # Format: `projects/*/locations/*/apis/*/deployments/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new - # - # # Call the get_api_deployment method. - # result = client.get_api_deployment request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def get_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_api_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.get_api_deployment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a specified deployment. - # - # @overload create_api_deployment(request, options = nil) - # Pass arguments to `create_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_api_deployment(parent: nil, api_deployment: nil, api_deployment_id: nil) - # Pass arguments to `create_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of deployments. - # Format: `projects/*/locations/*/apis/*` - # @param api_deployment [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment, ::Hash] - # Required. The deployment to create. - # @param api_deployment_id [::String] - # Required. The ID to use for the deployment, which will become the final component of - # the deployment's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new - # - # # Call the create_api_deployment method. - # result = client.create_api_deployment request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def create_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_api_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.create_api_deployment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to modify a specified deployment. - # - # @overload update_api_deployment(request, options = nil) - # Pass arguments to `update_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_api_deployment(api_deployment: nil, update_mask: nil, allow_missing: nil) - # Pass arguments to `update_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param api_deployment [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment, ::Hash] - # Required. The deployment to update. - # - # The `name` field is used to identify the deployment to update. - # Format: `projects/*/locations/*/apis/*/deployments/*` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @param allow_missing [::Boolean] - # If set to true, and the deployment is not found, a new deployment will be - # created. In this situation, `update_mask` is ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new - # - # # Call the update_api_deployment method. - # result = client.update_api_deployment request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def update_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_api_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.update_api_deployment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified deployment, all revisions, and all - # child resources (e.g., artifacts). - # - # @overload delete_api_deployment(request, options = nil) - # Pass arguments to `delete_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_api_deployment(name: nil, force: nil) - # Pass arguments to `delete_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment to delete. - # Format: `projects/*/locations/*/apis/*/deployments/*` - # @param force [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.new - # - # # Call the delete_api_deployment method. - # result = client.delete_api_deployment request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_api_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.delete_api_deployment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Adds a tag to a specified revision of a - # deployment. - # - # @overload tag_api_deployment_revision(request, options = nil) - # Pass arguments to `tag_api_deployment_revision` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload tag_api_deployment_revision(name: nil, tag: nil) - # Pass arguments to `tag_api_deployment_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment to be tagged, including the revision ID. - # @param tag [::String] - # Required. The tag to apply. - # The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new - # - # # Call the tag_api_deployment_revision method. - # result = client.tag_api_deployment_revision request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def tag_api_deployment_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.tag_api_deployment_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.tag_api_deployment_revision.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.tag_api_deployment_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.tag_api_deployment_revision request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all revisions of a deployment. - # Revisions are returned in descending order of revision creation time. - # - # @overload list_api_deployment_revisions(request, options = nil) - # Pass arguments to `list_api_deployment_revisions` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_api_deployment_revisions(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_api_deployment_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment to list revisions for. - # @param page_size [::Integer] - # The maximum number of revisions to return per page. - # @param page_token [::String] - # The page token, received from a previous ListApiDeploymentRevisions call. - # Provide this to retrieve the subsequent page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.new - # - # # Call the list_api_deployment_revisions method. - # result = client.list_api_deployment_revisions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p item - # end - # - def list_api_deployment_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_api_deployment_revisions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_api_deployment_revisions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_api_deployment_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.list_api_deployment_revisions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_api_deployment_revisions, "api_deployments", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the current revision to a specified prior - # revision. Note that this creates a new revision with a new revision ID. - # - # @overload rollback_api_deployment(request, options = nil) - # Pass arguments to `rollback_api_deployment` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload rollback_api_deployment(name: nil, revision_id: nil) - # Pass arguments to `rollback_api_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The deployment being rolled back. - # @param revision_id [::String] - # Required. The revision ID to roll back to. - # It must be a revision of the same deployment. - # - # Example: `c7cfa2a8` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.new - # - # # Call the rollback_api_deployment method. - # result = client.rollback_api_deployment request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def rollback_api_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.rollback_api_deployment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.rollback_api_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.rollback_api_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.rollback_api_deployment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a revision of a deployment. - # - # @overload delete_api_deployment_revision(request, options = nil) - # Pass arguments to `delete_api_deployment_revision` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_api_deployment_revision(name: nil) - # Pass arguments to `delete_api_deployment_revision` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the deployment revision to be deleted, - # with a revision ID explicitly included. - # - # Example: - # `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new - # - # # Call the delete_api_deployment_revision method. - # result = client.delete_api_deployment_revision request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - # p result - # - def delete_api_deployment_revision request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_api_deployment_revision.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_api_deployment_revision.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_api_deployment_revision.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.delete_api_deployment_revision request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns matching artifacts. - # - # @overload list_artifacts(request, options = nil) - # Pass arguments to `list_artifacts` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_artifacts(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_artifacts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of artifacts. - # Format: `{parent}` - # @param page_size [::Integer] - # The maximum number of artifacts to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListArtifacts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListArtifacts` must - # match the call that provided the page token. - # @param filter [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields except contents. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Artifact>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApigeeRegistry::V1::Artifact>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.new - # - # # Call the list_artifacts method. - # result = client.list_artifacts request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Artifact. - # p item - # end - # - def list_artifacts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_artifacts.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_artifacts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_artifacts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.list_artifacts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @registry_stub, :list_artifacts, "artifacts", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a specified artifact. - # - # @overload get_artifact(request, options = nil) - # Pass arguments to `get_artifact` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_artifact(name: nil) - # Pass arguments to `get_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the artifact to retrieve. - # Format: `{parent}/artifacts/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new - # - # # Call the get_artifact method. - # result = client.get_artifact request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. - # p result - # - def get_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_artifact.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.get_artifact request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the contents of a specified artifact. - # If artifacts are stored with GZip compression, the default behavior - # is to return the artifact uncompressed (the mime_type response field - # indicates the exact format returned). - # - # @overload get_artifact_contents(request, options = nil) - # Pass arguments to `get_artifact_contents` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_artifact_contents(name: nil) - # Pass arguments to `get_artifact_contents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the artifact whose contents should be retrieved. - # Format: `{parent}/artifacts/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Api::HttpBody] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Api::HttpBody] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new - # - # # Call the get_artifact_contents method. - # result = client.get_artifact_contents request - # - # # The returned object is of type Google::Api::HttpBody. - # p result - # - def get_artifact_contents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_artifact_contents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_artifact_contents.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_artifact_contents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.get_artifact_contents request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a specified artifact. - # - # @overload create_artifact(request, options = nil) - # Pass arguments to `create_artifact` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_artifact(parent: nil, artifact: nil, artifact_id: nil) - # Pass arguments to `create_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent, which owns this collection of artifacts. - # Format: `{parent}` - # @param artifact [::Google::Cloud::ApigeeRegistry::V1::Artifact, ::Hash] - # Required. The artifact to create. - # @param artifact_id [::String] - # Required. The ID to use for the artifact, which will become the final component of - # the artifact's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new - # - # # Call the create_artifact method. - # result = client.create_artifact request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. - # p result - # - def create_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_artifact.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.create_artifact request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Used to replace a specified artifact. - # - # @overload replace_artifact(request, options = nil) - # Pass arguments to `replace_artifact` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload replace_artifact(artifact: nil) - # Pass arguments to `replace_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param artifact [::Google::Cloud::ApigeeRegistry::V1::Artifact, ::Hash] - # Required. The artifact to replace. - # - # The `name` field is used to identify the artifact to replace. - # Format: `{parent}/artifacts/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new - # - # # Call the replace_artifact method. - # result = client.replace_artifact request - # - # # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. - # p result - # - def replace_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.replace_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.replace_artifact.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.replace_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.replace_artifact request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a specified artifact. - # - # @overload delete_artifact(request, options = nil) - # Pass arguments to `delete_artifact` via a request object, either of type - # {::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_artifact(name: nil) - # Pass arguments to `delete_artifact` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the artifact to delete. - # Format: `{parent}/artifacts/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/apigee_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new - # - # # Call the delete_artifact method. - # result = client.delete_artifact request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_artifact request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_artifact.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::ApigeeRegistry::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_artifact.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_artifact.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @registry_stub.delete_artifact request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Registry REST API. - # - # This class represents the configuration for Registry REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_apis to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_apis.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_apis.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "apigeeregistry.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Registry API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_apis` - # @return [::Gapic::Config::Method] - # - attr_reader :list_apis - ## - # RPC-specific configuration for `get_api` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api - ## - # RPC-specific configuration for `create_api` - # @return [::Gapic::Config::Method] - # - attr_reader :create_api - ## - # RPC-specific configuration for `update_api` - # @return [::Gapic::Config::Method] - # - attr_reader :update_api - ## - # RPC-specific configuration for `delete_api` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api - ## - # RPC-specific configuration for `list_api_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_versions - ## - # RPC-specific configuration for `get_api_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api_version - ## - # RPC-specific configuration for `create_api_version` - # @return [::Gapic::Config::Method] - # - attr_reader :create_api_version - ## - # RPC-specific configuration for `update_api_version` - # @return [::Gapic::Config::Method] - # - attr_reader :update_api_version - ## - # RPC-specific configuration for `delete_api_version` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_version - ## - # RPC-specific configuration for `list_api_specs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_specs - ## - # RPC-specific configuration for `get_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api_spec - ## - # RPC-specific configuration for `get_api_spec_contents` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api_spec_contents - ## - # RPC-specific configuration for `create_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :create_api_spec - ## - # RPC-specific configuration for `update_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :update_api_spec - ## - # RPC-specific configuration for `delete_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_spec - ## - # RPC-specific configuration for `tag_api_spec_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :tag_api_spec_revision - ## - # RPC-specific configuration for `list_api_spec_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_spec_revisions - ## - # RPC-specific configuration for `rollback_api_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :rollback_api_spec - ## - # RPC-specific configuration for `delete_api_spec_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_spec_revision - ## - # RPC-specific configuration for `list_api_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_deployments - ## - # RPC-specific configuration for `get_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_api_deployment - ## - # RPC-specific configuration for `create_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_api_deployment - ## - # RPC-specific configuration for `update_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_api_deployment - ## - # RPC-specific configuration for `delete_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_deployment - ## - # RPC-specific configuration for `tag_api_deployment_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :tag_api_deployment_revision - ## - # RPC-specific configuration for `list_api_deployment_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_api_deployment_revisions - ## - # RPC-specific configuration for `rollback_api_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :rollback_api_deployment - ## - # RPC-specific configuration for `delete_api_deployment_revision` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_api_deployment_revision - ## - # RPC-specific configuration for `list_artifacts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_artifacts - ## - # RPC-specific configuration for `get_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :get_artifact - ## - # RPC-specific configuration for `get_artifact_contents` - # @return [::Gapic::Config::Method] - # - attr_reader :get_artifact_contents - ## - # RPC-specific configuration for `create_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :create_artifact - ## - # RPC-specific configuration for `replace_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :replace_artifact - ## - # RPC-specific configuration for `delete_artifact` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_artifact - - # @private - def initialize parent_rpcs = nil - list_apis_config = parent_rpcs.list_apis if parent_rpcs.respond_to? :list_apis - @list_apis = ::Gapic::Config::Method.new list_apis_config - get_api_config = parent_rpcs.get_api if parent_rpcs.respond_to? :get_api - @get_api = ::Gapic::Config::Method.new get_api_config - create_api_config = parent_rpcs.create_api if parent_rpcs.respond_to? :create_api - @create_api = ::Gapic::Config::Method.new create_api_config - update_api_config = parent_rpcs.update_api if parent_rpcs.respond_to? :update_api - @update_api = ::Gapic::Config::Method.new update_api_config - delete_api_config = parent_rpcs.delete_api if parent_rpcs.respond_to? :delete_api - @delete_api = ::Gapic::Config::Method.new delete_api_config - list_api_versions_config = parent_rpcs.list_api_versions if parent_rpcs.respond_to? :list_api_versions - @list_api_versions = ::Gapic::Config::Method.new list_api_versions_config - get_api_version_config = parent_rpcs.get_api_version if parent_rpcs.respond_to? :get_api_version - @get_api_version = ::Gapic::Config::Method.new get_api_version_config - create_api_version_config = parent_rpcs.create_api_version if parent_rpcs.respond_to? :create_api_version - @create_api_version = ::Gapic::Config::Method.new create_api_version_config - update_api_version_config = parent_rpcs.update_api_version if parent_rpcs.respond_to? :update_api_version - @update_api_version = ::Gapic::Config::Method.new update_api_version_config - delete_api_version_config = parent_rpcs.delete_api_version if parent_rpcs.respond_to? :delete_api_version - @delete_api_version = ::Gapic::Config::Method.new delete_api_version_config - list_api_specs_config = parent_rpcs.list_api_specs if parent_rpcs.respond_to? :list_api_specs - @list_api_specs = ::Gapic::Config::Method.new list_api_specs_config - get_api_spec_config = parent_rpcs.get_api_spec if parent_rpcs.respond_to? :get_api_spec - @get_api_spec = ::Gapic::Config::Method.new get_api_spec_config - get_api_spec_contents_config = parent_rpcs.get_api_spec_contents if parent_rpcs.respond_to? :get_api_spec_contents - @get_api_spec_contents = ::Gapic::Config::Method.new get_api_spec_contents_config - create_api_spec_config = parent_rpcs.create_api_spec if parent_rpcs.respond_to? :create_api_spec - @create_api_spec = ::Gapic::Config::Method.new create_api_spec_config - update_api_spec_config = parent_rpcs.update_api_spec if parent_rpcs.respond_to? :update_api_spec - @update_api_spec = ::Gapic::Config::Method.new update_api_spec_config - delete_api_spec_config = parent_rpcs.delete_api_spec if parent_rpcs.respond_to? :delete_api_spec - @delete_api_spec = ::Gapic::Config::Method.new delete_api_spec_config - tag_api_spec_revision_config = parent_rpcs.tag_api_spec_revision if parent_rpcs.respond_to? :tag_api_spec_revision - @tag_api_spec_revision = ::Gapic::Config::Method.new tag_api_spec_revision_config - list_api_spec_revisions_config = parent_rpcs.list_api_spec_revisions if parent_rpcs.respond_to? :list_api_spec_revisions - @list_api_spec_revisions = ::Gapic::Config::Method.new list_api_spec_revisions_config - rollback_api_spec_config = parent_rpcs.rollback_api_spec if parent_rpcs.respond_to? :rollback_api_spec - @rollback_api_spec = ::Gapic::Config::Method.new rollback_api_spec_config - delete_api_spec_revision_config = parent_rpcs.delete_api_spec_revision if parent_rpcs.respond_to? :delete_api_spec_revision - @delete_api_spec_revision = ::Gapic::Config::Method.new delete_api_spec_revision_config - list_api_deployments_config = parent_rpcs.list_api_deployments if parent_rpcs.respond_to? :list_api_deployments - @list_api_deployments = ::Gapic::Config::Method.new list_api_deployments_config - get_api_deployment_config = parent_rpcs.get_api_deployment if parent_rpcs.respond_to? :get_api_deployment - @get_api_deployment = ::Gapic::Config::Method.new get_api_deployment_config - create_api_deployment_config = parent_rpcs.create_api_deployment if parent_rpcs.respond_to? :create_api_deployment - @create_api_deployment = ::Gapic::Config::Method.new create_api_deployment_config - update_api_deployment_config = parent_rpcs.update_api_deployment if parent_rpcs.respond_to? :update_api_deployment - @update_api_deployment = ::Gapic::Config::Method.new update_api_deployment_config - delete_api_deployment_config = parent_rpcs.delete_api_deployment if parent_rpcs.respond_to? :delete_api_deployment - @delete_api_deployment = ::Gapic::Config::Method.new delete_api_deployment_config - tag_api_deployment_revision_config = parent_rpcs.tag_api_deployment_revision if parent_rpcs.respond_to? :tag_api_deployment_revision - @tag_api_deployment_revision = ::Gapic::Config::Method.new tag_api_deployment_revision_config - list_api_deployment_revisions_config = parent_rpcs.list_api_deployment_revisions if parent_rpcs.respond_to? :list_api_deployment_revisions - @list_api_deployment_revisions = ::Gapic::Config::Method.new list_api_deployment_revisions_config - rollback_api_deployment_config = parent_rpcs.rollback_api_deployment if parent_rpcs.respond_to? :rollback_api_deployment - @rollback_api_deployment = ::Gapic::Config::Method.new rollback_api_deployment_config - delete_api_deployment_revision_config = parent_rpcs.delete_api_deployment_revision if parent_rpcs.respond_to? :delete_api_deployment_revision - @delete_api_deployment_revision = ::Gapic::Config::Method.new delete_api_deployment_revision_config - list_artifacts_config = parent_rpcs.list_artifacts if parent_rpcs.respond_to? :list_artifacts - @list_artifacts = ::Gapic::Config::Method.new list_artifacts_config - get_artifact_config = parent_rpcs.get_artifact if parent_rpcs.respond_to? :get_artifact - @get_artifact = ::Gapic::Config::Method.new get_artifact_config - get_artifact_contents_config = parent_rpcs.get_artifact_contents if parent_rpcs.respond_to? :get_artifact_contents - @get_artifact_contents = ::Gapic::Config::Method.new get_artifact_contents_config - create_artifact_config = parent_rpcs.create_artifact if parent_rpcs.respond_to? :create_artifact - @create_artifact = ::Gapic::Config::Method.new create_artifact_config - replace_artifact_config = parent_rpcs.replace_artifact if parent_rpcs.respond_to? :replace_artifact - @replace_artifact = ::Gapic::Config::Method.new replace_artifact_config - delete_artifact_config = parent_rpcs.delete_artifact if parent_rpcs.respond_to? :delete_artifact - @delete_artifact = ::Gapic::Config::Method.new delete_artifact_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/service_stub.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/service_stub.rb deleted file mode 100644 index a91928c1cf05..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/registry/rest/service_stub.rb +++ /dev/null @@ -1,2406 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/apigeeregistry/v1/registry_service_pb" - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Registry - module Rest - ## - # REST service stub for the Registry service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_apis REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApisRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListApisResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ListApisResponse] - # A result object deserialized from the server's reply - def list_apis request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_apis_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_apis", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ListApisResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_api REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Api] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # A result object deserialized from the server's reply - def get_api request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_api_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_api", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::Api.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_api REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Api] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # A result object deserialized from the server's reply - def create_api request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_api_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_api", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::Api.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_api REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Api] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # A result object deserialized from the server's reply - def update_api request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_api_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_api", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::Api.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_api REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_api request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_api", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_api_versions REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse] - # A result object deserialized from the server's reply - def list_api_versions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_api_versions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_api_versions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_api_version REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # A result object deserialized from the server's reply - def get_api_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_api_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_api_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_api_version REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # A result object deserialized from the server's reply - def create_api_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_api_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_api_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_api_version REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # A result object deserialized from the server's reply - def update_api_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_api_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_api_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_api_version REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_api_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_api_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_api_specs REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse] - # A result object deserialized from the server's reply - def list_api_specs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_api_specs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_api_specs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # A result object deserialized from the server's reply - def get_api_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_api_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_api_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_api_spec_contents REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Api::HttpBody] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Api::HttpBody] - # A result object deserialized from the server's reply - def get_api_spec_contents request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_api_spec_contents_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_api_spec_contents", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Api::HttpBody.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # A result object deserialized from the server's reply - def create_api_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_api_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_api_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # A result object deserialized from the server's reply - def update_api_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_api_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_api_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_api_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_api_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the tag_api_spec_revision REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # A result object deserialized from the server's reply - def tag_api_spec_revision request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_tag_api_spec_revision_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "tag_api_spec_revision", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_api_spec_revisions REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse] - # A result object deserialized from the server's reply - def list_api_spec_revisions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_api_spec_revisions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_api_spec_revisions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the rollback_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # A result object deserialized from the server's reply - def rollback_api_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_rollback_api_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "rollback_api_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_api_spec_revision REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # A result object deserialized from the server's reply - def delete_api_spec_revision request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_spec_revision_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_api_spec_revision", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_api_deployments REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse] - # A result object deserialized from the server's reply - def list_api_deployments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_api_deployments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_api_deployments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # A result object deserialized from the server's reply - def get_api_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_api_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_api_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # A result object deserialized from the server's reply - def create_api_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_api_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_api_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # A result object deserialized from the server's reply - def update_api_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_api_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_api_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_api_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_api_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the tag_api_deployment_revision REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # A result object deserialized from the server's reply - def tag_api_deployment_revision request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_tag_api_deployment_revision_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "tag_api_deployment_revision", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_api_deployment_revisions REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse] - # A result object deserialized from the server's reply - def list_api_deployment_revisions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_api_deployment_revisions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_api_deployment_revisions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the rollback_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # A result object deserialized from the server's reply - def rollback_api_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_rollback_api_deployment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "rollback_api_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_api_deployment_revision REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # A result object deserialized from the server's reply - def delete_api_deployment_revision request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_api_deployment_revision_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_api_deployment_revision", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_artifacts REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse] - # A result object deserialized from the server's reply - def list_artifacts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_artifacts_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_artifacts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_artifact REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # A result object deserialized from the server's reply - def get_artifact request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_artifact_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_artifact", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::Artifact.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_artifact_contents REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Api::HttpBody] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Api::HttpBody] - # A result object deserialized from the server's reply - def get_artifact_contents request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_artifact_contents_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_artifact_contents", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Api::HttpBody.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_artifact REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # A result object deserialized from the server's reply - def create_artifact request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_artifact_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_artifact", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::Artifact.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the replace_artifact REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # A result object deserialized from the server's reply - def replace_artifact request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_replace_artifact_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "replace_artifact", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ApigeeRegistry::V1::Artifact.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_artifact REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_artifact request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_artifact_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_artifact", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_apis REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApisRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_apis_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/apis", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_api REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_api_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_api REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_api_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/apis", - body: "api", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_api REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_api_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{api.name}", - body: "api", - matches: [ - ["api.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_api REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_api_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_api_versions REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_api_versions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/versions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_api_version REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_api_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_api_version REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_api_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/versions", - body: "api_version", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_api_version REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_api_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{api_version.name}", - body: "api_version", - matches: [ - ["api_version.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_api_version REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_api_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_api_specs REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_api_specs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/specs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_api_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_api_spec_contents REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_api_spec_contents_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:getContents", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_api_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/specs", - body: "api_spec", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_api_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{api_spec.name}", - body: "api_spec", - matches: [ - ["api_spec.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_api_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the tag_api_spec_revision REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_tag_api_spec_revision_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:tagRevision", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_api_spec_revisions REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_api_spec_revisions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:listRevisions", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the rollback_api_spec REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_rollback_api_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:rollback", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_api_spec_revision REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_api_spec_revision_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}:deleteRevision", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_api_deployments REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_api_deployments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/deployments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_api_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_api_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/deployments", - body: "api_deployment", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_api_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{api_deployment.name}", - body: "api_deployment", - matches: [ - ["api_deployment.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_api_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the tag_api_deployment_revision REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_tag_api_deployment_revision_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:tagRevision", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_api_deployment_revisions REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_api_deployment_revisions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:listRevisions", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the rollback_api_deployment REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_rollback_api_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:rollback", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_api_deployment_revision REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_api_deployment_revision_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}:deleteRevision", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_artifacts REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_artifacts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/artifacts", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/artifacts", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/artifacts", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/artifacts", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/artifacts", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_artifact REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_artifact_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_artifact_contents REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_artifact_contents_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:getContents", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:getContents", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:getContents", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:getContents", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:getContents", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_artifact REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_artifact_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/artifacts", - body: "artifact", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/artifacts", - body: "artifact", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/artifacts", - body: "artifact", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/artifacts", - body: "artifact", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/artifacts", - body: "artifact", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the replace_artifact REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_replace_artifact_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v1/{artifact.name}", - body: "artifact", - matches: [ - ["artifact.name", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :put, - uri_template: "/v1/{artifact.name}", - body: "artifact", - matches: [ - ["artifact.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :put, - uri_template: "/v1/{artifact.name}", - body: "artifact", - matches: [ - ["artifact.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :put, - uri_template: "/v1/{artifact.name}", - body: "artifact", - matches: [ - ["artifact.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :put, - uri_template: "/v1/{artifact.name}", - body: "artifact", - matches: [ - ["artifact.name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_artifact REST call - # - # @param request_pb [::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_artifact_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/versions/[^/]+/specs/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/apis/[^/]+/deployments/[^/]+/artifacts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/rest.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/rest.rb deleted file mode 100644 index 52ceac24ea43..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/apigee_registry/v1/provisioning/rest" -require "google/cloud/apigee_registry/v1/registry/rest" -require "google/cloud/apigee_registry/v1/bindings_override" -require "google/cloud/apigee_registry/v1/version" - -module Google - module Cloud - module ApigeeRegistry - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/apigee_registry/v1/rest" - # client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/version.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/version.rb index 7b4af0c8e859..83dced6251e5 100644 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/version.rb +++ b/google-cloud-apigee_registry-v1/lib/google/cloud/apigee_registry/v1/version.rb @@ -1,6 +1,4 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,14 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - module Google module Cloud module ApigeeRegistry module V1 - VERSION = "0.16.0" + VERSION = "1.0.0" end end end diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/provisioning_service_pb.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/provisioning_service_pb.rb deleted file mode 100644 index f5077b4ec514..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/provisioning_service_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/apigeeregistry/v1/provisioning_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n9google/cloud/apigeeregistry/v1/provisioning_service.proto\x12\x1egoogle.cloud.apigeeregistry.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xad\x01\n\x15\x43reateInstanceRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x18\n\x0binstance_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12?\n\x08instance\x18\x03 \x01(\x0b\x32(.google.cloud.apigeeregistry.v1.InstanceB\x03\xe0\x41\x02\"U\n\x15\x44\x65leteInstanceRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&apigeeregistry.googleapis.com/Instance\"R\n\x12GetInstanceRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&apigeeregistry.googleapis.com/Instance\"\xdd\x01\n\x11OperationMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06target\x18\x03 \x01(\t\x12\x0c\n\x04verb\x18\x04 \x01(\t\x12\x16\n\x0estatus_message\x18\x05 \x01(\t\x12\x1e\n\x16\x63\x61ncellation_requested\x18\x06 \x01(\x08\x12\x13\n\x0b\x61pi_version\x18\x07 \x01(\t\"\xc2\x04\n\x08Instance\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x05state\x18\x04 \x01(\x0e\x32..google.cloud.apigeeregistry.v1.Instance.StateB\x03\xe0\x41\x03\x12\x1a\n\rstate_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x44\n\x06\x63onfig\x18\x06 \x01(\x0b\x32/.google.cloud.apigeeregistry.v1.Instance.ConfigB\x03\xe0\x41\x02\x1a;\n\x06\x43onfig\x12\x15\n\x08location\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rcmek_key_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\"n\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INACTIVE\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\n\n\x06\x41\x43TIVE\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06:i\xea\x41\x66\n&apigeeregistry.googleapis.com/Instance\x12.google.cloud.apigeeregistry.v1.ApiDeployment.AnnotationsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:}\xea\x41z\n+apigeeregistry.googleapis.com/ApiDeployment\x12Kprojects/{project}/locations/{location}/apis/{api}/deployments/{deployment}\"\xb7\x05\n\x08\x41rtifact\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\tmime_type\x18\x04 \x01(\t\x12\x17\n\nsize_bytes\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x12\x11\n\x04hash\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08\x63ontents\x18\x07 \x01(\x0c\x42\x03\xe0\x41\x04:\xda\x03\xea\x41\xd6\x03\n&apigeeregistry.googleapis.com/Artifact\x12\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(apigeeregistry.googleapis.com/ApiVersion\"\xbe\x01\n\x17\x43reateApiVersionRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(apigeeregistry.googleapis.com/ApiVersion\x12\x44\n\x0b\x61pi_version\x18\x02 \x01(\x0b\x32*.google.cloud.apigeeregistry.v1.ApiVersionB\x03\xe0\x41\x02\x12\x1b\n\x0e\x61pi_version_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xa7\x01\n\x17UpdateApiVersionRequest\x12\x44\n\x0b\x61pi_version\x18\x01 \x01(\x0b\x32*.google.cloud.apigeeregistry.v1.ApiVersionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\"h\n\x17\x44\x65leteApiVersionRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(apigeeregistry.googleapis.com/ApiVersion\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\"\x8b\x01\n\x13ListApiSpecsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%apigeeregistry.googleapis.com/ApiSpec\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"k\n\x14ListApiSpecsResponse\x12:\n\tapi_specs\x18\x01 \x03(\x0b\x32\'.google.cloud.apigeeregistry.v1.ApiSpec\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"P\n\x11GetApiSpecRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\"X\n\x19GetApiSpecContentsRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\"\xaf\x01\n\x14\x43reateApiSpecRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%apigeeregistry.googleapis.com/ApiSpec\x12>\n\x08\x61pi_spec\x18\x02 \x01(\x0b\x32\'.google.cloud.apigeeregistry.v1.ApiSpecB\x03\xe0\x41\x02\x12\x18\n\x0b\x61pi_spec_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x9e\x01\n\x14UpdateApiSpecRequest\x12>\n\x08\x61pi_spec\x18\x01 \x01(\x0b\x32\'.google.cloud.apigeeregistry.v1.ApiSpecB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\"b\n\x14\x44\x65leteApiSpecRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\"j\n\x19TagApiSpecRevisionRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\x12\x10\n\x03tag\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x81\x01\n\x1bListApiSpecRevisionsRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"s\n\x1cListApiSpecRevisionsResponse\x12:\n\tapi_specs\x18\x01 \x03(\x0b\x32\'.google.cloud.apigeeregistry.v1.ApiSpec\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"o\n\x16RollbackApiSpecRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"[\n\x1c\x44\x65leteApiSpecRevisionRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%apigeeregistry.googleapis.com/ApiSpec\"\x97\x01\n\x19ListApiDeploymentsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+apigeeregistry.googleapis.com/ApiDeployment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"}\n\x1aListApiDeploymentsResponse\x12\x46\n\x0f\x61pi_deployments\x18\x01 \x03(\x0b\x32-.google.cloud.apigeeregistry.v1.ApiDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\\\n\x17GetApiDeploymentRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+apigeeregistry.googleapis.com/ApiDeployment\"\xcd\x01\n\x1a\x43reateApiDeploymentRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+apigeeregistry.googleapis.com/ApiDeployment\x12J\n\x0e\x61pi_deployment\x18\x02 \x01(\x0b\x32-.google.cloud.apigeeregistry.v1.ApiDeploymentB\x03\xe0\x41\x02\x12\x1e\n\x11\x61pi_deployment_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xb0\x01\n\x1aUpdateApiDeploymentRequest\x12J\n\x0e\x61pi_deployment\x18\x01 \x01(\x0b\x32-.google.cloud.apigeeregistry.v1.ApiDeploymentB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\"n\n\x1a\x44\x65leteApiDeploymentRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+apigeeregistry.googleapis.com/ApiDeployment\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\"v\n\x1fTagApiDeploymentRevisionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+apigeeregistry.googleapis.com/ApiDeployment\x12\x10\n\x03tag\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x8d\x01\n!ListApiDeploymentRevisionsRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+apigeeregistry.googleapis.com/ApiDeployment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x85\x01\n\"ListApiDeploymentRevisionsResponse\x12\x46\n\x0f\x61pi_deployments\x18\x01 \x03(\x0b\x32-.google.cloud.apigeeregistry.v1.ApiDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"{\n\x1cRollbackApiDeploymentRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+apigeeregistry.googleapis.com/ApiDeployment\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"g\n\"DeleteApiDeploymentRevisionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+apigeeregistry.googleapis.com/ApiDeployment\"\x8d\x01\n\x14ListArtifactsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&apigeeregistry.googleapis.com/Artifact\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"m\n\x15ListArtifactsResponse\x12;\n\tartifacts\x18\x01 \x03(\x0b\x32(.google.cloud.apigeeregistry.v1.Artifact\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"R\n\x12GetArtifactRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&apigeeregistry.googleapis.com/Artifact\"Z\n\x1aGetArtifactContentsRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&apigeeregistry.googleapis.com/Artifact\"\xb2\x01\n\x15\x43reateArtifactRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&apigeeregistry.googleapis.com/Artifact\x12?\n\x08\x61rtifact\x18\x02 \x01(\x0b\x32(.google.cloud.apigeeregistry.v1.ArtifactB\x03\xe0\x41\x02\x12\x18\n\x0b\x61rtifact_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"Y\n\x16ReplaceArtifactRequest\x12?\n\x08\x61rtifact\x18\x01 \x01(\x0b\x32(.google.cloud.apigeeregistry.v1.ArtifactB\x03\xe0\x41\x02\"U\n\x15\x44\x65leteArtifactRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&apigeeregistry.googleapis.com/Artifact2\xc0\x45\n\x08Registry\x12\xa8\x01\n\x08ListApis\x12/.google.cloud.apigeeregistry.v1.ListApisRequest\x1a\x30.google.cloud.apigeeregistry.v1.ListApisResponse\"9\xda\x41\x06parent\x82\xd3\xe4\x93\x02*\x12(/v1/{parent=projects/*/locations/*}/apis\x12\x95\x01\n\x06GetApi\x12-.google.cloud.apigeeregistry.v1.GetApiRequest\x1a#.google.cloud.apigeeregistry.v1.Api\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02*\x12(/v1/{name=projects/*/locations/*/apis/*}\x12\xad\x01\n\tCreateApi\x12\x30.google.cloud.apigeeregistry.v1.CreateApiRequest\x1a#.google.cloud.apigeeregistry.v1.Api\"I\xda\x41\x11parent,api,api_id\x82\xd3\xe4\x93\x02/\"(/v1/{parent=projects/*/locations/*}/apis:\x03\x61pi\x12\xaf\x01\n\tUpdateApi\x12\x30.google.cloud.apigeeregistry.v1.UpdateApiRequest\x1a#.google.cloud.apigeeregistry.v1.Api\"K\xda\x41\x0f\x61pi,update_mask\x82\xd3\xe4\x93\x02\x33\x32,/v1/{api.name=projects/*/locations/*/apis/*}:\x03\x61pi\x12\x8e\x01\n\tDeleteApi\x12\x30.google.cloud.apigeeregistry.v1.DeleteApiRequest\x1a\x16.google.protobuf.Empty\"7\xda\x41\x04name\x82\xd3\xe4\x93\x02**(/v1/{name=projects/*/locations/*/apis/*}\x12\xc8\x01\n\x0fListApiVersions\x12\x36.google.cloud.apigeeregistry.v1.ListApiVersionsRequest\x1a\x37.google.cloud.apigeeregistry.v1.ListApiVersionsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*/apis/*}/versions\x12\xb5\x01\n\rGetApiVersion\x12\x34.google.cloud.apigeeregistry.v1.GetApiVersionRequest\x1a*.google.cloud.apigeeregistry.v1.ApiVersion\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/apis/*/versions/*}\x12\xe5\x01\n\x10\x43reateApiVersion\x12\x37.google.cloud.apigeeregistry.v1.CreateApiVersionRequest\x1a*.google.cloud.apigeeregistry.v1.ApiVersion\"l\xda\x41!parent,api_version,api_version_id\x82\xd3\xe4\x93\x02\x42\"3/v1/{parent=projects/*/locations/*/apis/*}/versions:\x0b\x61pi_version\x12\xe7\x01\n\x10UpdateApiVersion\x12\x37.google.cloud.apigeeregistry.v1.UpdateApiVersionRequest\x1a*.google.cloud.apigeeregistry.v1.ApiVersion\"n\xda\x41\x17\x61pi_version,update_mask\x82\xd3\xe4\x93\x02N2?/v1/{api_version.name=projects/*/locations/*/apis/*/versions/*}:\x0b\x61pi_version\x12\xa7\x01\n\x10\x44\x65leteApiVersion\x12\x37.google.cloud.apigeeregistry.v1.DeleteApiVersionRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/apis/*/versions/*}\x12\xc7\x01\n\x0cListApiSpecs\x12\x33.google.cloud.apigeeregistry.v1.ListApiSpecsRequest\x1a\x34.google.cloud.apigeeregistry.v1.ListApiSpecsResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs\x12\xb4\x01\n\nGetApiSpec\x12\x31.google.cloud.apigeeregistry.v1.GetApiSpecRequest\x1a\'.google.cloud.apigeeregistry.v1.ApiSpec\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}\x12\xbd\x01\n\x12GetApiSpecContents\x12\x39.google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest\x1a\x14.google.api.HttpBody\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I\x12G/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:getContents\x12\xdb\x01\n\rCreateApiSpec\x12\x34.google.cloud.apigeeregistry.v1.CreateApiSpecRequest\x1a\'.google.cloud.apigeeregistry.v1.ApiSpec\"k\xda\x41\x1bparent,api_spec,api_spec_id\x82\xd3\xe4\x93\x02G\";/v1/{parent=projects/*/locations/*/apis/*/versions/*}/specs:\x08\x61pi_spec\x12\xdd\x01\n\rUpdateApiSpec\x12\x34.google.cloud.apigeeregistry.v1.UpdateApiSpecRequest\x1a\'.google.cloud.apigeeregistry.v1.ApiSpec\"m\xda\x41\x14\x61pi_spec,update_mask\x82\xd3\xe4\x93\x02P2D/v1/{api_spec.name=projects/*/locations/*/apis/*/versions/*/specs/*}:\x08\x61pi_spec\x12\xa9\x01\n\rDeleteApiSpec\x12\x34.google.cloud.apigeeregistry.v1.DeleteApiSpecRequest\x1a\x16.google.protobuf.Empty\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}\x12\xcc\x01\n\x12TagApiSpecRevision\x12\x39.google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest\x1a\'.google.cloud.apigeeregistry.v1.ApiSpec\"R\x82\xd3\xe4\x93\x02L\"G/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:tagRevision:\x01*\x12\xe4\x01\n\x14ListApiSpecRevisions\x12;.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest\x1a<.google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse\"Q\x82\xd3\xe4\x93\x02K\x12I/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:listRevisions\x12\xc3\x01\n\x0fRollbackApiSpec\x12\x36.google.cloud.apigeeregistry.v1.RollbackApiSpecRequest\x1a\'.google.cloud.apigeeregistry.v1.ApiSpec\"O\x82\xd3\xe4\x93\x02I\"D/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:rollback:\x01*\x12\xd9\x01\n\x15\x44\x65leteApiSpecRevision\x12<.google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest\x1a\'.google.cloud.apigeeregistry.v1.ApiSpec\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L*J/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*}:deleteRevision\x12\xd4\x01\n\x12ListApiDeployments\x12\x39.google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest\x1a:.google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=projects/*/locations/*/apis/*}/deployments\x12\xc1\x01\n\x10GetApiDeployment\x12\x37.google.cloud.apigeeregistry.v1.GetApiDeploymentRequest\x1a-.google.cloud.apigeeregistry.v1.ApiDeployment\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/apis/*/deployments/*}\x12\xfa\x01\n\x13\x43reateApiDeployment\x12:.google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest\x1a-.google.cloud.apigeeregistry.v1.ApiDeployment\"x\xda\x41\'parent,api_deployment,api_deployment_id\x82\xd3\xe4\x93\x02H\"6/v1/{parent=projects/*/locations/*/apis/*}/deployments:\x0e\x61pi_deployment\x12\xfc\x01\n\x13UpdateApiDeployment\x12:.google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest\x1a-.google.cloud.apigeeregistry.v1.ApiDeployment\"z\xda\x41\x1a\x61pi_deployment,update_mask\x82\xd3\xe4\x93\x02W2E/v1/{api_deployment.name=projects/*/locations/*/apis/*/deployments/*}:\x0e\x61pi_deployment\x12\xb0\x01\n\x13\x44\x65leteApiDeployment\x12:.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v1/{name=projects/*/locations/*/apis/*/deployments/*}\x12\xd9\x01\n\x18TagApiDeploymentRevision\x12?.google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest\x1a-.google.cloud.apigeeregistry.v1.ApiDeployment\"M\x82\xd3\xe4\x93\x02G\"B/v1/{name=projects/*/locations/*/apis/*/deployments/*}:tagRevision:\x01*\x12\xf1\x01\n\x1aListApiDeploymentRevisions\x12\x41.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest\x1a\x42.google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse\"L\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=projects/*/locations/*/apis/*/deployments/*}:listRevisions\x12\xd0\x01\n\x15RollbackApiDeployment\x12<.google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest\x1a-.google.cloud.apigeeregistry.v1.ApiDeployment\"J\x82\xd3\xe4\x93\x02\x44\"?/v1/{name=projects/*/locations/*/apis/*/deployments/*}:rollback:\x01*\x12\xe6\x01\n\x1b\x44\x65leteApiDeploymentRevision\x12\x42.google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest\x1a-.google.cloud.apigeeregistry.v1.ApiDeployment\"T\xda\x41\x04name\x82\xd3\xe4\x93\x02G*E/v1/{name=projects/*/locations/*/apis/*/deployments/*}:deleteRevision\x12\xca\x03\n\rListArtifacts\x12\x34.google.cloud.apigeeregistry.v1.ListArtifactsRequest\x1a\x35.google.cloud.apigeeregistry.v1.ListArtifactsResponse\"\xcb\x02\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xbb\x02\x12-/v1/{parent=projects/*/locations/*}/artifactsZ6\x12\x34/v1/{parent=projects/*/locations/*/apis/*}/artifactsZA\x12?/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifactsZI\x12G/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifactsZD\x12\x42/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts\x12\xb7\x03\n\x0bGetArtifact\x12\x32.google.cloud.apigeeregistry.v1.GetArtifactRequest\x1a(.google.cloud.apigeeregistry.v1.Artifact\"\xc9\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\xbb\x02\x12-/v1/{name=projects/*/locations/*/artifacts/*}Z6\x12\x34/v1/{name=projects/*/locations/*/apis/*/artifacts/*}ZA\x12?/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}ZI\x12G/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}ZD\x12\x42/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}\x12\xef\x03\n\x13GetArtifactContents\x12:.google.cloud.apigeeregistry.v1.GetArtifactContentsRequest\x1a\x14.google.api.HttpBody\"\x85\x03\xda\x41\x04name\x82\xd3\xe4\x93\x02\xf7\x02\x12\x39/v1/{name=projects/*/locations/*/artifacts/*}:getContentsZB\x12@/v1/{name=projects/*/locations/*/apis/*/artifacts/*}:getContentsZM\x12K/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}:getContentsZU\x12S/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:getContentsZP\x12N/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}:getContents\x12\x86\x04\n\x0e\x43reateArtifact\x12\x35.google.cloud.apigeeregistry.v1.CreateArtifactRequest\x1a(.google.cloud.apigeeregistry.v1.Artifact\"\x92\x03\xda\x41\x1bparent,artifact,artifact_id\x82\xd3\xe4\x93\x02\xed\x02\"-/v1/{parent=projects/*/locations/*}/artifacts:\x08\x61rtifactZ@\"4/v1/{parent=projects/*/locations/*/apis/*}/artifacts:\x08\x61rtifactZK\"?/v1/{parent=projects/*/locations/*/apis/*/versions/*}/artifacts:\x08\x61rtifactZS\"G/v1/{parent=projects/*/locations/*/apis/*/versions/*/specs/*}/artifacts:\x08\x61rtifactZN\"B/v1/{parent=projects/*/locations/*/apis/*/deployments/*}/artifacts:\x08\x61rtifact\x12\xa2\x04\n\x0fReplaceArtifact\x12\x36.google.cloud.apigeeregistry.v1.ReplaceArtifactRequest\x1a(.google.cloud.apigeeregistry.v1.Artifact\"\xac\x03\xda\x41\x08\x61rtifact\x82\xd3\xe4\x93\x02\x9a\x03\x1a\x36/v1/{artifact.name=projects/*/locations/*/artifacts/*}:\x08\x61rtifactZI\x1a=/v1/{artifact.name=projects/*/locations/*/apis/*/artifacts/*}:\x08\x61rtifactZT\x1aH/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/artifacts/*}:\x08\x61rtifactZ\\\x1aP/v1/{artifact.name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}:\x08\x61rtifactZW\x1aK/v1/{artifact.name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}:\x08\x61rtifact\x12\xab\x03\n\x0e\x44\x65leteArtifact\x12\x35.google.cloud.apigeeregistry.v1.DeleteArtifactRequest\x1a\x16.google.protobuf.Empty\"\xc9\x02\xda\x41\x04name\x82\xd3\xe4\x93\x02\xbb\x02*-/v1/{name=projects/*/locations/*/artifacts/*}Z6*4/v1/{name=projects/*/locations/*/apis/*/artifacts/*}ZA*?/v1/{name=projects/*/locations/*/apis/*/versions/*/artifacts/*}ZI*G/v1/{name=projects/*/locations/*/apis/*/versions/*/specs/*/artifacts/*}ZD*B/v1/{name=projects/*/locations/*/apis/*/deployments/*/artifacts/*}\x1aQ\xca\x41\x1d\x61pigeeregistry.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xee\x01\n\"com.google.cloud.apigeeregistry.v1B\x14RegistryServiceProtoP\x01ZJcloud.google.com/go/apigeeregistry/apiv1/apigeeregistrypb;apigeeregistrypb\xaa\x02\x1eGoogle.Cloud.ApigeeRegistry.V1\xca\x02\x1eGoogle\\Cloud\\ApigeeRegistry\\V1\xea\x02!Google::Cloud::ApigeeRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ApigeeRegistry - module V1 - ListApisRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApisRequest").msgclass - ListApisResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApisResponse").msgclass - GetApiRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetApiRequest").msgclass - CreateApiRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.CreateApiRequest").msgclass - UpdateApiRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.UpdateApiRequest").msgclass - DeleteApiRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteApiRequest").msgclass - ListApiVersionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiVersionsRequest").msgclass - ListApiVersionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiVersionsResponse").msgclass - GetApiVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetApiVersionRequest").msgclass - CreateApiVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.CreateApiVersionRequest").msgclass - UpdateApiVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.UpdateApiVersionRequest").msgclass - DeleteApiVersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteApiVersionRequest").msgclass - ListApiSpecsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiSpecsRequest").msgclass - ListApiSpecsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiSpecsResponse").msgclass - GetApiSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetApiSpecRequest").msgclass - GetApiSpecContentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetApiSpecContentsRequest").msgclass - CreateApiSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.CreateApiSpecRequest").msgclass - UpdateApiSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.UpdateApiSpecRequest").msgclass - DeleteApiSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteApiSpecRequest").msgclass - TagApiSpecRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.TagApiSpecRevisionRequest").msgclass - ListApiSpecRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiSpecRevisionsRequest").msgclass - ListApiSpecRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiSpecRevisionsResponse").msgclass - RollbackApiSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.RollbackApiSpecRequest").msgclass - DeleteApiSpecRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteApiSpecRevisionRequest").msgclass - ListApiDeploymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiDeploymentsRequest").msgclass - ListApiDeploymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiDeploymentsResponse").msgclass - GetApiDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetApiDeploymentRequest").msgclass - CreateApiDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest").msgclass - UpdateApiDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.UpdateApiDeploymentRequest").msgclass - DeleteApiDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteApiDeploymentRequest").msgclass - TagApiDeploymentRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.TagApiDeploymentRevisionRequest").msgclass - ListApiDeploymentRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsRequest").msgclass - ListApiDeploymentRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListApiDeploymentRevisionsResponse").msgclass - RollbackApiDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.RollbackApiDeploymentRequest").msgclass - DeleteApiDeploymentRevisionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteApiDeploymentRevisionRequest").msgclass - ListArtifactsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListArtifactsRequest").msgclass - ListArtifactsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ListArtifactsResponse").msgclass - GetArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetArtifactRequest").msgclass - GetArtifactContentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.GetArtifactContentsRequest").msgclass - CreateArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.CreateArtifactRequest").msgclass - ReplaceArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.ReplaceArtifactRequest").msgclass - DeleteArtifactRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.apigeeregistry.v1.DeleteArtifactRequest").msgclass - end - end - end -end diff --git a/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/registry_service_services_pb.rb b/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/registry_service_services_pb.rb deleted file mode 100644 index 7c6e7268bf8d..000000000000 --- a/google-cloud-apigee_registry-v1/lib/google/cloud/apigeeregistry/v1/registry_service_services_pb.rb +++ /dev/null @@ -1,128 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/apigeeregistry/v1/registry_service.proto for package 'Google.Cloud.ApigeeRegistry.V1' -# Original file comments: -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/apigeeregistry/v1/registry_service_pb' - -module Google - module Cloud - module ApigeeRegistry - module V1 - module Registry - # The Registry service allows teams to manage descriptions of APIs. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.apigeeregistry.v1.Registry' - - # Returns matching APIs. - rpc :ListApis, ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest, ::Google::Cloud::ApigeeRegistry::V1::ListApisResponse - # Returns a specified API. - rpc :GetApi, ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest, ::Google::Cloud::ApigeeRegistry::V1::Api - # Creates a specified API. - rpc :CreateApi, ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest, ::Google::Cloud::ApigeeRegistry::V1::Api - # Used to modify a specified API. - rpc :UpdateApi, ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest, ::Google::Cloud::ApigeeRegistry::V1::Api - # Removes a specified API and all of the resources that it - # owns. - rpc :DeleteApi, ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest, ::Google::Protobuf::Empty - # Returns matching versions. - rpc :ListApiVersions, ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest, ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse - # Returns a specified version. - rpc :GetApiVersion, ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiVersion - # Creates a specified version. - rpc :CreateApiVersion, ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiVersion - # Used to modify a specified version. - rpc :UpdateApiVersion, ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiVersion - # Removes a specified version and all of the resources that - # it owns. - rpc :DeleteApiVersion, ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest, ::Google::Protobuf::Empty - # Returns matching specs. - rpc :ListApiSpecs, ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest, ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse - # Returns a specified spec. - rpc :GetApiSpec, ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiSpec - # Returns the contents of a specified spec. - # If specs are stored with GZip compression, the default behavior - # is to return the spec uncompressed (the mime_type response field - # indicates the exact format returned). - rpc :GetApiSpecContents, ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest, ::Google::Api::HttpBody - # Creates a specified spec. - rpc :CreateApiSpec, ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiSpec - # Used to modify a specified spec. - rpc :UpdateApiSpec, ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiSpec - # Removes a specified spec, all revisions, and all child - # resources (e.g., artifacts). - rpc :DeleteApiSpec, ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest, ::Google::Protobuf::Empty - # Adds a tag to a specified revision of a spec. - rpc :TagApiSpecRevision, ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiSpec - # Lists all revisions of a spec. - # Revisions are returned in descending order of revision creation time. - rpc :ListApiSpecRevisions, ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest, ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse - # Sets the current revision to a specified prior revision. - # Note that this creates a new revision with a new revision ID. - rpc :RollbackApiSpec, ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiSpec - # Deletes a revision of a spec. - rpc :DeleteApiSpecRevision, ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiSpec - # Returns matching deployments. - rpc :ListApiDeployments, ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest, ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse - # Returns a specified deployment. - rpc :GetApiDeployment, ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment - # Creates a specified deployment. - rpc :CreateApiDeployment, ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment - # Used to modify a specified deployment. - rpc :UpdateApiDeployment, ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment - # Removes a specified deployment, all revisions, and all - # child resources (e.g., artifacts). - rpc :DeleteApiDeployment, ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest, ::Google::Protobuf::Empty - # Adds a tag to a specified revision of a - # deployment. - rpc :TagApiDeploymentRevision, ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment - # Lists all revisions of a deployment. - # Revisions are returned in descending order of revision creation time. - rpc :ListApiDeploymentRevisions, ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest, ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse - # Sets the current revision to a specified prior - # revision. Note that this creates a new revision with a new revision ID. - rpc :RollbackApiDeployment, ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment - # Deletes a revision of a deployment. - rpc :DeleteApiDeploymentRevision, ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest, ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment - # Returns matching artifacts. - rpc :ListArtifacts, ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest, ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse - # Returns a specified artifact. - rpc :GetArtifact, ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest, ::Google::Cloud::ApigeeRegistry::V1::Artifact - # Returns the contents of a specified artifact. - # If artifacts are stored with GZip compression, the default behavior - # is to return the artifact uncompressed (the mime_type response field - # indicates the exact format returned). - rpc :GetArtifactContents, ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest, ::Google::Api::HttpBody - # Creates a specified artifact. - rpc :CreateArtifact, ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest, ::Google::Cloud::ApigeeRegistry::V1::Artifact - # Used to replace a specified artifact. - rpc :ReplaceArtifact, ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest, ::Google::Cloud::ApigeeRegistry::V1::Artifact - # Removes a specified artifact. - rpc :DeleteArtifact, ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/google-cloud-apigee_registry-v1/proto_docs/README.md b/google-cloud-apigee_registry-v1/proto_docs/README.md deleted file mode 100644 index 6169ad3a961c..000000000000 --- a/google-cloud-apigee_registry-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Apigee Registry V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/google-cloud-apigee_registry-v1/proto_docs/google/api/client.rb b/google-cloud-apigee_registry-v1/proto_docs/google/api/client.rb deleted file mode 100644 index e62ceba4577a..000000000000 --- a/google-cloud-apigee_registry-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/google-cloud-apigee_registry-v1/proto_docs/google/api/field_behavior.rb b/google-cloud-apigee_registry-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index e4dd25d9abf0..000000000000 --- a/google-cloud-apigee_registry-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/google-cloud-apigee_registry-v1/proto_docs/google/api/httpbody.rb b/google-cloud-apigee_registry-v1/proto_docs/google/api/httpbody.rb deleted file mode 100644 index 5c2ce7600442..000000000000 --- a/google-cloud-apigee_registry-v1/proto_docs/google/api/httpbody.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Message that represents an arbitrary HTTP body. It should only be used for - # payload formats that can't be represented as JSON, such as raw binary or - # an HTML page. - # - # - # This message can be used both in streaming and non-streaming API methods in - # the request as well as the response. - # - # It can be used as a top-level request field, which is convenient if one - # wants to extract parameters from either the URL or HTTP template into the - # request fields and also want access to the raw HTTP body. - # - # Example: - # - # message GetResourceRequest { - # // A unique request id. - # string request_id = 1; - # - # // The raw HTTP body is bound to this field. - # google.api.HttpBody http_body = 2; - # - # } - # - # service ResourceService { - # rpc GetResource(GetResourceRequest) - # returns (google.api.HttpBody); - # rpc UpdateResource(google.api.HttpBody) - # returns (google.protobuf.Empty); - # - # } - # - # Example with streaming methods: - # - # service CaldavService { - # rpc GetCalendar(stream google.api.HttpBody) - # returns (stream google.api.HttpBody); - # rpc UpdateCalendar(stream google.api.HttpBody) - # returns (stream google.api.HttpBody); - # - # } - # - # Use of this type only changes how the request and response bodies are - # handled, all other features will continue to work unchanged. - # @!attribute [rw] content_type - # @return [::String] - # The HTTP Content-Type header value specifying the content type of the body. - # @!attribute [rw] data - # @return [::String] - # The HTTP request/response body as raw binary. - # @!attribute [rw] extensions - # @return [::Array<::Google::Protobuf::Any>] - # Application specific response metadata. Must be set in the first response - # for streaming APIs. - class HttpBody - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/google-cloud-apigee_registry-v1/proto_docs/google/api/launch_stage.rb b/google-cloud-apigee_registry-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index ce75038366ae..000000000000 --- a/google-cloud-apigee_registry-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/google-cloud-apigee_registry-v1/proto_docs/google/api/resource.rb b/google-cloud-apigee_registry-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 4c81798041c0..000000000000 --- a/google-cloud-apigee_registry-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/provisioning_service.rb b/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/provisioning_service.rb deleted file mode 100644 index 6c452b5fd891..000000000000 --- a/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/provisioning_service.rb +++ /dev/null @@ -1,157 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ApigeeRegistry - module V1 - # Request message for CreateInstance. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource of the Instance, of the form: `projects/*/locations/*` - # @!attribute [rw] instance_id - # @return [::String] - # Required. Identifier to assign to the Instance. Must be unique within scope of the - # parent resource. - # @!attribute [rw] instance - # @return [::Google::Cloud::ApigeeRegistry::V1::Instance] - # Required. The Instance. - class CreateInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteInstance. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the Instance to delete. - # Format: `projects/*/locations/*/instances/*`. - class DeleteInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetInstance. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the Instance to retrieve. - # Format: `projects/*/locations/*/instances/*`. - class GetInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the long-running operation. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time the operation was created. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time the operation finished running. - # @!attribute [rw] target - # @return [::String] - # Server-defined resource path for the target of the operation. - # @!attribute [rw] verb - # @return [::String] - # Name of the verb executed by the operation. - # @!attribute [rw] status_message - # @return [::String] - # Human-readable status of the operation, if any. - # @!attribute [rw] cancellation_requested - # @return [::Boolean] - # Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have [Operation.error][] value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # @!attribute [rw] api_version - # @return [::String] - # API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An Instance represents the instance resources of the Registry. - # Currently, only one instance is allowed for each project. - # @!attribute [rw] name - # @return [::String] - # Format: `projects/*/locations/*/instance`. - # Currently only `locations/global` is supported. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation timestamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update timestamp. - # @!attribute [r] state - # @return [::Google::Cloud::ApigeeRegistry::V1::Instance::State] - # Output only. The current state of the Instance. - # @!attribute [r] state_message - # @return [::String] - # Output only. Extra information of Instance.State if the state is `FAILED`. - # @!attribute [rw] config - # @return [::Google::Cloud::ApigeeRegistry::V1::Instance::Config] - # Required. Config of the Instance. - class Instance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Available configurations to provision an Instance. - # @!attribute [r] location - # @return [::String] - # Output only. The GCP location where the Instance resides. - # @!attribute [rw] cmek_key_name - # @return [::String] - # Required. The Customer Managed Encryption Key (CMEK) used for data encryption. - # The CMEK name should follow the format of - # `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`, - # where the `location` must match InstanceConfig.location. - class Config - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # State of the Instance. - module State - # The default value. This value is used if the state is omitted. - STATE_UNSPECIFIED = 0 - - # The Instance has not been initialized or has been deleted. - INACTIVE = 1 - - # The Instance is being created. - CREATING = 2 - - # The Instance has been created and is ready for use. - ACTIVE = 3 - - # The Instance is being updated. - UPDATING = 4 - - # The Instance is being deleted. - DELETING = 5 - - # The Instance encountered an error during a state change. - FAILED = 6 - end - end - end - end - end -end diff --git a/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_models.rb b/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_models.rb deleted file mode 100644 index 75d4689037b2..000000000000 --- a/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_models.rb +++ /dev/null @@ -1,407 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ApigeeRegistry - module V1 - # A top-level description of an API. - # Produced by producers and are commitments to provide services. - # @!attribute [rw] name - # @return [::String] - # Resource name. - # @!attribute [rw] display_name - # @return [::String] - # Human-meaningful name. - # @!attribute [rw] description - # @return [::String] - # A detailed description. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation timestamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update timestamp. - # @!attribute [rw] availability - # @return [::String] - # A user-definable description of the availability of this service. - # Format: free-form, but we expect single words that describe availability, - # e.g., "NONE", "TESTING", "PREVIEW", "GENERAL", "DEPRECATED", "SHUTDOWN". - # @!attribute [rw] recommended_version - # @return [::String] - # The recommended version of the API. - # Format: `apis/{api}/versions/{version}` - # @!attribute [rw] recommended_deployment - # @return [::String] - # The recommended deployment of the API. - # Format: `apis/{api}/deployments/{deployment}` - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels attach identifying metadata to resources. Identifying metadata can - # be used to filter list operations. - # - # Label keys and values can be no longer than 64 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores, and dashes. International characters are allowed. - # No more than 64 user labels can be associated with one resource (System - # labels are excluded). - # - # See https://goo.gl/xmQnxf for more information and examples of labels. - # System reserved label keys are prefixed with - # `apigeeregistry.googleapis.com/` and cannot be changed. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Annotations attach non-identifying metadata to resources. - # - # Annotation keys and values are less restricted than those of labels, but - # should be generally used for small values of broad interest. Larger, topic- - # specific metadata should be stored in Artifacts. - class Api - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes a particular version of an API. - # ApiVersions are what consumers actually use. - # @!attribute [rw] name - # @return [::String] - # Resource name. - # @!attribute [rw] display_name - # @return [::String] - # Human-meaningful name. - # @!attribute [rw] description - # @return [::String] - # A detailed description. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation timestamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update timestamp. - # @!attribute [rw] state - # @return [::String] - # A user-definable description of the lifecycle phase of this API version. - # Format: free-form, but we expect single words that describe API maturity, - # e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION", - # "DEPRECATED", "RETIRED". - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels attach identifying metadata to resources. Identifying metadata can - # be used to filter list operations. - # - # Label keys and values can be no longer than 64 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # No more than 64 user labels can be associated with one resource (System - # labels are excluded). - # - # See https://goo.gl/xmQnxf for more information and examples of labels. - # System reserved label keys are prefixed with - # `apigeeregistry.googleapis.com/` and cannot be changed. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Annotations attach non-identifying metadata to resources. - # - # Annotation keys and values are less restricted than those of labels, but - # should be generally used for small values of broad interest. Larger, topic- - # specific metadata should be stored in Artifacts. - class ApiVersion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes a version of an API in a structured way. - # ApiSpecs provide formal descriptions that consumers can use to use a version. - # ApiSpec resources are intended to be fully-resolved descriptions of an - # ApiVersion. When specs consist of multiple files, these should be bundled - # together (e.g., in a zip archive) and stored as a unit. Multiple specs can - # exist to provide representations in different API description formats. - # Synchronization of these representations would be provided by tooling and - # background services. - # @!attribute [rw] name - # @return [::String] - # Resource name. - # @!attribute [rw] filename - # @return [::String] - # A possibly-hierarchical name used to refer to the spec from other specs. - # @!attribute [rw] description - # @return [::String] - # A detailed description. - # @!attribute [r] revision_id - # @return [::String] - # Output only. Immutable. The revision ID of the spec. - # A new revision is committed whenever the spec contents are changed. - # The format is an 8-character hexadecimal string. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation timestamp; when the spec resource was created. - # @!attribute [r] revision_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Revision creation timestamp; when the represented revision was created. - # @!attribute [r] revision_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update timestamp: when the represented revision was last modified. - # @!attribute [rw] mime_type - # @return [::String] - # A style (format) descriptor for this spec that is specified as a Media Type - # (https://en.wikipedia.org/wiki/Media_type). Possible values include - # `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and - # `application/vnd.apigee.graphql`, with possible suffixes representing - # compression types. These hypothetical names are defined in the vendor tree - # defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final. - # Content types can specify compression. Currently only GZip compression is - # supported (indicated with "+gzip"). - # @!attribute [r] size_bytes - # @return [::Integer] - # Output only. The size of the spec file in bytes. If the spec is gzipped, this is the - # size of the uncompressed spec. - # @!attribute [r] hash - # @return [::String] - # Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is - # the hash of the uncompressed spec. - # @!attribute [rw] source_uri - # @return [::String] - # The original source URI of the spec (if one exists). - # This is an external location that can be used for reference purposes - # but which may not be authoritative since this external resource may - # change after the spec is retrieved. - # @!attribute [rw] contents - # @return [::String] - # Input only. The contents of the spec. - # Provided by API callers when specs are created or updated. - # To access the contents of a spec, use GetApiSpecContents. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels attach identifying metadata to resources. Identifying metadata can - # be used to filter list operations. - # - # Label keys and values can be no longer than 64 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # No more than 64 user labels can be associated with one resource (System - # labels are excluded). - # - # See https://goo.gl/xmQnxf for more information and examples of labels. - # System reserved label keys are prefixed with - # `apigeeregistry.googleapis.com/` and cannot be changed. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Annotations attach non-identifying metadata to resources. - # - # Annotation keys and values are less restricted than those of labels, but - # should be generally used for small values of broad interest. Larger, topic- - # specific metadata should be stored in Artifacts. - class ApiSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes a service running at particular address that - # provides a particular version of an API. ApiDeployments have revisions which - # correspond to different configurations of a single deployment in time. - # Revision identifiers should be updated whenever the served API spec or - # endpoint address changes. - # @!attribute [rw] name - # @return [::String] - # Resource name. - # @!attribute [rw] display_name - # @return [::String] - # Human-meaningful name. - # @!attribute [rw] description - # @return [::String] - # A detailed description. - # @!attribute [r] revision_id - # @return [::String] - # Output only. Immutable. The revision ID of the deployment. - # A new revision is committed whenever the deployment contents are changed. - # The format is an 8-character hexadecimal string. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation timestamp; when the deployment resource was created. - # @!attribute [r] revision_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Revision creation timestamp; when the represented revision was created. - # @!attribute [r] revision_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update timestamp: when the represented revision was last modified. - # @!attribute [rw] api_spec_revision - # @return [::String] - # The full resource name (including revision ID) of the spec of the API being - # served by the deployment. Changes to this value will update the revision. - # Format: `apis/{api}/deployments/{deployment}` - # @!attribute [rw] endpoint_uri - # @return [::String] - # The address where the deployment is serving. Changes to this value will - # update the revision. - # @!attribute [rw] external_channel_uri - # @return [::String] - # The address of the external channel of the API (e.g., the Developer - # Portal). Changes to this value will not affect the revision. - # @!attribute [rw] intended_audience - # @return [::String] - # Text briefly identifying the intended audience of the API. Changes to this - # value will not affect the revision. - # @!attribute [rw] access_guidance - # @return [::String] - # Text briefly describing how to access the endpoint. Changes to this value - # will not affect the revision. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels attach identifying metadata to resources. Identifying metadata can - # be used to filter list operations. - # - # Label keys and values can be no longer than 64 characters - # (Unicode codepoints), can only contain lowercase letters, numeric - # characters, underscores and dashes. International characters are allowed. - # No more than 64 user labels can be associated with one resource (System - # labels are excluded). - # - # See https://goo.gl/xmQnxf for more information and examples of labels. - # System reserved label keys are prefixed with - # `apigeeregistry.googleapis.com/` and cannot be changed. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Annotations attach non-identifying metadata to resources. - # - # Annotation keys and values are less restricted than those of labels, but - # should be generally used for small values of broad interest. Larger, topic- - # specific metadata should be stored in Artifacts. - class ApiDeployment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Artifacts of resources. Artifacts are unique (single-value) per resource - # and are used to store metadata that is too large or numerous to be stored - # directly on the resource. Since artifacts are stored separately from parent - # resources, they should generally be used for metadata that is needed - # infrequently, i.e., not for display in primary views of the resource but - # perhaps displayed or downloaded upon request. The `ListArtifacts` method - # allows artifacts to be quickly enumerated and checked for presence without - # downloading their (potentially-large) contents. - # @!attribute [rw] name - # @return [::String] - # Resource name. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation timestamp. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update timestamp. - # @!attribute [rw] mime_type - # @return [::String] - # A content type specifier for the artifact. - # Content type specifiers are Media Types - # (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" - # parameter that specifies a schema for the stored information. - # Content types can specify compression. Currently only GZip compression is - # supported (indicated with "+gzip"). - # @!attribute [r] size_bytes - # @return [::Integer] - # Output only. The size of the artifact in bytes. If the artifact is gzipped, this is - # the size of the uncompressed artifact. - # @!attribute [r] hash - # @return [::String] - # Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, - # this is the hash of the uncompressed artifact. - # @!attribute [rw] contents - # @return [::String] - # Input only. The contents of the artifact. - # Provided by API callers when artifacts are created or replaced. - # To access the contents of an artifact, use GetArtifactContents. - class Artifact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_service.rb b/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_service.rb deleted file mode 100644 index 69537a285a61..000000000000 --- a/google-cloud-apigee_registry-v1/proto_docs/google/cloud/apigeeregistry/v1/registry_service.rb +++ /dev/null @@ -1,712 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module ApigeeRegistry - module V1 - # Request message for ListApis. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of APIs. - # Format: `projects/*/locations/*` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of APIs to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListApis` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApis` must match - # the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields. - class ListApisRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListApis. - # @!attribute [rw] apis - # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::Api>] - # The APIs from the specified publisher. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListApisResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetApi. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the API to retrieve. - # Format: `projects/*/locations/*/apis/*` - class GetApiRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateApi. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of APIs. - # Format: `projects/*/locations/*` - # @!attribute [rw] api - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # Required. The API to create. - # @!attribute [rw] api_id - # @return [::String] - # Required. The ID to use for the API, which will become the final component of - # the API's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - class CreateApiRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateApi. - # @!attribute [rw] api - # @return [::Google::Cloud::ApigeeRegistry::V1::Api] - # Required. The API to update. - # - # The `name` field is used to identify the API to update. - # Format: `projects/*/locations/*/apis/*` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # If set to true, and the API is not found, a new API will be created. - # In this situation, `update_mask` is ignored. - class UpdateApiRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteApi. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the API to delete. - # Format: `projects/*/locations/*/apis/*` - # @!attribute [rw] force - # @return [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - class DeleteApiRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListApiVersions. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of versions. - # Format: `projects/*/locations/*/apis/*` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of versions to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListApiVersions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApiVersions` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields. - class ListApiVersionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListApiVersions. - # @!attribute [rw] api_versions - # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::ApiVersion>] - # The versions from the specified publisher. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListApiVersionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetApiVersion. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the version to retrieve. - # Format: `projects/*/locations/*/apis/*/versions/*` - class GetApiVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateApiVersion. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of versions. - # Format: `projects/*/locations/*/apis/*` - # @!attribute [rw] api_version - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # Required. The version to create. - # @!attribute [rw] api_version_id - # @return [::String] - # Required. The ID to use for the version, which will become the final component of - # the version's resource name. - # - # This value should be 1-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - class CreateApiVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateApiVersion. - # @!attribute [rw] api_version - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiVersion] - # Required. The version to update. - # - # The `name` field is used to identify the version to update. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # If set to true, and the version is not found, a new version will be - # created. In this situation, `update_mask` is ignored. - class UpdateApiVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteApiVersion. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the version to delete. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @!attribute [rw] force - # @return [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - class DeleteApiVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListApiSpecs. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of specs. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of specs to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListApiSpecs` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApiSpecs` must match - # the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields except contents. - class ListApiSpecsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListApiSpecs. - # @!attribute [rw] api_specs - # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] - # The specs from the specified publisher. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListApiSpecsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetApiSpec. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the spec to retrieve. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - class GetApiSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetApiSpecContents. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the spec whose contents should be retrieved. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - class GetApiSpecContentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateApiSpec. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of specs. - # Format: `projects/*/locations/*/apis/*/versions/*` - # @!attribute [rw] api_spec - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # Required. The spec to create. - # @!attribute [rw] api_spec_id - # @return [::String] - # Required. The ID to use for the spec, which will become the final component of - # the spec's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - class CreateApiSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateApiSpec. - # @!attribute [rw] api_spec - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiSpec] - # Required. The spec to update. - # - # The `name` field is used to identify the spec to update. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # If set to true, and the spec is not found, a new spec will be created. - # In this situation, `update_mask` is ignored. - class UpdateApiSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteApiSpec. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the spec to delete. - # Format: `projects/*/locations/*/apis/*/versions/*/specs/*` - # @!attribute [rw] force - # @return [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - class DeleteApiSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for TagApiSpecRevision. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the spec to be tagged, including the revision ID. - # @!attribute [rw] tag - # @return [::String] - # Required. The tag to apply. - # The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. - class TagApiSpecRevisionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListApiSpecRevisions. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the spec to list revisions for. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of revisions to return per page. - # @!attribute [rw] page_token - # @return [::String] - # The page token, received from a previous ListApiSpecRevisions call. - # Provide this to retrieve the subsequent page. - class ListApiSpecRevisionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListApiSpecRevisionsResponse. - # @!attribute [rw] api_specs - # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::ApiSpec>] - # The revisions of the spec. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListApiSpecRevisionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for RollbackApiSpec. - # @!attribute [rw] name - # @return [::String] - # Required. The spec being rolled back. - # @!attribute [rw] revision_id - # @return [::String] - # Required. The revision ID to roll back to. - # It must be a revision of the same spec. - # - # Example: `c7cfa2a8` - class RollbackApiSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteApiSpecRevision. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the spec revision to be deleted, - # with a revision ID explicitly included. - # - # Example: - # `projects/sample/locations/global/apis/petstore/versions/1.0.0/specs/openapi.yaml@c7cfa2a8` - class DeleteApiSpecRevisionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListApiDeployments. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of deployments. - # Format: `projects/*/locations/*/apis/*` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of deployments to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListApiDeployments` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListApiDeployments` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields. - class ListApiDeploymentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListApiDeployments. - # @!attribute [rw] api_deployments - # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] - # The deployments from the specified publisher. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListApiDeploymentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetApiDeployment. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the deployment to retrieve. - # Format: `projects/*/locations/*/apis/*/deployments/*` - class GetApiDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateApiDeployment. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of deployments. - # Format: `projects/*/locations/*/apis/*` - # @!attribute [rw] api_deployment - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # Required. The deployment to create. - # @!attribute [rw] api_deployment_id - # @return [::String] - # Required. The ID to use for the deployment, which will become the final component of - # the deployment's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - class CreateApiDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateApiDeployment. - # @!attribute [rw] api_deployment - # @return [::Google::Cloud::ApigeeRegistry::V1::ApiDeployment] - # Required. The deployment to update. - # - # The `name` field is used to identify the deployment to update. - # Format: `projects/*/locations/*/apis/*/deployments/*` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. If omitted, all fields are updated that - # are set in the request message (fields set to default values are ignored). - # If an asterisk "*" is specified, all fields are updated, including fields - # that are unspecified/default in the request. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # If set to true, and the deployment is not found, a new deployment will be - # created. In this situation, `update_mask` is ignored. - class UpdateApiDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteApiDeployment. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the deployment to delete. - # Format: `projects/*/locations/*/apis/*/deployments/*` - # @!attribute [rw] force - # @return [::Boolean] - # If set to true, any child resources will also be deleted. - # (Otherwise, the request will only work if there are no child resources.) - class DeleteApiDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for TagApiDeploymentRevision. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the deployment to be tagged, including the revision ID. - # @!attribute [rw] tag - # @return [::String] - # Required. The tag to apply. - # The tag should be at most 40 characters, and match `[a-z][a-z0-9-]{3,39}`. - class TagApiDeploymentRevisionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListApiDeploymentRevisions. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the deployment to list revisions for. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of revisions to return per page. - # @!attribute [rw] page_token - # @return [::String] - # The page token, received from a previous ListApiDeploymentRevisions call. - # Provide this to retrieve the subsequent page. - class ListApiDeploymentRevisionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListApiDeploymentRevisionsResponse. - # @!attribute [rw] api_deployments - # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::ApiDeployment>] - # The revisions of the deployment. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListApiDeploymentRevisionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for RollbackApiDeployment. - # @!attribute [rw] name - # @return [::String] - # Required. The deployment being rolled back. - # @!attribute [rw] revision_id - # @return [::String] - # Required. The revision ID to roll back to. - # It must be a revision of the same deployment. - # - # Example: `c7cfa2a8` - class RollbackApiDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteApiDeploymentRevision. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the deployment revision to be deleted, - # with a revision ID explicitly included. - # - # Example: - # `projects/sample/locations/global/apis/petstore/deployments/prod@c7cfa2a8` - class DeleteApiDeploymentRevisionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListArtifacts. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of artifacts. - # Format: `{parent}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of artifacts to return. - # The service may return fewer than this value. - # If unspecified, at most 50 values will be returned. - # The maximum is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListArtifacts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListArtifacts` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # An expression that can be used to filter the list. Filters use the Common - # Expression Language and can refer to all message fields except contents. - class ListArtifactsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListArtifacts. - # @!attribute [rw] artifacts - # @return [::Array<::Google::Cloud::ApigeeRegistry::V1::Artifact>] - # The artifacts from the specified publisher. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListArtifactsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetArtifact. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the artifact to retrieve. - # Format: `{parent}/artifacts/*` - class GetArtifactRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetArtifactContents. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the artifact whose contents should be retrieved. - # Format: `{parent}/artifacts/*` - class GetArtifactContentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateArtifact. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of artifacts. - # Format: `{parent}` - # @!attribute [rw] artifact - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # Required. The artifact to create. - # @!attribute [rw] artifact_id - # @return [::String] - # Required. The ID to use for the artifact, which will become the final component of - # the artifact's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # Following AIP-162, IDs must not have the form of a UUID. - class CreateArtifactRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ReplaceArtifact. - # @!attribute [rw] artifact - # @return [::Google::Cloud::ApigeeRegistry::V1::Artifact] - # Required. The artifact to replace. - # - # The `name` field is used to identify the artifact to replace. - # Format: `{parent}/artifacts/*` - class ReplaceArtifactRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteArtifact. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the artifact to delete. - # Format: `{parent}/artifacts/*` - class DeleteArtifactRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-apigee_registry-v1/proto_docs/google/longrunning/operations.rb b/google-cloud-apigee_registry-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 1a586e810a23..000000000000 --- a/google-cloud-apigee_registry-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/any.rb b/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 2c946be5a11d..000000000000 --- a/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/duration.rb b/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ca97d06a00ef..000000000000 --- a/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/empty.rb b/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 1cfb8de8987e..000000000000 --- a/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 5f816f4a2702..000000000000 --- a/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index dc016e2c9eca..000000000000 --- a/google-cloud-apigee_registry-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/google-cloud-apigee_registry-v1/proto_docs/google/rpc/status.rb b/google-cloud-apigee_registry-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index f976dec8daa9..000000000000 --- a/google-cloud-apigee_registry-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/google-cloud-apigee_registry-v1/proto_docs/google/type/expr.rb b/google-cloud-apigee_registry-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 0602180c6ada..000000000000 --- a/google-cloud-apigee_registry-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/google-cloud-apigee_registry-v1/snippets/Gemfile b/google-cloud-apigee_registry-v1/snippets/Gemfile deleted file mode 100644 index 3558e3b8f638..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-apigee_registry-v1", path: "../" -else - gem "google-cloud-apigee_registry-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/google-cloud-apigee_registry-v1/snippets/provisioning/create_instance.rb b/google-cloud-apigee_registry-v1/snippets/provisioning/create_instance.rb deleted file mode 100644 index 6cc13a13a098..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/provisioning/create_instance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Provisioning_CreateInstance_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the create_instance call in the Provisioning service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#create_instance. -# -def create_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new - - # Call the create_instance method. - result = client.create_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apigeeregistry_v1_generated_Provisioning_CreateInstance_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/provisioning/delete_instance.rb b/google-cloud-apigee_registry-v1/snippets/provisioning/delete_instance.rb deleted file mode 100644 index f5cacc89c831..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/provisioning/delete_instance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Provisioning_DeleteInstance_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the delete_instance call in the Provisioning service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#delete_instance. -# -def delete_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.new - - # Call the delete_instance method. - result = client.delete_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END apigeeregistry_v1_generated_Provisioning_DeleteInstance_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/provisioning/get_instance.rb b/google-cloud-apigee_registry-v1/snippets/provisioning/get_instance.rb deleted file mode 100644 index 88d8815c4e5b..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/provisioning/get_instance.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Provisioning_GetInstance_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the get_instance call in the Provisioning service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#get_instance. -# -def get_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new - - # Call the get_instance method. - result = client.get_instance request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Instance. - p result -end -# [END apigeeregistry_v1_generated_Provisioning_GetInstance_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/create_api.rb b/google-cloud-apigee_registry-v1/snippets/registry/create_api.rb deleted file mode 100644 index b88533269f69..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/create_api.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_CreateApi_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the create_api call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api. -# -def create_api - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new - - # Call the create_api method. - result = client.create_api request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. - p result -end -# [END apigeeregistry_v1_generated_Registry_CreateApi_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/create_api_deployment.rb b/google-cloud-apigee_registry-v1/snippets/registry/create_api_deployment.rb deleted file mode 100644 index 7f70b624e108..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/create_api_deployment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_CreateApiDeployment_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the create_api_deployment call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_deployment. -# -def create_api_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new - - # Call the create_api_deployment method. - result = client.create_api_deployment request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - p result -end -# [END apigeeregistry_v1_generated_Registry_CreateApiDeployment_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/create_api_spec.rb b/google-cloud-apigee_registry-v1/snippets/registry/create_api_spec.rb deleted file mode 100644 index 4f9c2b86cc62..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/create_api_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_CreateApiSpec_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the create_api_spec call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_spec. -# -def create_api_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new - - # Call the create_api_spec method. - result = client.create_api_spec request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - p result -end -# [END apigeeregistry_v1_generated_Registry_CreateApiSpec_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/create_api_version.rb b/google-cloud-apigee_registry-v1/snippets/registry/create_api_version.rb deleted file mode 100644 index 686d0f2b0bd4..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/create_api_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_CreateApiVersion_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the create_api_version call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_version. -# -def create_api_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new - - # Call the create_api_version method. - result = client.create_api_version request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. - p result -end -# [END apigeeregistry_v1_generated_Registry_CreateApiVersion_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/create_artifact.rb b/google-cloud-apigee_registry-v1/snippets/registry/create_artifact.rb deleted file mode 100644 index 9183d6edb868..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/create_artifact.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_CreateArtifact_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the create_artifact call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_artifact. -# -def create_artifact - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new - - # Call the create_artifact method. - result = client.create_artifact request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. - p result -end -# [END apigeeregistry_v1_generated_Registry_CreateArtifact_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/delete_api.rb b/google-cloud-apigee_registry-v1/snippets/registry/delete_api.rb deleted file mode 100644 index 52e3404bf886..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/delete_api.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_DeleteApi_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the delete_api call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api. -# -def delete_api - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.new - - # Call the delete_api method. - result = client.delete_api request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END apigeeregistry_v1_generated_Registry_DeleteApi_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment.rb b/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment.rb deleted file mode 100644 index f3b67c3e4be5..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_DeleteApiDeployment_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the delete_api_deployment call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_deployment. -# -def delete_api_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.new - - # Call the delete_api_deployment method. - result = client.delete_api_deployment request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END apigeeregistry_v1_generated_Registry_DeleteApiDeployment_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment_revision.rb b/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment_revision.rb deleted file mode 100644 index 2619817afe0c..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/delete_api_deployment_revision.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the delete_api_deployment_revision call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_deployment_revision. -# -def delete_api_deployment_revision - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new - - # Call the delete_api_deployment_revision method. - result = client.delete_api_deployment_revision request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - p result -end -# [END apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec.rb b/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec.rb deleted file mode 100644 index 3609a92867ff..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_DeleteApiSpec_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the delete_api_spec call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_spec. -# -def delete_api_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.new - - # Call the delete_api_spec method. - result = client.delete_api_spec request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END apigeeregistry_v1_generated_Registry_DeleteApiSpec_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec_revision.rb b/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec_revision.rb deleted file mode 100644 index b8c732bd650d..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/delete_api_spec_revision.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the delete_api_spec_revision call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_spec_revision. -# -def delete_api_spec_revision - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new - - # Call the delete_api_spec_revision method. - result = client.delete_api_spec_revision request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - p result -end -# [END apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/delete_api_version.rb b/google-cloud-apigee_registry-v1/snippets/registry/delete_api_version.rb deleted file mode 100644 index e258b13ff8f3..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/delete_api_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_DeleteApiVersion_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the delete_api_version call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_version. -# -def delete_api_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.new - - # Call the delete_api_version method. - result = client.delete_api_version request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END apigeeregistry_v1_generated_Registry_DeleteApiVersion_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/delete_artifact.rb b/google-cloud-apigee_registry-v1/snippets/registry/delete_artifact.rb deleted file mode 100644 index 22c2980437e7..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/delete_artifact.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_DeleteArtifact_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the delete_artifact call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_artifact. -# -def delete_artifact - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new - - # Call the delete_artifact method. - result = client.delete_artifact request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END apigeeregistry_v1_generated_Registry_DeleteArtifact_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/get_api.rb b/google-cloud-apigee_registry-v1/snippets/registry/get_api.rb deleted file mode 100644 index 2ca6a4f647ac..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/get_api.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_GetApi_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the get_api call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api. -# -def get_api - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new - - # Call the get_api method. - result = client.get_api request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. - p result -end -# [END apigeeregistry_v1_generated_Registry_GetApi_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/get_api_deployment.rb b/google-cloud-apigee_registry-v1/snippets/registry/get_api_deployment.rb deleted file mode 100644 index 35c9a6738fb3..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/get_api_deployment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_GetApiDeployment_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the get_api_deployment call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_deployment. -# -def get_api_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new - - # Call the get_api_deployment method. - result = client.get_api_deployment request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - p result -end -# [END apigeeregistry_v1_generated_Registry_GetApiDeployment_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec.rb b/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec.rb deleted file mode 100644 index de462dd4558d..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_GetApiSpec_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the get_api_spec call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_spec. -# -def get_api_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new - - # Call the get_api_spec method. - result = client.get_api_spec request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - p result -end -# [END apigeeregistry_v1_generated_Registry_GetApiSpec_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec_contents.rb b/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec_contents.rb deleted file mode 100644 index 744114fe8a09..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/get_api_spec_contents.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_GetApiSpecContents_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the get_api_spec_contents call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_spec_contents. -# -def get_api_spec_contents - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new - - # Call the get_api_spec_contents method. - result = client.get_api_spec_contents request - - # The returned object is of type Google::Api::HttpBody. - p result -end -# [END apigeeregistry_v1_generated_Registry_GetApiSpecContents_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/get_api_version.rb b/google-cloud-apigee_registry-v1/snippets/registry/get_api_version.rb deleted file mode 100644 index 69658351f3ad..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/get_api_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_GetApiVersion_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the get_api_version call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_version. -# -def get_api_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new - - # Call the get_api_version method. - result = client.get_api_version request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. - p result -end -# [END apigeeregistry_v1_generated_Registry_GetApiVersion_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/get_artifact.rb b/google-cloud-apigee_registry-v1/snippets/registry/get_artifact.rb deleted file mode 100644 index 808624cc8b0b..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/get_artifact.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_GetArtifact_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the get_artifact call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_artifact. -# -def get_artifact - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new - - # Call the get_artifact method. - result = client.get_artifact request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. - p result -end -# [END apigeeregistry_v1_generated_Registry_GetArtifact_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/get_artifact_contents.rb b/google-cloud-apigee_registry-v1/snippets/registry/get_artifact_contents.rb deleted file mode 100644 index fa6ac711bd38..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/get_artifact_contents.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_GetArtifactContents_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the get_artifact_contents call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_artifact_contents. -# -def get_artifact_contents - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new - - # Call the get_artifact_contents method. - result = client.get_artifact_contents request - - # The returned object is of type Google::Api::HttpBody. - p result -end -# [END apigeeregistry_v1_generated_Registry_GetArtifactContents_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployment_revisions.rb b/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployment_revisions.rb deleted file mode 100644 index 8ea4f0ba311f..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployment_revisions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the list_api_deployment_revisions call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_deployment_revisions. -# -def list_api_deployment_revisions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.new - - # Call the list_api_deployment_revisions method. - result = client.list_api_deployment_revisions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - p item - end -end -# [END apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployments.rb b/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployments.rb deleted file mode 100644 index 650937b0bd5c..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/list_api_deployments.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_ListApiDeployments_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the list_api_deployments call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_deployments. -# -def list_api_deployments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.new - - # Call the list_api_deployments method. - result = client.list_api_deployments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - p item - end -end -# [END apigeeregistry_v1_generated_Registry_ListApiDeployments_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/list_api_spec_revisions.rb b/google-cloud-apigee_registry-v1/snippets/registry/list_api_spec_revisions.rb deleted file mode 100644 index 81fcd06e4683..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/list_api_spec_revisions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the list_api_spec_revisions call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_spec_revisions. -# -def list_api_spec_revisions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.new - - # Call the list_api_spec_revisions method. - result = client.list_api_spec_revisions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiSpec. - p item - end -end -# [END apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/list_api_specs.rb b/google-cloud-apigee_registry-v1/snippets/registry/list_api_specs.rb deleted file mode 100644 index da2ebee9187d..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/list_api_specs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_ListApiSpecs_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the list_api_specs call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_specs. -# -def list_api_specs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.new - - # Call the list_api_specs method. - result = client.list_api_specs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiSpec. - p item - end -end -# [END apigeeregistry_v1_generated_Registry_ListApiSpecs_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/list_api_versions.rb b/google-cloud-apigee_registry-v1/snippets/registry/list_api_versions.rb deleted file mode 100644 index eef65f51ddd0..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/list_api_versions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_ListApiVersions_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the list_api_versions call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_versions. -# -def list_api_versions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.new - - # Call the list_api_versions method. - result = client.list_api_versions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::ApiVersion. - p item - end -end -# [END apigeeregistry_v1_generated_Registry_ListApiVersions_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/list_apis.rb b/google-cloud-apigee_registry-v1/snippets/registry/list_apis.rb deleted file mode 100644 index 95ad9b4d724e..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/list_apis.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_ListApis_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the list_apis call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_apis. -# -def list_apis - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::ListApisRequest.new - - # Call the list_apis method. - result = client.list_apis request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Api. - p item - end -end -# [END apigeeregistry_v1_generated_Registry_ListApis_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/list_artifacts.rb b/google-cloud-apigee_registry-v1/snippets/registry/list_artifacts.rb deleted file mode 100644 index 9022e44fb0f4..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/list_artifacts.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_ListArtifacts_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the list_artifacts call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_artifacts. -# -def list_artifacts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.new - - # Call the list_artifacts method. - result = client.list_artifacts request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::ApigeeRegistry::V1::Artifact. - p item - end -end -# [END apigeeregistry_v1_generated_Registry_ListArtifacts_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/replace_artifact.rb b/google-cloud-apigee_registry-v1/snippets/registry/replace_artifact.rb deleted file mode 100644 index ba759abbd2c1..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/replace_artifact.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_ReplaceArtifact_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the replace_artifact call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#replace_artifact. -# -def replace_artifact - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new - - # Call the replace_artifact method. - result = client.replace_artifact request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Artifact. - p result -end -# [END apigeeregistry_v1_generated_Registry_ReplaceArtifact_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_deployment.rb b/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_deployment.rb deleted file mode 100644 index 6caaee100f73..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_deployment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_RollbackApiDeployment_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the rollback_api_deployment call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#rollback_api_deployment. -# -def rollback_api_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.new - - # Call the rollback_api_deployment method. - result = client.rollback_api_deployment request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - p result -end -# [END apigeeregistry_v1_generated_Registry_RollbackApiDeployment_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_spec.rb b/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_spec.rb deleted file mode 100644 index e553c3e1efb1..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/rollback_api_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_RollbackApiSpec_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the rollback_api_spec call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#rollback_api_spec. -# -def rollback_api_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.new - - # Call the rollback_api_spec method. - result = client.rollback_api_spec request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - p result -end -# [END apigeeregistry_v1_generated_Registry_RollbackApiSpec_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/tag_api_deployment_revision.rb b/google-cloud-apigee_registry-v1/snippets/registry/tag_api_deployment_revision.rb deleted file mode 100644 index a845f2fae8c8..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/tag_api_deployment_revision.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the tag_api_deployment_revision call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#tag_api_deployment_revision. -# -def tag_api_deployment_revision - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new - - # Call the tag_api_deployment_revision method. - result = client.tag_api_deployment_revision request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - p result -end -# [END apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/tag_api_spec_revision.rb b/google-cloud-apigee_registry-v1/snippets/registry/tag_api_spec_revision.rb deleted file mode 100644 index 962c1313190c..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/tag_api_spec_revision.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_TagApiSpecRevision_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the tag_api_spec_revision call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#tag_api_spec_revision. -# -def tag_api_spec_revision - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new - - # Call the tag_api_spec_revision method. - result = client.tag_api_spec_revision request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - p result -end -# [END apigeeregistry_v1_generated_Registry_TagApiSpecRevision_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/update_api.rb b/google-cloud-apigee_registry-v1/snippets/registry/update_api.rb deleted file mode 100644 index 84987d820704..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/update_api.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_UpdateApi_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the update_api call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api. -# -def update_api - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new - - # Call the update_api method. - result = client.update_api request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::Api. - p result -end -# [END apigeeregistry_v1_generated_Registry_UpdateApi_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/update_api_deployment.rb b/google-cloud-apigee_registry-v1/snippets/registry/update_api_deployment.rb deleted file mode 100644 index 43a3172bf7be..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/update_api_deployment.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_UpdateApiDeployment_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the update_api_deployment call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_deployment. -# -def update_api_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new - - # Call the update_api_deployment method. - result = client.update_api_deployment request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiDeployment. - p result -end -# [END apigeeregistry_v1_generated_Registry_UpdateApiDeployment_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/update_api_spec.rb b/google-cloud-apigee_registry-v1/snippets/registry/update_api_spec.rb deleted file mode 100644 index b5b1eb2fa112..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/update_api_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_UpdateApiSpec_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the update_api_spec call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_spec. -# -def update_api_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new - - # Call the update_api_spec method. - result = client.update_api_spec request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiSpec. - p result -end -# [END apigeeregistry_v1_generated_Registry_UpdateApiSpec_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/registry/update_api_version.rb b/google-cloud-apigee_registry-v1/snippets/registry/update_api_version.rb deleted file mode 100644 index 46a41129aa4e..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/registry/update_api_version.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START apigeeregistry_v1_generated_Registry_UpdateApiVersion_sync] -require "google/cloud/apigee_registry/v1" - -## -# Snippet for the update_api_version call in the Registry service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_version. -# -def update_api_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ApigeeRegistry::V1::Registry::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new - - # Call the update_api_version method. - result = client.update_api_version request - - # The returned object is of type Google::Cloud::ApigeeRegistry::V1::ApiVersion. - p result -end -# [END apigeeregistry_v1_generated_Registry_UpdateApiVersion_sync] diff --git a/google-cloud-apigee_registry-v1/snippets/snippet_metadata_google.cloud.apigeeregistry.v1.json b/google-cloud-apigee_registry-v1/snippets/snippet_metadata_google.cloud.apigeeregistry.v1.json deleted file mode 100644 index 10c044eaf774..000000000000 --- a/google-cloud-apigee_registry-v1/snippets/snippet_metadata_google.cloud.apigeeregistry.v1.json +++ /dev/null @@ -1,1535 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-apigee_registry-v1", - "version": "0.16.0", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.apigeeregistry.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "apigeeregistry_v1_generated_Provisioning_CreateInstance_sync", - "title": "Snippet for the create_instance call in the Provisioning service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#create_instance.", - "file": "provisioning/create_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_instance", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#create_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Provisioning::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client" - }, - "method": { - "short_name": "CreateInstance", - "full_name": "google.cloud.apigeeregistry.v1.Provisioning.CreateInstance", - "service": { - "short_name": "Provisioning", - "full_name": "google.cloud.apigeeregistry.v1.Provisioning" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Provisioning_DeleteInstance_sync", - "title": "Snippet for the delete_instance call in the Provisioning service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#delete_instance.", - "file": "provisioning/delete_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_instance", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#delete_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Provisioning::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client" - }, - "method": { - "short_name": "DeleteInstance", - "full_name": "google.cloud.apigeeregistry.v1.Provisioning.DeleteInstance", - "service": { - "short_name": "Provisioning", - "full_name": "google.cloud.apigeeregistry.v1.Provisioning" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Provisioning_GetInstance_sync", - "title": "Snippet for the get_instance call in the Provisioning service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#get_instance.", - "file": "provisioning/get_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_instance", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client#get_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::Instance", - "client": { - "short_name": "Provisioning::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client" - }, - "method": { - "short_name": "GetInstance", - "full_name": "google.cloud.apigeeregistry.v1.Provisioning.GetInstance", - "service": { - "short_name": "Provisioning", - "full_name": "google.cloud.apigeeregistry.v1.Provisioning" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_ListApis_sync", - "title": "Snippet for the list_apis call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_apis.", - "file": "registry/list_apis.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_apis", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_apis", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::ListApisRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListApisResponse", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "ListApis", - "full_name": "google.cloud.apigeeregistry.v1.Registry.ListApis", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_GetApi_sync", - "title": "Snippet for the get_api call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api.", - "file": "registry/get_api.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_api", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::GetApiRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::Api", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "GetApi", - "full_name": "google.cloud.apigeeregistry.v1.Registry.GetApi", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_CreateApi_sync", - "title": "Snippet for the create_api call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api.", - "file": "registry/create_api.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_api", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::Api", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "CreateApi", - "full_name": "google.cloud.apigeeregistry.v1.Registry.CreateApi", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_UpdateApi_sync", - "title": "Snippet for the update_api call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api.", - "file": "registry/update_api.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_api", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::Api", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "UpdateApi", - "full_name": "google.cloud.apigeeregistry.v1.Registry.UpdateApi", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_DeleteApi_sync", - "title": "Snippet for the delete_api call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api.", - "file": "registry/delete_api.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_api", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "DeleteApi", - "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteApi", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_ListApiVersions_sync", - "title": "Snippet for the list_api_versions call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_versions.", - "file": "registry/list_api_versions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_api_versions", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_versions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "ListApiVersions", - "full_name": "google.cloud.apigeeregistry.v1.Registry.ListApiVersions", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_GetApiVersion_sync", - "title": "Snippet for the get_api_version call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_version.", - "file": "registry/get_api_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_api_version", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiVersion", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "GetApiVersion", - "full_name": "google.cloud.apigeeregistry.v1.Registry.GetApiVersion", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_CreateApiVersion_sync", - "title": "Snippet for the create_api_version call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_version.", - "file": "registry/create_api_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_api_version", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiVersion", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "CreateApiVersion", - "full_name": "google.cloud.apigeeregistry.v1.Registry.CreateApiVersion", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_UpdateApiVersion_sync", - "title": "Snippet for the update_api_version call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_version.", - "file": "registry/update_api_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_api_version", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiVersion", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "UpdateApiVersion", - "full_name": "google.cloud.apigeeregistry.v1.Registry.UpdateApiVersion", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_DeleteApiVersion_sync", - "title": "Snippet for the delete_api_version call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_version.", - "file": "registry/delete_api_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_api_version", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "DeleteApiVersion", - "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteApiVersion", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_ListApiSpecs_sync", - "title": "Snippet for the list_api_specs call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_specs.", - "file": "registry/list_api_specs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_api_specs", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_specs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "ListApiSpecs", - "full_name": "google.cloud.apigeeregistry.v1.Registry.ListApiSpecs", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_GetApiSpec_sync", - "title": "Snippet for the get_api_spec call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_spec.", - "file": "registry/get_api_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_api_spec", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiSpec", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "GetApiSpec", - "full_name": "google.cloud.apigeeregistry.v1.Registry.GetApiSpec", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_GetApiSpecContents_sync", - "title": "Snippet for the get_api_spec_contents call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_spec_contents.", - "file": "registry/get_api_spec_contents.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_api_spec_contents", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_spec_contents", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Api::HttpBody", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "GetApiSpecContents", - "full_name": "google.cloud.apigeeregistry.v1.Registry.GetApiSpecContents", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_CreateApiSpec_sync", - "title": "Snippet for the create_api_spec call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_spec.", - "file": "registry/create_api_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_api_spec", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiSpec", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "CreateApiSpec", - "full_name": "google.cloud.apigeeregistry.v1.Registry.CreateApiSpec", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_UpdateApiSpec_sync", - "title": "Snippet for the update_api_spec call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_spec.", - "file": "registry/update_api_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_api_spec", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiSpec", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "UpdateApiSpec", - "full_name": "google.cloud.apigeeregistry.v1.Registry.UpdateApiSpec", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_DeleteApiSpec_sync", - "title": "Snippet for the delete_api_spec call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_spec.", - "file": "registry/delete_api_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_api_spec", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "DeleteApiSpec", - "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteApiSpec", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_TagApiSpecRevision_sync", - "title": "Snippet for the tag_api_spec_revision call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#tag_api_spec_revision.", - "file": "registry/tag_api_spec_revision.rb", - "language": "RUBY", - "client_method": { - "short_name": "tag_api_spec_revision", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#tag_api_spec_revision", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiSpec", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "TagApiSpecRevision", - "full_name": "google.cloud.apigeeregistry.v1.Registry.TagApiSpecRevision", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_ListApiSpecRevisions_sync", - "title": "Snippet for the list_api_spec_revisions call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_spec_revisions.", - "file": "registry/list_api_spec_revisions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_api_spec_revisions", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_spec_revisions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "ListApiSpecRevisions", - "full_name": "google.cloud.apigeeregistry.v1.Registry.ListApiSpecRevisions", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_RollbackApiSpec_sync", - "title": "Snippet for the rollback_api_spec call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#rollback_api_spec.", - "file": "registry/rollback_api_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "rollback_api_spec", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#rollback_api_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiSpec", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "RollbackApiSpec", - "full_name": "google.cloud.apigeeregistry.v1.Registry.RollbackApiSpec", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_DeleteApiSpecRevision_sync", - "title": "Snippet for the delete_api_spec_revision call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_spec_revision.", - "file": "registry/delete_api_spec_revision.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_api_spec_revision", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_spec_revision", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiSpec", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "DeleteApiSpecRevision", - "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteApiSpecRevision", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_ListApiDeployments_sync", - "title": "Snippet for the list_api_deployments call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_deployments.", - "file": "registry/list_api_deployments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_api_deployments", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_deployments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "ListApiDeployments", - "full_name": "google.cloud.apigeeregistry.v1.Registry.ListApiDeployments", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_GetApiDeployment_sync", - "title": "Snippet for the get_api_deployment call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_deployment.", - "file": "registry/get_api_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_api_deployment", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_api_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiDeployment", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "GetApiDeployment", - "full_name": "google.cloud.apigeeregistry.v1.Registry.GetApiDeployment", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_CreateApiDeployment_sync", - "title": "Snippet for the create_api_deployment call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_deployment.", - "file": "registry/create_api_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_api_deployment", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_api_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiDeployment", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "CreateApiDeployment", - "full_name": "google.cloud.apigeeregistry.v1.Registry.CreateApiDeployment", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_UpdateApiDeployment_sync", - "title": "Snippet for the update_api_deployment call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_deployment.", - "file": "registry/update_api_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_api_deployment", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#update_api_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiDeployment", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "UpdateApiDeployment", - "full_name": "google.cloud.apigeeregistry.v1.Registry.UpdateApiDeployment", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_DeleteApiDeployment_sync", - "title": "Snippet for the delete_api_deployment call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_deployment.", - "file": "registry/delete_api_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_api_deployment", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "DeleteApiDeployment", - "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteApiDeployment", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_TagApiDeploymentRevision_sync", - "title": "Snippet for the tag_api_deployment_revision call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#tag_api_deployment_revision.", - "file": "registry/tag_api_deployment_revision.rb", - "language": "RUBY", - "client_method": { - "short_name": "tag_api_deployment_revision", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#tag_api_deployment_revision", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiDeployment", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "TagApiDeploymentRevision", - "full_name": "google.cloud.apigeeregistry.v1.Registry.TagApiDeploymentRevision", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_ListApiDeploymentRevisions_sync", - "title": "Snippet for the list_api_deployment_revisions call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_deployment_revisions.", - "file": "registry/list_api_deployment_revisions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_api_deployment_revisions", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_api_deployment_revisions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "ListApiDeploymentRevisions", - "full_name": "google.cloud.apigeeregistry.v1.Registry.ListApiDeploymentRevisions", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_RollbackApiDeployment_sync", - "title": "Snippet for the rollback_api_deployment call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#rollback_api_deployment.", - "file": "registry/rollback_api_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "rollback_api_deployment", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#rollback_api_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiDeployment", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "RollbackApiDeployment", - "full_name": "google.cloud.apigeeregistry.v1.Registry.RollbackApiDeployment", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_DeleteApiDeploymentRevision_sync", - "title": "Snippet for the delete_api_deployment_revision call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_deployment_revision.", - "file": "registry/delete_api_deployment_revision.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_api_deployment_revision", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_api_deployment_revision", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ApiDeployment", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "DeleteApiDeploymentRevision", - "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteApiDeploymentRevision", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_ListArtifacts_sync", - "title": "Snippet for the list_artifacts call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_artifacts.", - "file": "registry/list_artifacts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_artifacts", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#list_artifacts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "ListArtifacts", - "full_name": "google.cloud.apigeeregistry.v1.Registry.ListArtifacts", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_GetArtifact_sync", - "title": "Snippet for the get_artifact call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_artifact.", - "file": "registry/get_artifact.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_artifact", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_artifact", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::Artifact", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "GetArtifact", - "full_name": "google.cloud.apigeeregistry.v1.Registry.GetArtifact", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_GetArtifactContents_sync", - "title": "Snippet for the get_artifact_contents call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_artifact_contents.", - "file": "registry/get_artifact_contents.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_artifact_contents", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#get_artifact_contents", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Api::HttpBody", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "GetArtifactContents", - "full_name": "google.cloud.apigeeregistry.v1.Registry.GetArtifactContents", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_CreateArtifact_sync", - "title": "Snippet for the create_artifact call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_artifact.", - "file": "registry/create_artifact.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_artifact", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#create_artifact", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::Artifact", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "CreateArtifact", - "full_name": "google.cloud.apigeeregistry.v1.Registry.CreateArtifact", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_ReplaceArtifact_sync", - "title": "Snippet for the replace_artifact call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#replace_artifact.", - "file": "registry/replace_artifact.rb", - "language": "RUBY", - "client_method": { - "short_name": "replace_artifact", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#replace_artifact", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ApigeeRegistry::V1::Artifact", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "ReplaceArtifact", - "full_name": "google.cloud.apigeeregistry.v1.Registry.ReplaceArtifact", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "apigeeregistry_v1_generated_Registry_DeleteArtifact_sync", - "title": "Snippet for the delete_artifact call in the Registry service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_artifact.", - "file": "registry/delete_artifact.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_artifact", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client#delete_artifact", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Registry::Client", - "full_name": "::Google::Cloud::ApigeeRegistry::V1::Registry::Client" - }, - "method": { - "short_name": "DeleteArtifact", - "full_name": "google.cloud.apigeeregistry.v1.Registry.DeleteArtifact", - "service": { - "short_name": "Registry", - "full_name": "google.cloud.apigeeregistry.v1.Registry" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_operations_test.rb b/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_operations_test.rb deleted file mode 100644 index ddb50fb8a6a3..000000000000 --- a/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/apigeeregistry/v1/provisioning_service_pb" -require "google/cloud/apigeeregistry/v1/provisioning_service_services_pb" -require "google/cloud/apigee_registry/v1/provisioning" - -class ::Google::Cloud::ApigeeRegistry::V1::Provisioning::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations::Configuration, config - end -end diff --git a/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_paths_test.rb b/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_paths_test.rb deleted file mode 100644 index 5812e3d8fc7e..000000000000 --- a/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_paths_test.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/apigee_registry/v1/provisioning" - -class ::Google::Cloud::ApigeeRegistry::V1::Provisioning::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_rest_test.rb b/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_rest_test.rb deleted file mode 100644 index 9ed908af065b..000000000000 --- a/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_rest_test.rb +++ /dev/null @@ -1,263 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/apigeeregistry/v1/provisioning_service_pb" -require "google/cloud/apigee_registry/v1/provisioning/rest" - - -class ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_instance - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - instance_id = "hello world" - instance = {} - - create_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::ServiceStub.stub :transcode_create_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_instance_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_instance({ parent: parent, instance_id: instance_id, instance: instance }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_instance parent: parent, instance_id: instance_id, instance: instance do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_instance ::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_instance({ parent: parent, instance_id: instance_id, instance: instance }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_instance(::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_instance_client_stub.call_count - end - end - end - - def test_delete_instance - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::ServiceStub.stub :transcode_delete_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_instance_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_instance ::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_instance(::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_instance_client_stub.call_count - end - end - end - - def test_get_instance - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::Instance.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_instance ::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_instance(::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_instance_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Rest::Client::Configuration, config - end -end diff --git a/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_test.rb b/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_test.rb deleted file mode 100644 index 82e653cc7129..000000000000 --- a/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/provisioning_test.rb +++ /dev/null @@ -1,306 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/apigeeregistry/v1/provisioning_service_pb" -require "google/cloud/apigee_registry/v1/provisioning" - -class ::Google::Cloud::ApigeeRegistry::V1::Provisioning::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - instance_id = "hello world" - instance = {} - - create_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_instance, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["instance_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::Instance), request["instance"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_instance_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_instance({ parent: parent, instance_id: instance_id, instance: instance }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_instance parent: parent, instance_id: instance_id, instance: instance do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_instance ::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_instance({ parent: parent, instance_id: instance_id, instance: instance }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_instance(::Google::Cloud::ApigeeRegistry::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_instance_client_stub.call_rpc_count - end - end - - def test_delete_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_instance, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_instance_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_instance({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_instance name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_instance ::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_instance({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_instance(::Google::Cloud::ApigeeRegistry::V1::DeleteInstanceRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_instance_client_stub.call_rpc_count - end - end - - def test_get_instance - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Instance.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_instance, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_instance_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_instance({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_instance name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_instance ::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_instance({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_instance(::Google::Cloud::ApigeeRegistry::V1::GetInstanceRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_instance_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::Provisioning::Operations, client.operations_client - end -end diff --git a/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_paths_test.rb b/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_paths_test.rb deleted file mode 100644 index 6f23fbf93a16..000000000000 --- a/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_paths_test.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/apigee_registry/v1/registry" - -class ::Google::Cloud::ApigeeRegistry::V1::Registry::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_api_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.api_path project: "value0", location: "value1", api: "value2" - assert_equal "projects/value0/locations/value1/apis/value2", path - end - end - - def test_api_deployment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.api_deployment_path project: "value0", location: "value1", api: "value2", deployment: "value3" - assert_equal "projects/value0/locations/value1/apis/value2/deployments/value3", path - end - end - - def test_api_spec_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.api_spec_path project: "value0", location: "value1", api: "value2", version: "value3", spec: "value4" - assert_equal "projects/value0/locations/value1/apis/value2/versions/value3/specs/value4", path - end - end - - def test_api_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.api_version_path project: "value0", location: "value1", api: "value2", version: "value3" - assert_equal "projects/value0/locations/value1/apis/value2/versions/value3", path - end - end - - def test_artifact_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.artifact_path project: "value0", location: "value1", artifact: "value2" - assert_equal "projects/value0/locations/value1/artifacts/value2", path - - path = client.artifact_path project: "value0", location: "value1", api: "value2", artifact: "value3" - assert_equal "projects/value0/locations/value1/apis/value2/artifacts/value3", path - - path = client.artifact_path project: "value0", location: "value1", api: "value2", version: "value3", artifact: "value4" - assert_equal "projects/value0/locations/value1/apis/value2/versions/value3/artifacts/value4", path - - path = client.artifact_path project: "value0", location: "value1", api: "value2", version: "value3", spec: "value4", artifact: "value5" - assert_equal "projects/value0/locations/value1/apis/value2/versions/value3/specs/value4/artifacts/value5", path - - path = client.artifact_path project: "value0", location: "value1", api: "value2", deployment: "value3", artifact: "value4" - assert_equal "projects/value0/locations/value1/apis/value2/deployments/value3/artifacts/value4", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end -end diff --git a/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_rest_test.rb b/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_rest_test.rb deleted file mode 100644 index 28d91ffb16c6..000000000000 --- a/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_rest_test.rb +++ /dev/null @@ -1,2034 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/apigeeregistry/v1/registry_service_pb" -require "google/cloud/apigee_registry/v1/registry/rest" - - -class ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_apis - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ListApisResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_apis_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_apis_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_apis_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_apis({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_apis parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_apis ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_apis({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_apis(::Google::Cloud::ApigeeRegistry::V1::ListApisRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_apis_client_stub.call_count - end - end - end - - def test_get_api - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::Api.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_api_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_api_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_api({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_api name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_api ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_api({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_api(::Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_api_client_stub.call_count - end - end - end - - def test_create_api - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::Api.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - api = {} - api_id = "hello world" - - create_api_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_create_api_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_api_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_api({ parent: parent, api: api, api_id: api_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_api parent: parent, api: api, api_id: api_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_api ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new(parent: parent, api: api, api_id: api_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_api({ parent: parent, api: api, api_id: api_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_api(::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new(parent: parent, api: api, api_id: api_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_api_client_stub.call_count - end - end - end - - def test_update_api - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::Api.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - api = {} - update_mask = {} - allow_missing = true - - update_api_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_update_api_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_api_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_api({ api: api, update_mask: update_mask, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_api api: api, update_mask: update_mask, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_api ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new(api: api, update_mask: update_mask, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_api({ api: api, update_mask: update_mask, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_api(::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new(api: api, update_mask: update_mask, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_api_client_stub.call_count - end - end - end - - def test_delete_api - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_api_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_api_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_api_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_api({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_api name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_api ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_api({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_api(::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_api_client_stub.call_count - end - end - end - - def test_list_api_versions - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_api_versions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_api_versions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_api_versions_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_api_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_api_versions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_api_versions ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_api_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_api_versions(::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_api_versions_client_stub.call_count - end - end - end - - def test_get_api_version - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_api_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_api_version_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_api_version({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_api_version name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_api_version ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_api_version({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_api_version(::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_api_version_client_stub.call_count - end - end - end - - def test_create_api_version - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - api_version = {} - api_version_id = "hello world" - - create_api_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_create_api_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_api_version_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_api_version({ parent: parent, api_version: api_version, api_version_id: api_version_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_api_version parent: parent, api_version: api_version, api_version_id: api_version_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_api_version ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new(parent: parent, api_version: api_version, api_version_id: api_version_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_api_version({ parent: parent, api_version: api_version, api_version_id: api_version_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_api_version(::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new(parent: parent, api_version: api_version, api_version_id: api_version_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_api_version_client_stub.call_count - end - end - end - - def test_update_api_version - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - api_version = {} - update_mask = {} - allow_missing = true - - update_api_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_update_api_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_api_version_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_api_version({ api_version: api_version, update_mask: update_mask, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_api_version api_version: api_version, update_mask: update_mask, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_api_version ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new(api_version: api_version, update_mask: update_mask, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_api_version({ api_version: api_version, update_mask: update_mask, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_api_version(::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new(api_version: api_version, update_mask: update_mask, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_api_version_client_stub.call_count - end - end - end - - def test_delete_api_version - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_api_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_api_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_api_version_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_api_version({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_api_version name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_api_version ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_api_version({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_api_version(::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_api_version_client_stub.call_count - end - end - end - - def test_list_api_specs - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_api_specs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_api_specs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_api_specs_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_api_specs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_api_specs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_api_specs ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_api_specs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_api_specs(::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_api_specs_client_stub.call_count - end - end - end - - def test_get_api_spec - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_api_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_api_spec_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_api_spec({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_api_spec name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_api_spec ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_api_spec({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_api_spec(::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_api_spec_client_stub.call_count - end - end - end - - def test_get_api_spec_contents - # Create test objects. - client_result = ::Google::Api::HttpBody.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_spec_contents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_api_spec_contents_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_api_spec_contents_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_api_spec_contents({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_api_spec_contents name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_api_spec_contents ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_api_spec_contents({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_api_spec_contents(::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_api_spec_contents_client_stub.call_count - end - end - end - - def test_create_api_spec - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - api_spec = {} - api_spec_id = "hello world" - - create_api_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_create_api_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_api_spec_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_api_spec({ parent: parent, api_spec: api_spec, api_spec_id: api_spec_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_api_spec parent: parent, api_spec: api_spec, api_spec_id: api_spec_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_api_spec ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new(parent: parent, api_spec: api_spec, api_spec_id: api_spec_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_api_spec({ parent: parent, api_spec: api_spec, api_spec_id: api_spec_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_api_spec(::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new(parent: parent, api_spec: api_spec, api_spec_id: api_spec_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_api_spec_client_stub.call_count - end - end - end - - def test_update_api_spec - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - api_spec = {} - update_mask = {} - allow_missing = true - - update_api_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_update_api_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_api_spec_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_api_spec({ api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_api_spec api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_api_spec ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new(api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_api_spec({ api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_api_spec(::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new(api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_api_spec_client_stub.call_count - end - end - end - - def test_delete_api_spec - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_api_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_api_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_api_spec_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_api_spec({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_api_spec name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_api_spec ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_api_spec({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_api_spec(::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_api_spec_client_stub.call_count - end - end - end - - def test_tag_api_spec_revision - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - tag = "hello world" - - tag_api_spec_revision_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_tag_api_spec_revision_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, tag_api_spec_revision_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.tag_api_spec_revision({ name: name, tag: tag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.tag_api_spec_revision name: name, tag: tag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.tag_api_spec_revision ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new(name: name, tag: tag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.tag_api_spec_revision({ name: name, tag: tag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.tag_api_spec_revision(::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new(name: name, tag: tag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, tag_api_spec_revision_client_stub.call_count - end - end - end - - def test_list_api_spec_revisions - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - page_size = 42 - page_token = "hello world" - - list_api_spec_revisions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_api_spec_revisions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_api_spec_revisions_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_api_spec_revisions({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_api_spec_revisions name: name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_api_spec_revisions ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_api_spec_revisions({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_api_spec_revisions(::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_api_spec_revisions_client_stub.call_count - end - end - end - - def test_rollback_api_spec - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - revision_id = "hello world" - - rollback_api_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_rollback_api_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, rollback_api_spec_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.rollback_api_spec({ name: name, revision_id: revision_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.rollback_api_spec name: name, revision_id: revision_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.rollback_api_spec ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.new(name: name, revision_id: revision_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.rollback_api_spec({ name: name, revision_id: revision_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.rollback_api_spec(::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.new(name: name, revision_id: revision_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, rollback_api_spec_client_stub.call_count - end - end - end - - def test_delete_api_spec_revision - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_api_spec_revision_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_api_spec_revision_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_api_spec_revision_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_api_spec_revision({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_api_spec_revision name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_api_spec_revision ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_api_spec_revision({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_api_spec_revision(::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_api_spec_revision_client_stub.call_count - end - end - end - - def test_list_api_deployments - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_api_deployments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_api_deployments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_api_deployments_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_api_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_api_deployments parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_api_deployments ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_api_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_api_deployments(::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_api_deployments_client_stub.call_count - end - end - end - - def test_get_api_deployment - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_api_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_api_deployment_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_api_deployment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_api_deployment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_api_deployment ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_api_deployment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_api_deployment(::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_api_deployment_client_stub.call_count - end - end - end - - def test_create_api_deployment - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - api_deployment = {} - api_deployment_id = "hello world" - - create_api_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_create_api_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_api_deployment_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_api_deployment({ parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_api_deployment parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_api_deployment ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new(parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_api_deployment({ parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_api_deployment(::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new(parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_api_deployment_client_stub.call_count - end - end - end - - def test_update_api_deployment - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - api_deployment = {} - update_mask = {} - allow_missing = true - - update_api_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_update_api_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_api_deployment_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_api_deployment({ api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_api_deployment api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_api_deployment ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new(api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_api_deployment({ api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_api_deployment(::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new(api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_api_deployment_client_stub.call_count - end - end - end - - def test_delete_api_deployment - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_api_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_api_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_api_deployment_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_api_deployment({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_api_deployment name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_api_deployment ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_api_deployment({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_api_deployment(::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_api_deployment_client_stub.call_count - end - end - end - - def test_tag_api_deployment_revision - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - tag = "hello world" - - tag_api_deployment_revision_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_tag_api_deployment_revision_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, tag_api_deployment_revision_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.tag_api_deployment_revision({ name: name, tag: tag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.tag_api_deployment_revision name: name, tag: tag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.tag_api_deployment_revision ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new(name: name, tag: tag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.tag_api_deployment_revision({ name: name, tag: tag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.tag_api_deployment_revision(::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new(name: name, tag: tag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, tag_api_deployment_revision_client_stub.call_count - end - end - end - - def test_list_api_deployment_revisions - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - page_size = 42 - page_token = "hello world" - - list_api_deployment_revisions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_api_deployment_revisions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_api_deployment_revisions_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_api_deployment_revisions({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_api_deployment_revisions name: name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_api_deployment_revisions ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_api_deployment_revisions({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_api_deployment_revisions(::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_api_deployment_revisions_client_stub.call_count - end - end - end - - def test_rollback_api_deployment - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - revision_id = "hello world" - - rollback_api_deployment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_rollback_api_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, rollback_api_deployment_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.rollback_api_deployment({ name: name, revision_id: revision_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.rollback_api_deployment name: name, revision_id: revision_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.rollback_api_deployment ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.new(name: name, revision_id: revision_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.rollback_api_deployment({ name: name, revision_id: revision_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.rollback_api_deployment(::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.new(name: name, revision_id: revision_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, rollback_api_deployment_client_stub.call_count - end - end - end - - def test_delete_api_deployment_revision - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_api_deployment_revision_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_api_deployment_revision_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_api_deployment_revision_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_api_deployment_revision({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_api_deployment_revision name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_api_deployment_revision ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_api_deployment_revision({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_api_deployment_revision(::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_api_deployment_revision_client_stub.call_count - end - end - end - - def test_list_artifacts - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_artifacts_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_list_artifacts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_artifacts_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_artifacts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_artifacts parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_artifacts ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_artifacts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_artifacts(::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_artifacts_client_stub.call_count - end - end - end - - def test_get_artifact - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::Artifact.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_artifact_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_artifact_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_artifact({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_artifact name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_artifact ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_artifact({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_artifact(::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_artifact_client_stub.call_count - end - end - end - - def test_get_artifact_contents - # Create test objects. - client_result = ::Google::Api::HttpBody.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_artifact_contents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_get_artifact_contents_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_artifact_contents_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_artifact_contents({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_artifact_contents name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_artifact_contents ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_artifact_contents({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_artifact_contents(::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_artifact_contents_client_stub.call_count - end - end - end - - def test_create_artifact - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::Artifact.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - artifact = {} - artifact_id = "hello world" - - create_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_create_artifact_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_artifact_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_artifact({ parent: parent, artifact: artifact, artifact_id: artifact_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_artifact parent: parent, artifact: artifact, artifact_id: artifact_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_artifact ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new(parent: parent, artifact: artifact, artifact_id: artifact_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_artifact({ parent: parent, artifact: artifact, artifact_id: artifact_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_artifact(::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new(parent: parent, artifact: artifact, artifact_id: artifact_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_artifact_client_stub.call_count - end - end - end - - def test_replace_artifact - # Create test objects. - client_result = ::Google::Cloud::ApigeeRegistry::V1::Artifact.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - artifact = {} - - replace_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_replace_artifact_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, replace_artifact_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.replace_artifact({ artifact: artifact }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.replace_artifact artifact: artifact do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.replace_artifact ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new(artifact: artifact) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.replace_artifact({ artifact: artifact }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.replace_artifact(::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new(artifact: artifact), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, replace_artifact_client_stub.call_count - end - end - end - - def test_delete_artifact - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_artifact_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::ServiceStub.stub :transcode_delete_artifact_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_artifact_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_artifact({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_artifact name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_artifact ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_artifact({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_artifact(::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_artifact_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::Registry::Rest::Client::Configuration, config - end -end diff --git a/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_test.rb b/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_test.rb deleted file mode 100644 index 820c8660fad9..000000000000 --- a/google-cloud-apigee_registry-v1/test/google/cloud/apigee_registry/v1/registry_test.rb +++ /dev/null @@ -1,2259 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/apigeeregistry/v1/registry_service_pb" -require "google/cloud/apigee_registry/v1/registry" - -class ::Google::Cloud::ApigeeRegistry::V1::Registry::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_apis - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListApisResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_apis_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_apis, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_apis_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_apis({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_apis parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_apis ::Google::Cloud::ApigeeRegistry::V1::ListApisRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_apis({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_apis(::Google::Cloud::ApigeeRegistry::V1::ListApisRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_apis_client_stub.call_rpc_count - end - end - - def test_get_api - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Api.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_api, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_api_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_api({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_api name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_api ::Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_api({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_api(::Google::Cloud::ApigeeRegistry::V1::GetApiRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_api_client_stub.call_rpc_count - end - end - - def test_create_api - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Api.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - api = {} - api_id = "hello world" - - create_api_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_api, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::Api), request["api"] - assert_equal "hello world", request["api_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_api_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_api({ parent: parent, api: api, api_id: api_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_api parent: parent, api: api, api_id: api_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_api ::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new(parent: parent, api: api, api_id: api_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_api({ parent: parent, api: api, api_id: api_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_api(::Google::Cloud::ApigeeRegistry::V1::CreateApiRequest.new(parent: parent, api: api, api_id: api_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_api_client_stub.call_rpc_count - end - end - - def test_update_api - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Api.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - api = {} - update_mask = {} - allow_missing = true - - update_api_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_api, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::Api), request["api"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_api_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_api({ api: api, update_mask: update_mask, allow_missing: allow_missing }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_api api: api, update_mask: update_mask, allow_missing: allow_missing do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_api ::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new(api: api, update_mask: update_mask, allow_missing: allow_missing) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_api({ api: api, update_mask: update_mask, allow_missing: allow_missing }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_api(::Google::Cloud::ApigeeRegistry::V1::UpdateApiRequest.new(api: api, update_mask: update_mask, allow_missing: allow_missing), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_api_client_stub.call_rpc_count - end - end - - def test_delete_api - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_api_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_api, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_api_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_api({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_api name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_api ::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_api({ name: name, force: force }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_api(::Google::Cloud::ApigeeRegistry::V1::DeleteApiRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_api_client_stub.call_rpc_count - end - end - - def test_list_api_versions - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_api_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_api_versions, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_api_versions_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_api_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_api_versions parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_api_versions ::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_api_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_api_versions(::Google::Cloud::ApigeeRegistry::V1::ListApiVersionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_api_versions_client_stub.call_rpc_count - end - end - - def test_get_api_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_api_version, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_api_version_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_api_version({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_api_version name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_api_version ::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_api_version({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_api_version(::Google::Cloud::ApigeeRegistry::V1::GetApiVersionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_api_version_client_stub.call_rpc_count - end - end - - def test_create_api_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - api_version = {} - api_version_id = "hello world" - - create_api_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_api_version, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::ApiVersion), request["api_version"] - assert_equal "hello world", request["api_version_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_api_version_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_api_version({ parent: parent, api_version: api_version, api_version_id: api_version_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_api_version parent: parent, api_version: api_version, api_version_id: api_version_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_api_version ::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new(parent: parent, api_version: api_version, api_version_id: api_version_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_api_version({ parent: parent, api_version: api_version, api_version_id: api_version_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_api_version(::Google::Cloud::ApigeeRegistry::V1::CreateApiVersionRequest.new(parent: parent, api_version: api_version, api_version_id: api_version_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_api_version_client_stub.call_rpc_count - end - end - - def test_update_api_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiVersion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - api_version = {} - update_mask = {} - allow_missing = true - - update_api_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_api_version, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::ApiVersion), request["api_version"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_api_version_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_api_version({ api_version: api_version, update_mask: update_mask, allow_missing: allow_missing }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_api_version api_version: api_version, update_mask: update_mask, allow_missing: allow_missing do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_api_version ::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new(api_version: api_version, update_mask: update_mask, allow_missing: allow_missing) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_api_version({ api_version: api_version, update_mask: update_mask, allow_missing: allow_missing }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_api_version(::Google::Cloud::ApigeeRegistry::V1::UpdateApiVersionRequest.new(api_version: api_version, update_mask: update_mask, allow_missing: allow_missing), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_api_version_client_stub.call_rpc_count - end - end - - def test_delete_api_version - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_api_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_api_version, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_api_version_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_api_version({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_api_version name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_api_version ::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_api_version({ name: name, force: force }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_api_version(::Google::Cloud::ApigeeRegistry::V1::DeleteApiVersionRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_api_version_client_stub.call_rpc_count - end - end - - def test_list_api_specs - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_api_specs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_api_specs, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_api_specs_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_api_specs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_api_specs parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_api_specs ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_api_specs({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_api_specs(::Google::Cloud::ApigeeRegistry::V1::ListApiSpecsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_api_specs_client_stub.call_rpc_count - end - end - - def test_get_api_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_api_spec, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_api_spec_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_api_spec({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_api_spec name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_api_spec ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_api_spec({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_api_spec(::Google::Cloud::ApigeeRegistry::V1::GetApiSpecRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_api_spec_client_stub.call_rpc_count - end - end - - def test_get_api_spec_contents - # Create GRPC objects. - grpc_response = ::Google::Api::HttpBody.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_spec_contents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_api_spec_contents, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_api_spec_contents_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_api_spec_contents({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_api_spec_contents name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_api_spec_contents ::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_api_spec_contents({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_api_spec_contents(::Google::Cloud::ApigeeRegistry::V1::GetApiSpecContentsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_api_spec_contents_client_stub.call_rpc_count - end - end - - def test_create_api_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - api_spec = {} - api_spec_id = "hello world" - - create_api_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_api_spec, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::ApiSpec), request["api_spec"] - assert_equal "hello world", request["api_spec_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_api_spec_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_api_spec({ parent: parent, api_spec: api_spec, api_spec_id: api_spec_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_api_spec parent: parent, api_spec: api_spec, api_spec_id: api_spec_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_api_spec ::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new(parent: parent, api_spec: api_spec, api_spec_id: api_spec_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_api_spec({ parent: parent, api_spec: api_spec, api_spec_id: api_spec_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_api_spec(::Google::Cloud::ApigeeRegistry::V1::CreateApiSpecRequest.new(parent: parent, api_spec: api_spec, api_spec_id: api_spec_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_api_spec_client_stub.call_rpc_count - end - end - - def test_update_api_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - api_spec = {} - update_mask = {} - allow_missing = true - - update_api_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_api_spec, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::ApiSpec), request["api_spec"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_api_spec_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_api_spec({ api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_api_spec api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_api_spec ::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new(api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_api_spec({ api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_api_spec(::Google::Cloud::ApigeeRegistry::V1::UpdateApiSpecRequest.new(api_spec: api_spec, update_mask: update_mask, allow_missing: allow_missing), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_api_spec_client_stub.call_rpc_count - end - end - - def test_delete_api_spec - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_api_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_api_spec, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_api_spec_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_api_spec({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_api_spec name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_api_spec ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_api_spec({ name: name, force: force }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_api_spec(::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_api_spec_client_stub.call_rpc_count - end - end - - def test_tag_api_spec_revision - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - tag = "hello world" - - tag_api_spec_revision_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :tag_api_spec_revision, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["tag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, tag_api_spec_revision_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.tag_api_spec_revision({ name: name, tag: tag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.tag_api_spec_revision name: name, tag: tag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.tag_api_spec_revision ::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new(name: name, tag: tag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.tag_api_spec_revision({ name: name, tag: tag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.tag_api_spec_revision(::Google::Cloud::ApigeeRegistry::V1::TagApiSpecRevisionRequest.new(name: name, tag: tag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, tag_api_spec_revision_client_stub.call_rpc_count - end - end - - def test_list_api_spec_revisions - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - page_size = 42 - page_token = "hello world" - - list_api_spec_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_api_spec_revisions, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_api_spec_revisions_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_api_spec_revisions({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_api_spec_revisions name: name, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_api_spec_revisions ::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_api_spec_revisions({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_api_spec_revisions(::Google::Cloud::ApigeeRegistry::V1::ListApiSpecRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_api_spec_revisions_client_stub.call_rpc_count - end - end - - def test_rollback_api_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - revision_id = "hello world" - - rollback_api_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :rollback_api_spec, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["revision_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, rollback_api_spec_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.rollback_api_spec({ name: name, revision_id: revision_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.rollback_api_spec name: name, revision_id: revision_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.rollback_api_spec ::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.new(name: name, revision_id: revision_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.rollback_api_spec({ name: name, revision_id: revision_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.rollback_api_spec(::Google::Cloud::ApigeeRegistry::V1::RollbackApiSpecRequest.new(name: name, revision_id: revision_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, rollback_api_spec_client_stub.call_rpc_count - end - end - - def test_delete_api_spec_revision - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_api_spec_revision_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_api_spec_revision, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_api_spec_revision_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_api_spec_revision({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_api_spec_revision name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_api_spec_revision ::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_api_spec_revision({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_api_spec_revision(::Google::Cloud::ApigeeRegistry::V1::DeleteApiSpecRevisionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_api_spec_revision_client_stub.call_rpc_count - end - end - - def test_list_api_deployments - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_api_deployments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_api_deployments, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_api_deployments_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_api_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_api_deployments parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_api_deployments ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_api_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_api_deployments(::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_api_deployments_client_stub.call_rpc_count - end - end - - def test_get_api_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_api_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_api_deployment, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_api_deployment_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_api_deployment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_api_deployment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_api_deployment ::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_api_deployment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_api_deployment(::Google::Cloud::ApigeeRegistry::V1::GetApiDeploymentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_api_deployment_client_stub.call_rpc_count - end - end - - def test_create_api_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - api_deployment = {} - api_deployment_id = "hello world" - - create_api_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_api_deployment, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment), request["api_deployment"] - assert_equal "hello world", request["api_deployment_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_api_deployment_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_api_deployment({ parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_api_deployment parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_api_deployment ::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new(parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_api_deployment({ parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_api_deployment(::Google::Cloud::ApigeeRegistry::V1::CreateApiDeploymentRequest.new(parent: parent, api_deployment: api_deployment, api_deployment_id: api_deployment_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_api_deployment_client_stub.call_rpc_count - end - end - - def test_update_api_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - api_deployment = {} - update_mask = {} - allow_missing = true - - update_api_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_api_deployment, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment), request["api_deployment"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_api_deployment_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_api_deployment({ api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_api_deployment api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_api_deployment ::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new(api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_api_deployment({ api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_api_deployment(::Google::Cloud::ApigeeRegistry::V1::UpdateApiDeploymentRequest.new(api_deployment: api_deployment, update_mask: update_mask, allow_missing: allow_missing), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_api_deployment_client_stub.call_rpc_count - end - end - - def test_delete_api_deployment - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_api_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_api_deployment, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_api_deployment_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_api_deployment({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_api_deployment name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_api_deployment ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_api_deployment({ name: name, force: force }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_api_deployment(::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_api_deployment_client_stub.call_rpc_count - end - end - - def test_tag_api_deployment_revision - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - tag = "hello world" - - tag_api_deployment_revision_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :tag_api_deployment_revision, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["tag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, tag_api_deployment_revision_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.tag_api_deployment_revision({ name: name, tag: tag }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.tag_api_deployment_revision name: name, tag: tag do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.tag_api_deployment_revision ::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new(name: name, tag: tag) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.tag_api_deployment_revision({ name: name, tag: tag }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.tag_api_deployment_revision(::Google::Cloud::ApigeeRegistry::V1::TagApiDeploymentRevisionRequest.new(name: name, tag: tag), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, tag_api_deployment_revision_client_stub.call_rpc_count - end - end - - def test_list_api_deployment_revisions - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - page_size = 42 - page_token = "hello world" - - list_api_deployment_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_api_deployment_revisions, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_api_deployment_revisions_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_api_deployment_revisions({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_api_deployment_revisions name: name, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_api_deployment_revisions ::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_api_deployment_revisions({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_api_deployment_revisions(::Google::Cloud::ApigeeRegistry::V1::ListApiDeploymentRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_api_deployment_revisions_client_stub.call_rpc_count - end - end - - def test_rollback_api_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - revision_id = "hello world" - - rollback_api_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :rollback_api_deployment, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["revision_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, rollback_api_deployment_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.rollback_api_deployment({ name: name, revision_id: revision_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.rollback_api_deployment name: name, revision_id: revision_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.rollback_api_deployment ::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.new(name: name, revision_id: revision_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.rollback_api_deployment({ name: name, revision_id: revision_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.rollback_api_deployment(::Google::Cloud::ApigeeRegistry::V1::RollbackApiDeploymentRequest.new(name: name, revision_id: revision_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, rollback_api_deployment_client_stub.call_rpc_count - end - end - - def test_delete_api_deployment_revision - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ApiDeployment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_api_deployment_revision_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_api_deployment_revision, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_api_deployment_revision_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_api_deployment_revision({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_api_deployment_revision name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_api_deployment_revision ::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_api_deployment_revision({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_api_deployment_revision(::Google::Cloud::ApigeeRegistry::V1::DeleteApiDeploymentRevisionRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_api_deployment_revision_client_stub.call_rpc_count - end - end - - def test_list_artifacts - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_artifacts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_artifacts, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_artifacts_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_artifacts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_artifacts parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_artifacts ::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_artifacts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_artifacts(::Google::Cloud::ApigeeRegistry::V1::ListArtifactsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_artifacts_client_stub.call_rpc_count - end - end - - def test_get_artifact - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Artifact.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_artifact, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_artifact_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_artifact({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_artifact name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_artifact ::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_artifact({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_artifact(::Google::Cloud::ApigeeRegistry::V1::GetArtifactRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_artifact_client_stub.call_rpc_count - end - end - - def test_get_artifact_contents - # Create GRPC objects. - grpc_response = ::Google::Api::HttpBody.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_artifact_contents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_artifact_contents, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_artifact_contents_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_artifact_contents({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_artifact_contents name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_artifact_contents ::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_artifact_contents({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_artifact_contents(::Google::Cloud::ApigeeRegistry::V1::GetArtifactContentsRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_artifact_contents_client_stub.call_rpc_count - end - end - - def test_create_artifact - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Artifact.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - artifact = {} - artifact_id = "hello world" - - create_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_artifact, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::Artifact), request["artifact"] - assert_equal "hello world", request["artifact_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_artifact_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_artifact({ parent: parent, artifact: artifact, artifact_id: artifact_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_artifact parent: parent, artifact: artifact, artifact_id: artifact_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_artifact ::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new(parent: parent, artifact: artifact, artifact_id: artifact_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_artifact({ parent: parent, artifact: artifact, artifact_id: artifact_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_artifact(::Google::Cloud::ApigeeRegistry::V1::CreateArtifactRequest.new(parent: parent, artifact: artifact, artifact_id: artifact_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_artifact_client_stub.call_rpc_count - end - end - - def test_replace_artifact - # Create GRPC objects. - grpc_response = ::Google::Cloud::ApigeeRegistry::V1::Artifact.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - artifact = {} - - replace_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :replace_artifact, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::ApigeeRegistry::V1::Artifact), request["artifact"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, replace_artifact_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.replace_artifact({ artifact: artifact }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.replace_artifact artifact: artifact do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.replace_artifact ::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new(artifact: artifact) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.replace_artifact({ artifact: artifact }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.replace_artifact(::Google::Cloud::ApigeeRegistry::V1::ReplaceArtifactRequest.new(artifact: artifact), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, replace_artifact_client_stub.call_rpc_count - end - end - - def test_delete_artifact - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_artifact_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_artifact, name - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_artifact_client_stub do - # Create client - c = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_artifact({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_artifact name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_artifact ::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_artifact({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_artifact(::Google::Cloud::ApigeeRegistry::V1::DeleteArtifactRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_artifact_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::Registry::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::ApigeeRegistry::V1::Registry::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::ApigeeRegistry::V1::Registry::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/google-cloud-apigee_registry-v1/test/helper.rb b/google-cloud-apigee_registry-v1/test/helper.rb deleted file mode 100644 index c58423a60f2b..000000000000 --- a/google-cloud-apigee_registry-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"