From 96950c737430aed3e322acd99debdf591fbf246c Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 31 Mar 2026 03:03:07 +0000 Subject: [PATCH 1/2] feat: [Memorystore for Valkey] Add support for Flexible CA feature PiperOrigin-RevId: 892004368 Source-Link: https://github.com/googleapis/googleapis/commit/456866bff20ee005cbc248b3478c577d28304e60 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3b3ecd8f4c8b5a5621af82dca02805f27b69fa06 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLW1lbW9yeXN0b3JlLXYxLy5Pd2xCb3QueWFtbCIsImgiOiIzYjNlY2Q4ZjRjOGI1YTU2MjFhZjgyZGNhMDI4MDVmMjdiNjlmYTA2In0= --- .../google-cloud-memorystore-v1/.gitignore | 22 + .../.repo-metadata.json | 17 + .../google-cloud-memorystore-v1/.rubocop.yml | 33 + .../google-cloud-memorystore-v1/.toys.rb | 28 + .../google-cloud-memorystore-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../google-cloud-memorystore-v1/CHANGELOG.md | 2 + .../google-cloud-memorystore-v1/Gemfile | 14 + .../google-cloud-memorystore-v1/LICENSE.md | 201 ++ .../google-cloud-memorystore-v1/README.md | 154 ++ .../google-cloud-memorystore-v1/Rakefile | 169 ++ .../gapic_metadata.json | 93 + .../google-cloud-memorystore-v1.gemspec | 29 + .../lib/google-cloud-memorystore-v1.rb | 21 + .../lib/google/cloud/memorystore/v1.rb | 40 + .../cloud/memorystore/v1/bindings_override.rb | 75 + .../cloud/memorystore/v1/memorystore.rb | 48 + .../memorystore/v1/memorystore/credentials.rb | 47 + .../cloud/memorystore/v1/memorystore/paths.rb | 244 +++ .../cloud/memorystore/v1/memorystore/rest.rb | 54 + .../memorystore/v1/memorystore/rest/client.rb | 1896 +++++++++++++++++ .../v1/memorystore/rest/operations.rb | 924 ++++++++ .../v1/memorystore/rest/service_stub.rb | 1001 +++++++++ .../cloud/memorystore/v1/memorystore_pb.rb | 105 + .../memorystore/v1/memorystore_services_pb.rb | 89 + .../lib/google/cloud/memorystore/v1/rest.rb | 38 + .../google/cloud/memorystore/v1/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/field_info.rb | 88 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../cloud/memorystore/v1/memorystore.rb | 1486 +++++++++++++ .../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/dayofweek.rb | 49 + .../proto_docs/google/type/timeofday.rb | 49 + .../snippets/Gemfile | 32 + .../snippets/memorystore/backup_instance.rb | 54 + .../snippets/memorystore/create_instance.rb | 54 + .../snippets/memorystore/delete_backup.rb | 54 + .../snippets/memorystore/delete_instance.rb | 54 + .../snippets/memorystore/export_backup.rb | 54 + .../snippets/memorystore/get_backup.rb | 47 + .../memorystore/get_backup_collection.rb | 47 + .../memorystore/get_certificate_authority.rb | 47 + .../snippets/memorystore/get_instance.rb | 47 + ...t_shared_regional_certificate_authority.rb | 47 + .../memorystore/list_backup_collections.rb | 51 + .../snippets/memorystore/list_backups.rb | 51 + .../snippets/memorystore/list_instances.rb | 51 + .../memorystore/reschedule_maintenance.rb | 54 + .../snippets/memorystore/update_instance.rb | 54 + ..._metadata_google.cloud.memorystore.v1.json | 615 ++++++ .../memorystore/v1/memorystore_rest_test.rb | 929 ++++++++ .../test/helper.rb | 26 + 62 files changed, 11394 insertions(+) create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/README.md create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/google-cloud-memorystore-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google-cloud-memorystore-v1.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/credentials.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/paths.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_pb.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/cloud/memorystore/v1/memorystore.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/type/dayofweek.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/type/timeofday.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/backup_instance.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/create_instance.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/delete_backup.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/delete_instance.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/export_backup.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_backup.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_backup_collection.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_certificate_authority.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_instance.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_shared_regional_certificate_authority.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_backup_collections.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_backups.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_instances.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/reschedule_maintenance.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/update_instance.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/snippet_metadata_google.cloud.memorystore.v1.json create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/test/google/cloud/memorystore/v1/memorystore_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-memorystore-v1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-memorystore-v1/.gitignore b/owl-bot-staging/google-cloud-memorystore-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +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/owl-bot-staging/google-cloud-memorystore-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-memorystore-v1/.repo-metadata.json new file mode 100644 index 000000000000..ae6a536c0217 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "memorystore.googleapis.com", + "api_shortname": "memorystore", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1/latest", + "distribution_name": "google-cloud-memorystore-v1", + "is_cloud": true, + "language": "ruby", + "name": "memorystore", + "name_pretty": "Memorystore V1 API", + "product_documentation": "https://cloud.google.com/memorystore/docs/valkey", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "google-cloud-memorystore-v1 is the official client library for the Memorystore V1 API. Note that google-cloud-memorystore-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-memorystore instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/memorystore/docs/valkey", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-memorystore-v1/.rubocop.yml b/owl-bot-staging/google-cloud-memorystore-v1/.rubocop.yml new file mode 100644 index 000000000000..6ca03107a3bf --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-memorystore-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-memorystore-v1.rb" diff --git a/owl-bot-staging/google-cloud-memorystore-v1/.toys.rb b/owl-bot-staging/google-cloud-memorystore-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# 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. +# 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/owl-bot-staging/google-cloud-memorystore-v1/.yardopts b/owl-bot-staging/google-cloud-memorystore-v1/.yardopts new file mode 100644 index 000000000000..5b462b7f3ad0 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Memorystore V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-memorystore-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-memorystore-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..557b1fbb3672 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-memorystore-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-memorystore-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/memorystore/v1" + +client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/memorystore/v1" + +::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::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-memorystore-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/memorystore/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::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/owl-bot-staging/google-cloud-memorystore-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-memorystore-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-memorystore-v1/Gemfile b/owl-bot-staging/google-cloud-memorystore-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/Gemfile @@ -0,0 +1,14 @@ +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/owl-bot-staging/google-cloud-memorystore-v1/LICENSE.md b/owl-bot-staging/google-cloud-memorystore-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/owl-bot-staging/google-cloud-memorystore-v1/README.md b/owl-bot-staging/google-cloud-memorystore-v1/README.md new file mode 100644 index 000000000000..c3231ee7bbe2 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Memorystore V1 API + +API Client library for the Memorystore V1 API + +google-cloud-memorystore-v1 is the official client library for the Memorystore V1 API. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Memorystore V1 API. Most users should consider using +the main client gem, +[google-cloud-memorystore](https://rubygems.org/gems/google-cloud-memorystore). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-memorystore-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/memorystore.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/memorystore/v1" + +client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new +request = ::Google::Cloud::Memorystore::V1::ListInstancesRequest.new # (request fields as keyword arguments...) +response = client.list_instances request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/memorystore/docs/valkey) +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/memorystore/v1" +require "logger" + +client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::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.0+. + +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-memorystore`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-memorystore-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-memorystore`. +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-memorystore-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. diff --git a/owl-bot-staging/google-cloud-memorystore-v1/Rakefile b/owl-bot-staging/google-cloud-memorystore-v1/Rakefile new file mode 100644 index 000000000000..74f59275b399 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# 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. +# 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 "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-memorystore-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/memorystore/v1/memorystore/credentials" + ::Google::Cloud::Memorystore::V1::Memorystore::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-memorystore-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-memorystore-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-memorystore-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-memorystore-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-memorystore-v1" + header "google-cloud-memorystore-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-memorystore-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-memorystore-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-memorystore-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-memorystore-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/owl-bot-staging/google-cloud-memorystore-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-memorystore-v1/gapic_metadata.json new file mode 100644 index 000000000000..87d428ba0d71 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/gapic_metadata.json @@ -0,0 +1,93 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.memorystore.v1", + "libraryPackage": "::Google::Cloud::Memorystore::V1", + "services": { + "Memorystore": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Memorystore::V1::Memorystore::Client", + "rpcs": { + "ListInstances": { + "methods": [ + "list_instances" + ] + }, + "GetInstance": { + "methods": [ + "get_instance" + ] + }, + "CreateInstance": { + "methods": [ + "create_instance" + ] + }, + "UpdateInstance": { + "methods": [ + "update_instance" + ] + }, + "DeleteInstance": { + "methods": [ + "delete_instance" + ] + }, + "GetCertificateAuthority": { + "methods": [ + "get_certificate_authority" + ] + }, + "GetSharedRegionalCertificateAuthority": { + "methods": [ + "get_shared_regional_certificate_authority" + ] + }, + "RescheduleMaintenance": { + "methods": [ + "reschedule_maintenance" + ] + }, + "ListBackupCollections": { + "methods": [ + "list_backup_collections" + ] + }, + "GetBackupCollection": { + "methods": [ + "get_backup_collection" + ] + }, + "ListBackups": { + "methods": [ + "list_backups" + ] + }, + "GetBackup": { + "methods": [ + "get_backup" + ] + }, + "DeleteBackup": { + "methods": [ + "delete_backup" + ] + }, + "ExportBackup": { + "methods": [ + "export_backup" + ] + }, + "BackupInstance": { + "methods": [ + "backup_instance" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-memorystore-v1/google-cloud-memorystore-v1.gemspec b/owl-bot-staging/google-cloud-memorystore-v1/google-cloud-memorystore-v1.gemspec new file mode 100644 index 000000000000..a0557c2b15f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/google-cloud-memorystore-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/memorystore/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-memorystore-v1" + gem.version = Google::Cloud::Memorystore::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "google-cloud-memorystore-v1 is the official client library for the Memorystore V1 API. Note that google-cloud-memorystore-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-memorystore instead. See the readme for more details." + gem.summary = "API Client library for the Memorystore V1 API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google-cloud-memorystore-v1.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google-cloud-memorystore-v1.rb new file mode 100644 index 000000000000..0bee6d7afd0e --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/lib/google-cloud-memorystore-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# 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. +# 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/memorystore/v1" diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1.rb new file mode 100644 index 000000000000..76ec75f7cb15 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# 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. +# 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/memorystore/v1/memorystore" +require "google/cloud/memorystore/v1/version" + +module Google + module Cloud + module Memorystore + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/memorystore/v1" + # client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/memorystore/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/bindings_override.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/bindings_override.rb new file mode 100644 index 000000000000..01102cd86502 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/bindings_override.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# 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. +# 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 Memorystore + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/memorystore/v1/rest" + # client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Memorystore"] + 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 + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore.rb new file mode 100644 index 000000000000..ee8efee2e0e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# 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. +# 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/config" +require "gapic/config/method" + +require "google/cloud/memorystore/v1/version" + +require "google/cloud/memorystore/v1/memorystore/credentials" +require "google/cloud/memorystore/v1/memorystore/paths" +require "google/cloud/memorystore/v1/memorystore/rest" + +module Google + module Cloud + module Memorystore + module V1 + ## + # Service describing handlers for resources + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/memorystore/v1/memorystore/rest" + # client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + module Memorystore + end + end + end + end +end + +helper_path = ::File.join __dir__, "memorystore", "helpers.rb" +require "google/cloud/memorystore/v1/memorystore/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/credentials.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/credentials.rb new file mode 100644 index 000000000000..f831a48ac265 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. +# 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 Memorystore + module V1 + module Memorystore + # Credentials for the Memorystore 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/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/paths.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/paths.rb new file mode 100644 index 000000000000..44fa4260f014 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/paths.rb @@ -0,0 +1,244 @@ +# frozen_string_literal: true + +# 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. +# 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 Memorystore + module V1 + module Memorystore + # Path helper methods for the Memorystore API. + module Paths + ## + # Create a fully-qualified Backup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupCollections/{backup_collection}/backups/{backup}` + # + # @param project [String] + # @param location [String] + # @param backup_collection [String] + # @param backup [String] + # + # @return [::String] + def backup_path project:, location:, backup_collection:, backup: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "backup_collection cannot contain /" if backup_collection.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupCollections/#{backup_collection}/backups/#{backup}" + end + + ## + # Create a fully-qualified BackupCollection resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupCollections/{backup_collection}` + # + # @param project [String] + # @param location [String] + # @param backup_collection [String] + # + # @return [::String] + def backup_collection_path project:, location:, backup_collection: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupCollections/#{backup_collection}" + end + + ## + # Create a fully-qualified CaPool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/caPools/{ca_pool}` + # + # @param project [String] + # @param location [String] + # @param ca_pool [String] + # + # @return [::String] + def ca_pool_path project:, location:, ca_pool: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/caPools/#{ca_pool}" + end + + ## + # Create a fully-qualified CryptoKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # + # @return [::String] + def crypto_key_path project:, location:, key_ring:, crypto_key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" + end + + ## + # Create a fully-qualified CryptoKeyVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # @param crypto_key_version [String] + # + # @return [::String] + def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" + end + + ## + # Create a fully-qualified ForwardingRule resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}` + # + # @param project [String] + # @param region [String] + # @param forwarding_rule [String] + # + # @return [::String] + def forwarding_rule_path project:, region:, forwarding_rule: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" + + "projects/#{project}/regions/#{region}/forwardingRules/#{forwarding_rule}" + end + + ## + # 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 + + ## + # Create a fully-qualified Network resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/global/networks/{network}` + # + # @param project [String] + # @param network [String] + # + # @return [::String] + def network_path project:, network: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/global/networks/#{network}" + end + + ## + # Create a fully-qualified ServiceAttachment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}` + # + # @param project [String] + # @param region [String] + # @param service_attachment [String] + # + # @return [::String] + def service_attachment_path project:, region:, service_attachment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" + + "projects/#{project}/regions/#{region}/serviceAttachments/#{service_attachment}" + end + + ## + # Create a fully-qualified SharedRegionalCertificateAuthority resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def shared_regional_certificate_authority_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}/sharedRegionalCertificateAuthority" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest.rb new file mode 100644 index 000000000000..013b8ba79f84 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. +# 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/memorystore/v1/version" +require "google/cloud/memorystore/v1/bindings_override" + +require "google/cloud/memorystore/v1/memorystore/credentials" +require "google/cloud/memorystore/v1/memorystore/paths" +require "google/cloud/memorystore/v1/memorystore/rest/operations" +require "google/cloud/memorystore/v1/memorystore/rest/client" + +module Google + module Cloud + module Memorystore + module V1 + ## + # Service describing handlers for resources + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/memorystore/v1/memorystore/rest" + # client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + module Memorystore + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/memorystore/v1/memorystore/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/client.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/client.rb new file mode 100644 index 000000000000..fc1598701e89 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/client.rb @@ -0,0 +1,1896 @@ +# frozen_string_literal: true + +# 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. +# 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/memorystore/v1/memorystore_pb" +require "google/cloud/memorystore/v1/memorystore/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Memorystore + module V1 + module Memorystore + module Rest + ## + # REST client for the Memorystore service. + # + # Service describing handlers for resources + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "memorystore.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :memorystore_stub + + ## + # Configure the Memorystore Client class. + # + # See {::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Memorystore clients + # ::Google::Cloud::Memorystore::V1::Memorystore::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", "Memorystore", "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_instances.timeout = 60.0 + default_config.rpcs.list_instances.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_instance.timeout = 60.0 + default_config.rpcs.get_instance.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_instance.timeout = 600.0 + + default_config.rpcs.update_instance.timeout = 600.0 + + default_config.rpcs.delete_instance.timeout = 600.0 + + default_config.rpcs.get_certificate_authority.timeout = 60.0 + default_config.rpcs.get_certificate_authority.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Memorystore 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::Memorystore::V1::Memorystore::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 + @memorystore_stub.universe_domain + end + + ## + # Create a new Memorystore REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Memorystore 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::Memorystore::V1::Memorystore::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 + + @memorystore_stub = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @memorystore_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 = @memorystore_stub.endpoint + config.universe_domain = @memorystore_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @memorystore_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Memorystore::V1::Memorystore::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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @memorystore_stub.logger + end + + # Service calls + + ## + # Lists Instances in a given project and location. + # + # @overload list_instances(request, options = nil) + # Pass arguments to `list_instances` via a request object, either of type + # {::Google::Cloud::Memorystore::V1::ListInstancesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Memorystore::V1::ListInstancesRequest, ::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_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_instances` 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 to list instances from. + # Format: projects/\\{project}/locations/\\{location} + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Expression for filtering results. + # @param order_by [::String] + # Optional. Sort results by a defined order. Supported values: "name", + # "create_time". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1::Instance>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1::Instance>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/memorystore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Memorystore::V1::ListInstancesRequest.new + # + # # Call the list_instances method. + # result = client.list_instances 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::Memorystore::V1::Instance. + # p item + # end + # + def list_instances request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::ListInstancesRequest + + # 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_instances.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::Memorystore::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_instances.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_instances.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @memorystore_stub.list_instances request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @memorystore_stub, :list_instances, "instances", 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 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::Memorystore::V1::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Memorystore::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/\\{project}/locations/\\{location}/instances/\\{instance} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Memorystore::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Memorystore::V1::Instance] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/memorystore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Memorystore::V1::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::Memorystore::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::Memorystore::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::Memorystore::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 + + @memorystore_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 + + ## + # Creates a new Instance in a given project and location. + # + # @overload create_instance(request, options = nil) + # Pass arguments to `create_instance` via a request object, either of type + # {::Google::Cloud::Memorystore::V1::CreateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Memorystore::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, request_id: 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. The parent resource where this instance will be created. + # Format: projects/\\{project}/locations/\\{location} + # @param instance_id [::String] + # Required. The ID to use for the instance, which will become the final + # component of the instance's resource name. + # + # This value is subject to the following restrictions: + # + # * Must be 4-63 characters in length + # * Must begin with a letter or digit + # * Must contain only lowercase letters, digits, and hyphens + # * Must not end with a hyphen + # * Must be unique within a location + # @param instance [::Google::Cloud::Memorystore::V1::Instance, ::Hash] + # Required. The instance to create. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @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/memorystore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Memorystore::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::Memorystore::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::Memorystore::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 + + @memorystore_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 + + ## + # Updates the parameters of a single Instance. + # + # @overload update_instance(request, options = nil) + # Pass arguments to `update_instance` via a request object, either of type + # {::Google::Cloud::Memorystore::V1::UpdateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Memorystore::V1::UpdateInstanceRequest, ::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_instance(update_mask: nil, instance: nil, request_id: nil) + # Pass arguments to `update_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to be updated on the instance. At least one + # field must be specified. + # @param instance [::Google::Cloud::Memorystore::V1::Instance, ::Hash] + # Required. The instance to update. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @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/memorystore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Memorystore::V1::UpdateInstanceRequest.new + # + # # Call the update_instance method. + # result = client.update_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 update_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::UpdateInstanceRequest + + # 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_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::Memorystore::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_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @memorystore_stub.update_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 a single Instance. + # + # @overload delete_instance(request, options = nil) + # Pass arguments to `delete_instance` via a request object, either of type + # {::Google::Cloud::Memorystore::V1::DeleteInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Memorystore::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, request_id: 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/\\{project}/locations/\\{location}/instances/\\{instance} + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @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/memorystore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Memorystore::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::Memorystore::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::Memorystore::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 + + @memorystore_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 about the certificate authority for an Instance. + # + # @overload get_certificate_authority(request, options = nil) + # Pass arguments to `get_certificate_authority` via a request object, either of type + # {::Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest, ::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_certificate_authority(name: nil) + # Pass arguments to `get_certificate_authority` 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 certificate authority. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/certificateAuthority + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Memorystore::V1::CertificateAuthority] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Memorystore::V1::CertificateAuthority] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/memorystore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest.new + # + # # Call the get_certificate_authority method. + # result = client.get_certificate_authority request + # + # # The returned object is of type Google::Cloud::Memorystore::V1::CertificateAuthority. + # p result + # + def get_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest + + # 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_certificate_authority.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::Memorystore::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_certificate_authority.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @memorystore_stub.get_certificate_authority 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 + + ## + # Gets the details of shared regional certificate authority information for + # Memorystore instance. + # + # @overload get_shared_regional_certificate_authority(request, options = nil) + # Pass arguments to `get_shared_regional_certificate_authority` via a request object, either of type + # {::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest, ::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_shared_regional_certificate_authority(name: nil) + # Pass arguments to `get_shared_regional_certificate_authority` 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. Regional certificate authority resource name using the form: + # `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority` + # where `location_id` refers to a Google Cloud region. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/memorystore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest.new + # + # # Call the get_shared_regional_certificate_authority method. + # result = client.get_shared_regional_certificate_authority request + # + # # The returned object is of type Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority. + # p result + # + def get_shared_regional_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest + + # 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_shared_regional_certificate_authority.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::Memorystore::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_shared_regional_certificate_authority.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_shared_regional_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @memorystore_stub.get_shared_regional_certificate_authority 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 + + ## + # Reschedules upcoming maintenance event. + # + # @overload reschedule_maintenance(request, options = nil) + # Pass arguments to `reschedule_maintenance` via a request object, either of type + # {::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest, ::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 reschedule_maintenance(name: nil, reschedule_type: nil, schedule_time: nil) + # Pass arguments to `reschedule_maintenance` 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. Name of the instance to reschedule maintenance for: + # `projects/{project}/locations/{location_id}/instances/{instance}` + # @param reschedule_type [::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest::RescheduleType] + # Required. If reschedule type is SPECIFIC_TIME, schedule_time must be set. + # @param schedule_time [::Google::Protobuf::Timestamp, ::Hash] + # Optional. Timestamp when the maintenance shall be rescheduled to if + # reschedule_type=SPECIFIC_TIME, in RFC 3339 format. + # Example: `2012-11-15T16:19:00.094Z`. + # @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/memorystore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest.new + # + # # Call the reschedule_maintenance method. + # result = client.reschedule_maintenance 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 reschedule_maintenance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest + + # 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.reschedule_maintenance.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::Memorystore::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.reschedule_maintenance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.reschedule_maintenance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @memorystore_stub.reschedule_maintenance 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 + + ## + # Lists all backup collections owned by a consumer project in either the + # specified location (region) or all locations. + # + # If `location_id` is specified as `-` (wildcard), then all regions + # available to the project are queried, and the results are aggregated. + # + # @overload list_backup_collections(request, options = nil) + # Pass arguments to `list_backup_collections` via a request object, either of type + # {::Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest, ::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_backup_collections(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_backup_collections` 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 resource name of the backupCollection location using the + # form: + # `projects/{project_id}/locations/{location_id}` + # where `location_id` refers to a Google Cloud region. + # @param page_size [::Integer] + # Optional. The maximum number of items to return. + # + # If not specified, a default value of 1000 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # {::Google::Cloud::Memorystore::V1::ListBackupCollectionsResponse#next_page_token `next_page_token`} + # to determine if there are more clusters left to be queried. + # @param page_token [::String] + # Optional. The `next_page_token` value returned from a previous + # [ListBackupCollections] request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1::BackupCollection>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1::BackupCollection>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/memorystore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest.new + # + # # Call the list_backup_collections method. + # result = client.list_backup_collections 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::Memorystore::V1::BackupCollection. + # p item + # end + # + def list_backup_collections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest + + # 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_backup_collections.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::Memorystore::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_backup_collections.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_collections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @memorystore_stub.list_backup_collections request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @memorystore_stub, :list_backup_collections, "backup_collections", 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 + + ## + # Get a backup collection. + # + # @overload get_backup_collection(request, options = nil) + # Pass arguments to `get_backup_collection` via a request object, either of type + # {::Google::Cloud::Memorystore::V1::GetBackupCollectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Memorystore::V1::GetBackupCollectionRequest, ::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_backup_collection(name: nil) + # Pass arguments to `get_backup_collection` 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. Instance backupCollection resource name using the form: + # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` + # where `location_id` refers to a Google Cloud region. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Memorystore::V1::BackupCollection] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Memorystore::V1::BackupCollection] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/memorystore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Memorystore::V1::GetBackupCollectionRequest.new + # + # # Call the get_backup_collection method. + # result = client.get_backup_collection request + # + # # The returned object is of type Google::Cloud::Memorystore::V1::BackupCollection. + # p result + # + def get_backup_collection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::GetBackupCollectionRequest + + # 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_backup_collection.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::Memorystore::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_backup_collection.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_collection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @memorystore_stub.get_backup_collection 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 backups owned by a backup collection. + # + # @overload list_backups(request, options = nil) + # Pass arguments to `list_backups` via a request object, either of type + # {::Google::Cloud::Memorystore::V1::ListBackupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Memorystore::V1::ListBackupsRequest, ::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_backups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_backups` 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 resource name of the backupCollection using the form: + # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` + # @param page_size [::Integer] + # Optional. The maximum number of items to return. + # + # If not specified, a default value of 1000 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # {::Google::Cloud::Memorystore::V1::ListBackupsResponse#next_page_token `next_page_token`} + # to determine if there are more clusters left to be queried. + # @param page_token [::String] + # Optional. The `next_page_token` value returned from a previous + # [ListBackupCollections] request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1::Backup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1::Backup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/memorystore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Memorystore::V1::ListBackupsRequest.new + # + # # Call the list_backups method. + # result = client.list_backups 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::Memorystore::V1::Backup. + # p item + # end + # + def list_backups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::ListBackupsRequest + + # 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_backups.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::Memorystore::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_backups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @memorystore_stub.list_backups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @memorystore_stub, :list_backups, "backups", 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 details of a specific backup. + # + # @overload get_backup(request, options = nil) + # Pass arguments to `get_backup` via a request object, either of type + # {::Google::Cloud::Memorystore::V1::GetBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Memorystore::V1::GetBackupRequest, ::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_backup(name: nil) + # Pass arguments to `get_backup` 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. Instance backup resource name using the form: + # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Memorystore::V1::Backup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Memorystore::V1::Backup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/memorystore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Memorystore::V1::GetBackupRequest.new + # + # # Call the get_backup method. + # result = client.get_backup request + # + # # The returned object is of type Google::Cloud::Memorystore::V1::Backup. + # p result + # + def get_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::GetBackupRequest + + # 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_backup.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::Memorystore::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_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @memorystore_stub.get_backup 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 specific backup. + # + # @overload delete_backup(request, options = nil) + # Pass arguments to `delete_backup` via a request object, either of type + # {::Google::Cloud::Memorystore::V1::DeleteBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Memorystore::V1::DeleteBackupRequest, ::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_backup(name: nil, request_id: nil) + # Pass arguments to `delete_backup` 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. Instance backup resource name using the form: + # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + # @param request_id [::String] + # Optional. Idempotent request UUID. + # @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/memorystore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Memorystore::V1::DeleteBackupRequest.new + # + # # Call the delete_backup method. + # result = client.delete_backup 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_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::DeleteBackupRequest + + # 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_backup.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::Memorystore::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_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @memorystore_stub.delete_backup 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 + + ## + # Exports a specific backup to a customer target Cloud Storage URI. + # + # @overload export_backup(request, options = nil) + # Pass arguments to `export_backup` via a request object, either of type + # {::Google::Cloud::Memorystore::V1::ExportBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Memorystore::V1::ExportBackupRequest, ::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 export_backup(gcs_bucket: nil, name: nil) + # Pass arguments to `export_backup` 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 gcs_bucket [::String] + # Google Cloud Storage bucket, like "my-bucket". + # @param name [::String] + # Required. Instance backup resource name using the form: + # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + # @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/memorystore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Memorystore::V1::ExportBackupRequest.new + # + # # Call the export_backup method. + # result = client.export_backup 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 export_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::ExportBackupRequest + + # 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.export_backup.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::Memorystore::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.export_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @memorystore_stub.export_backup 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 + + ## + # Backup Instance. + # If this is the first time a backup is being created, a backup collection + # will be created at the backend, and this backup belongs to this collection. + # Both collection and backup will have a resource name. Backup will be + # executed for each shard. A replica (primary if nonHA) will be selected to + # perform the execution. Backup call will be rejected if there is an ongoing + # backup or update operation. Be aware that during preview, if the instance's + # internal software version is too old, critical update will be performed + # before actual backup. Once the internal software version is updated to the + # minimum version required by the backup feature, subsequent backups will not + # require critical update. After preview, there will be no critical update + # needed for backup. + # + # @overload backup_instance(request, options = nil) + # Pass arguments to `backup_instance` via a request object, either of type + # {::Google::Cloud::Memorystore::V1::BackupInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Memorystore::V1::BackupInstanceRequest, ::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 backup_instance(name: nil, ttl: nil, backup_id: nil) + # Pass arguments to `backup_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. Instance resource name using the form: + # `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + # where `location_id` refers to a Google Cloud region. + # @param ttl [::Google::Protobuf::Duration, ::Hash] + # Optional. TTL for the backup to expire. Value range is 1 day to 100 years. + # If not specified, the default value is 100 years. + # @param backup_id [::String] + # Optional. The id of the backup to be created. If not specified, the + # default value ([YYYYMMDDHHMMSS]_[Shortened Instance UID] is used. + # @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/memorystore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Memorystore::V1::BackupInstanceRequest.new + # + # # Call the backup_instance method. + # result = client.backup_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 backup_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::BackupInstanceRequest + + # 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.backup_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::Memorystore::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.backup_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.backup_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @memorystore_stub.backup_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 + + ## + # Configuration class for the Memorystore REST API. + # + # This class represents the configuration for Memorystore 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::Memorystore::V1::Memorystore::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_instances to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.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. + # * `: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 = "memorystore.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 Memorystore 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_instances` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instances + ## + # RPC-specific configuration for `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + ## + # RPC-specific configuration for `create_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :create_instance + ## + # RPC-specific configuration for `update_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :update_instance + ## + # RPC-specific configuration for `delete_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_instance + ## + # RPC-specific configuration for `get_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate_authority + ## + # RPC-specific configuration for `get_shared_regional_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :get_shared_regional_certificate_authority + ## + # RPC-specific configuration for `reschedule_maintenance` + # @return [::Gapic::Config::Method] + # + attr_reader :reschedule_maintenance + ## + # RPC-specific configuration for `list_backup_collections` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_collections + ## + # RPC-specific configuration for `get_backup_collection` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_collection + ## + # RPC-specific configuration for `list_backups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backups + ## + # RPC-specific configuration for `get_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup + ## + # RPC-specific configuration for `delete_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup + ## + # RPC-specific configuration for `export_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :export_backup + ## + # RPC-specific configuration for `backup_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :backup_instance + + # @private + def initialize parent_rpcs = nil + list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances + @list_instances = ::Gapic::Config::Method.new list_instances_config + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance + @create_instance = ::Gapic::Config::Method.new create_instance_config + update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance + @update_instance = ::Gapic::Config::Method.new update_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_certificate_authority_config = parent_rpcs.get_certificate_authority if parent_rpcs.respond_to? :get_certificate_authority + @get_certificate_authority = ::Gapic::Config::Method.new get_certificate_authority_config + get_shared_regional_certificate_authority_config = parent_rpcs.get_shared_regional_certificate_authority if parent_rpcs.respond_to? :get_shared_regional_certificate_authority + @get_shared_regional_certificate_authority = ::Gapic::Config::Method.new get_shared_regional_certificate_authority_config + reschedule_maintenance_config = parent_rpcs.reschedule_maintenance if parent_rpcs.respond_to? :reschedule_maintenance + @reschedule_maintenance = ::Gapic::Config::Method.new reschedule_maintenance_config + list_backup_collections_config = parent_rpcs.list_backup_collections if parent_rpcs.respond_to? :list_backup_collections + @list_backup_collections = ::Gapic::Config::Method.new list_backup_collections_config + get_backup_collection_config = parent_rpcs.get_backup_collection if parent_rpcs.respond_to? :get_backup_collection + @get_backup_collection = ::Gapic::Config::Method.new get_backup_collection_config + list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups + @list_backups = ::Gapic::Config::Method.new list_backups_config + get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup + @get_backup = ::Gapic::Config::Method.new get_backup_config + delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup + @delete_backup = ::Gapic::Config::Method.new delete_backup_config + export_backup_config = parent_rpcs.export_backup if parent_rpcs.respond_to? :export_backup + @export_backup = ::Gapic::Config::Method.new export_backup_config + backup_instance_config = parent_rpcs.backup_instance if parent_rpcs.respond_to? :backup_instance + @backup_instance = ::Gapic::Config::Method.new backup_instance_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/operations.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/operations.rb new file mode 100644 index 000000000000..9a993c6f693a --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/operations.rb @@ -0,0 +1,924 @@ +# frozen_string_literal: true + +# 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. +# 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 Memorystore + module V1 + module Memorystore + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "memorystore.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Memorystore 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 Memorystore 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::Memorystore::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::Memorystore::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::Memorystore::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::Memorystore::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. + # * `: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 = "memorystore.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. + # * `: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", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/service_stub.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/service_stub.rb new file mode 100644 index 000000000000..8c8870854cd7 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/service_stub.rb @@ -0,0 +1,1001 @@ +# frozen_string_literal: true + +# 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. +# 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/memorystore/v1/memorystore_pb" + +module Google + module Cloud + module Memorystore + module V1 + module Memorystore + module Rest + ## + # REST service stub for the Memorystore 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_instances REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::ListInstancesRequest] + # 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::Memorystore::V1::ListInstancesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Memorystore::V1::ListInstancesResponse] + # A result object deserialized from the server's reply + def list_instances request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_instances_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_instances", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Memorystore::V1::ListInstancesResponse.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::Memorystore::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::Memorystore::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Memorystore::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::Memorystore::V1::Instance.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_instance REST call + # + # @param request_pb [::Google::Cloud::Memorystore::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 update_instance REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::UpdateInstanceRequest] + # 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 update_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_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: "update_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::Memorystore::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_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest] + # 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::Memorystore::V1::CertificateAuthority] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Memorystore::V1::CertificateAuthority] + # A result object deserialized from the server's reply + def get_certificate_authority request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_authority_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_certificate_authority", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Memorystore::V1::CertificateAuthority.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_shared_regional_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest] + # 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::Memorystore::V1::SharedRegionalCertificateAuthority] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority] + # A result object deserialized from the server's reply + def get_shared_regional_certificate_authority request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_shared_regional_certificate_authority_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_shared_regional_certificate_authority", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the reschedule_maintenance REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest] + # 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 reschedule_maintenance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_reschedule_maintenance_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: "reschedule_maintenance", + 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 list_backup_collections REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest] + # 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::Memorystore::V1::ListBackupCollectionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Memorystore::V1::ListBackupCollectionsResponse] + # A result object deserialized from the server's reply + def list_backup_collections request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_collections_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_backup_collections", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Memorystore::V1::ListBackupCollectionsResponse.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_backup_collection REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::GetBackupCollectionRequest] + # 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::Memorystore::V1::BackupCollection] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Memorystore::V1::BackupCollection] + # A result object deserialized from the server's reply + def get_backup_collection request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_collection_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_backup_collection", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Memorystore::V1::BackupCollection.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_backups REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::ListBackupsRequest] + # 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::Memorystore::V1::ListBackupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Memorystore::V1::ListBackupsResponse] + # A result object deserialized from the server's reply + def list_backups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_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_backups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Memorystore::V1::ListBackupsResponse.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_backup REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::GetBackupRequest] + # 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::Memorystore::V1::Backup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Memorystore::V1::Backup] + # A result object deserialized from the server's reply + def get_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_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_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Memorystore::V1::Backup.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_backup REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::DeleteBackupRequest] + # 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_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_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_backup", + 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 export_backup REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::ExportBackupRequest] + # 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 export_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_backup_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: "export_backup", + 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 backup_instance REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::BackupInstanceRequest] + # 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 backup_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_backup_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: "backup_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 + + ## + # @private + # + # GRPC transcoding helper method for the list_instances REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::ListInstancesRequest] + # 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_instances_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/instances", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_instance REST call + # + # @param request_pb [::Google::Cloud::Memorystore::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 + + ## + # @private + # + # GRPC transcoding helper method for the create_instance REST call + # + # @param request_pb [::Google::Cloud::Memorystore::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 update_instance REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::UpdateInstanceRequest] + # 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_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{instance.name}", + body: "instance", + matches: [ + ["instance.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_instance REST call + # + # @param request_pb [::Google::Cloud::Memorystore::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_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest] + # 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_certificate_authority_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/certificateAuthority", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_shared_regional_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest] + # 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_shared_regional_certificate_authority_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/sharedRegionalCertificateAuthority/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the reschedule_maintenance REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_reschedule_maintenance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:rescheduleMaintenance", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_collections REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest] + # 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_backup_collections_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupCollections", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_collection REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::GetBackupCollectionRequest] + # 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_backup_collection_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backups REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::ListBackupsRequest] + # 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_backups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backups", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::GetBackupRequest] + # 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_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::DeleteBackupRequest] + # 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_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_backup REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::ExportBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:export", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the backup_instance REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::BackupInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_backup_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:backup", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_pb.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_pb.rb new file mode 100644 index 000000000000..e556abc53ee6 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_pb.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/memorystore/v1/memorystore.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/dayofweek_pb' +require 'google/type/timeofday_pb' + + +descriptor_data = "\n-google/cloud/memorystore/v1/memorystore.proto\x12\x1bgoogle.cloud.memorystore.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"\xe9\'\n\x08Instance\x12S\n\ngcs_source\x18\x17 \x01(\x0b\x32\x35.google.cloud.memorystore.v1.Instance.GcsBackupSourceB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12\x62\n\x15managed_backup_source\x18\x18 \x01(\x0b\x32\x39.google.cloud.memorystore.v1.Instance.ManagedBackupSourceB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\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\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.memorystore.v1.Instance.LabelsEntryB\x03\xe0\x41\x01\x12?\n\x05state\x18\x05 \x01(\x0e\x32+.google.cloud.memorystore.v1.Instance.StateB\x03\xe0\x41\x03\x12H\n\nstate_info\x18\x06 \x01(\x0b\x32/.google.cloud.memorystore.v1.Instance.StateInfoB\x03\xe0\x41\x03\x12\x18\n\x03uid\x18\x07 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1f\n\rreplica_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12[\n\x12\x61uthorization_mode\x18\t \x01(\x0e\x32\x37.google.cloud.memorystore.v1.Instance.AuthorizationModeB\x06\xe0\x41\x01\xe0\x41\x05\x12\x64\n\x17transit_encryption_mode\x18\n \x01(\x0e\x32;.google.cloud.memorystore.v1.Instance.TransitEncryptionModeB\x06\xe0\x41\x01\xe0\x41\x05\x12\x18\n\x0bshard_count\x18\x0b \x01(\x05\x42\x03\xe0\x41\x01\x12R\n\x13\x64iscovery_endpoints\x18\x0c \x03(\x0b\x32..google.cloud.memorystore.v1.DiscoveryEndpointB\x05\x18\x01\xe0\x41\x03\x12\x46\n\tnode_type\x18\r \x01(\x0e\x32..google.cloud.memorystore.v1.Instance.NodeTypeB\x03\xe0\x41\x01\x12O\n\x12persistence_config\x18\x0e \x01(\x0b\x32..google.cloud.memorystore.v1.PersistenceConfigB\x03\xe0\x41\x01\x12\x1b\n\x0e\x65ngine_version\x18\x0f \x01(\tB\x03\xe0\x41\x01\x12U\n\x0e\x65ngine_configs\x18\x10 \x03(\x0b\x32\x38.google.cloud.memorystore.v1.Instance.EngineConfigsEntryB\x03\xe0\x41\x01\x12\x41\n\x0bnode_config\x18\x11 \x01(\x0b\x32\'.google.cloud.memorystore.v1.NodeConfigB\x03\xe0\x41\x03\x12]\n\x18zone_distribution_config\x18\x12 \x01(\x0b\x32\x33.google.cloud.memorystore.v1.ZoneDistributionConfigB\x06\xe0\x41\x01\xe0\x41\x05\x12-\n\x1b\x64\x65letion_protection_enabled\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12V\n\x14psc_auto_connections\x18\x14 \x03(\x0b\x32..google.cloud.memorystore.v1.PscAutoConnectionB\x08\x18\x01\xe0\x41\x01\xe0\x41\x05\x12U\n\x16psc_attachment_details\x18\x15 \x03(\x0b\x32\x30.google.cloud.memorystore.v1.PscAttachmentDetailB\x03\xe0\x41\x03\x12N\n\tendpoints\x18\x19 \x03(\x0b\x32\x36.google.cloud.memorystore.v1.Instance.InstanceEndpointB\x03\xe0\x41\x01\x12=\n\x04mode\x18\x1a \x01(\x0e\x32*.google.cloud.memorystore.v1.Instance.ModeB\x03\xe0\x41\x01\x12/\n\x1asimulate_maintenance_event\x18\x1b \x01(\x08\x42\x06\xe0\x41\x01\xe0\x41\x04H\x03\x88\x01\x01\x12+\n\x14ondemand_maintenance\x18\x1c \x01(\x08\x42\x08\x18\x01\xe0\x41\x01\xe0\x41\x04H\x04\x88\x01\x01\x12\"\n\rsatisfies_pzs\x18\x1d \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\"\n\rsatisfies_pzi\x18\x1e \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x06\x88\x01\x01\x12O\n\x12maintenance_policy\x18\x1f \x01(\x0b\x32..google.cloud.memorystore.v1.MaintenancePolicyB\x03\xe0\x41\x01\x12S\n\x14maintenance_schedule\x18 \x01(\x0b\x32\x30.google.cloud.memorystore.v1.MaintenanceScheduleB\x03\xe0\x41\x03\x12k\n!cross_instance_replication_config\x18! \x01(\x0b\x32;.google.cloud.memorystore.v1.CrossInstanceReplicationConfigB\x03\xe0\x41\x01\x12;\n)async_instance_endpoints_deletion_enabled\x18, \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12?\n\x07kms_key\x18- \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKeyH\x08\x88\x01\x01\x12I\n\x0f\x65ncryption_info\x18. \x01(\x0b\x32+.google.cloud.memorystore.v1.EncryptionInfoB\x03\xe0\x41\x03\x12S\n\x11\x62\x61\x63kup_collection\x18/ \x01(\tB3\xe0\x41\x03\xfa\x41-\n+memorystore.googleapis.com/BackupCollectionH\t\x88\x01\x01\x12X\n\x17\x61utomated_backup_config\x18\x30 \x01(\x0b\x32\x32.google.cloud.memorystore.v1.AutomatedBackupConfigB\x03\xe0\x41\x01\x12%\n\x13maintenance_version\x18\x31 \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12/\n\x1d\x65\x66\x66\x65\x63tive_maintenance_version\x18\x32 \x01(\tB\x03\xe0\x41\x03H\x0b\x88\x01\x01\x12+\n\x1e\x61vailable_maintenance_versions\x18\x33 \x03(\tB\x03\xe0\x41\x03\x12.\n\x1c\x61llow_fewer_zones_deployment\x18\x36 \x01(\x08\x42\x08\x18\x01\xe0\x41\x01\xe0\x41\x05\x12W\n\x0eserver_ca_mode\x18\x38 \x01(\x0e\x32\x32.google.cloud.memorystore.v1.Instance.ServerCaModeB\x06\xe0\x41\x01\xe0\x41\x05H\x0c\x88\x01\x01\x12G\n\x0eserver_ca_pool\x18\x39 \x01(\tB*\xe0\x41\x01\xe0\x41\x05\xfa\x41!\n\x1fprivateca.googleapis.com/CaPoolH\r\x88\x01\x01\x12.\n\x19rotate_server_certificate\x18: \x01(\x08\x42\x06\xe0\x41\x01\xe0\x41\x04H\x0e\x88\x01\x01\x1a\xa4\x03\n\tStateInfo\x12V\n\x0bupdate_info\x18\x01 \x01(\x0b\x32:.google.cloud.memorystore.v1.Instance.StateInfo.UpdateInfoB\x03\xe0\x41\x03H\x00\x1a\xb6\x02\n\nUpdateInfo\x12$\n\x12target_shard_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12&\n\x14target_replica_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\'\n\x15target_engine_version\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12R\n\x10target_node_type\x18\x04 \x01(\x0e\x32..google.cloud.memorystore.v1.Instance.NodeTypeB\x03\xe0\x41\x03H\x03\x88\x01\x01\x42\x15\n\x13_target_shard_countB\x17\n\x15_target_replica_countB\x18\n\x16_target_engine_versionB\x13\n\x11_target_node_typeB\x06\n\x04info\x1a$\n\x0fGcsBackupSource\x12\x11\n\x04uris\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a*\n\x13ManagedBackupSource\x12\x13\n\x06\x62\x61\x63kup\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x64\n\x10InstanceEndpoint\x12P\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32\x36.google.cloud.memorystore.v1.Instance.ConnectionDetailB\x03\xe0\x41\x01\x1a\xba\x01\n\x10\x43onnectionDetail\x12R\n\x13psc_auto_connection\x18\x01 \x01(\x0b\x32..google.cloud.memorystore.v1.PscAutoConnectionB\x03\xe0\x41\x05H\x00\x12\x44\n\x0epsc_connection\x18\x02 \x01(\x0b\x32*.google.cloud.memorystore.v1.PscConnectionH\x00\x42\x0c\n\nconnection\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x34\n\x12\x45ngineConfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\"X\n\x11\x41uthorizationMode\x12\"\n\x1e\x41UTHORIZATION_MODE_UNSPECIFIED\x10\x00\x12\x11\n\rAUTH_DISABLED\x10\x01\x12\x0c\n\x08IAM_AUTH\x10\x02\"|\n\x15TransitEncryptionMode\x12\'\n#TRANSIT_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bTRANSIT_ENCRYPTION_DISABLED\x10\x01\x12\x19\n\x15SERVER_AUTHENTICATION\x10\x02\"w\n\x08NodeType\x12\x19\n\x15NODE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10SHARED_CORE_NANO\x10\x01\x12\x12\n\x0eHIGHMEM_MEDIUM\x10\x02\x12\x12\n\x0eHIGHMEM_XLARGE\x10\x03\x12\x12\n\x0eSTANDARD_SMALL\x10\x04\"S\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x12\n\nSTANDALONE\x10\x01\x1a\x02\x08\x01\x12\x0b\n\x07\x43LUSTER\x10\x02\x12\x14\n\x10\x43LUSTER_DISABLED\x10\x04\"\xa9\x02\n\x0cServerCaMode\x12\x1e\n\x1aSERVER_CA_MODE_UNSPECIFIED\x10\x00\x12\"\n\x1eGOOGLE_MANAGED_PER_INSTANCE_CA\x10\x01\x12\x1c\n\x18GOOGLE_MANAGED_SHARED_CA\x10\x02\x12\x1b\n\x17\x43USTOMER_MANAGED_CAS_CA\x10\x03\x12\x35\n-SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA\x10\x01\x1a\x02\x08\x01\x12/\n\'SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA\x10\x02\x1a\x02\x08\x01\x12.\n&SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA\x10\x03\x1a\x02\x08\x01\x1a\x02\x10\x01:{\xea\x41x\n#memorystore.googleapis.com/Instance\x12.google.cloud.memorystore.v1.PersistenceConfig.PersistenceModeB\x03\xe0\x41\x01\x12Q\n\nrdb_config\x18\x02 \x01(\x0b\x32\x38.google.cloud.memorystore.v1.PersistenceConfig.RDBConfigB\x03\xe0\x41\x01\x12Q\n\naof_config\x18\x03 \x01(\x0b\x32\x38.google.cloud.memorystore.v1.PersistenceConfig.AOFConfigB\x03\xe0\x41\x01\x1a\xb1\x02\n\tRDBConfig\x12i\n\x13rdb_snapshot_period\x18\x01 \x01(\x0e\x32G.google.cloud.memorystore.v1.PersistenceConfig.RDBConfig.SnapshotPeriodB\x03\xe0\x41\x01\x12@\n\x17rdb_snapshot_start_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"w\n\x0eSnapshotPeriod\x12\x1f\n\x1bSNAPSHOT_PERIOD_UNSPECIFIED\x10\x00\x12\x0c\n\x08ONE_HOUR\x10\x01\x12\r\n\tSIX_HOURS\x10\x02\x12\x10\n\x0cTWELVE_HOURS\x10\x03\x12\x15\n\x11TWENTY_FOUR_HOURS\x10\x04\x1a\xbf\x01\n\tAOFConfig\x12_\n\x0c\x61ppend_fsync\x18\x01 \x01(\x0e\x32\x44.google.cloud.memorystore.v1.PersistenceConfig.AOFConfig.AppendFsyncB\x03\xe0\x41\x01\"Q\n\x0b\x41ppendFsync\x12\x1c\n\x18\x41PPEND_FSYNC_UNSPECIFIED\x10\x00\x12\t\n\x05NEVER\x10\x01\x12\r\n\tEVERY_SEC\x10\x02\x12\n\n\x06\x41LWAYS\x10\x03\"S\n\x0fPersistenceMode\x12 \n\x1cPERSISTENCE_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x07\n\x03RDB\x10\x02\x12\x07\n\x03\x41OF\x10\x03\"\"\n\nNodeConfig\x12\x14\n\x07size_gb\x18\x01 \x01(\x01\x42\x03\xe0\x41\x03\"\xe9\x01\n\x16ZoneDistributionConfig\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12[\n\x04mode\x18\x01 \x01(\x0e\x32H.google.cloud.memorystore.v1.ZoneDistributionConfig.ZoneDistributionModeB\x03\xe0\x41\x01\"_\n\x14ZoneDistributionMode\x12&\n\"ZONE_DISTRIBUTION_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nMULTI_ZONE\x10\x01\x12\x0f\n\x0bSINGLE_ZONE\x10\x02\"\xce\x02\n\x1cRescheduleMaintenanceRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\x12\x66\n\x0freschedule_type\x18\x02 \x01(\x0e\x32H.google.cloud.memorystore.v1.RescheduleMaintenanceRequest.RescheduleTypeB\x03\xe0\x41\x02\x12\x36\n\rschedule_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"S\n\x0eRescheduleType\x12\x1f\n\x1bRESCHEDULE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tIMMEDIATE\x10\x01\x12\x11\n\rSPECIFIC_TIME\x10\x03\"\xb0\x01\n\x14ListInstancesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#memorystore.googleapis.com/Instance\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x7f\n\x15ListInstancesResponse\x12\x38\n\tinstances\x18\x01 \x03(\x0b\x32%.google.cloud.memorystore.v1.Instance\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"O\n\x12GetInstanceRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\"\xcd\x01\n\x15\x43reateInstanceRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#memorystore.googleapis.com/Instance\x12\x18\n\x0binstance_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\x08instance\x18\x03 \x01(\x0b\x32%.google.cloud.memorystore.v1.InstanceB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xac\x01\n\x15UpdateInstanceRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12<\n\x08instance\x18\x02 \x01(\x0b\x32%.google.cloud.memorystore.v1.InstanceB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"s\n\x15\x44\x65leteInstanceRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x94\x01\n\x1cListBackupCollectionsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+memorystore.googleapis.com/BackupCollection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x98\x01\n\x1dListBackupCollectionsResponse\x12I\n\x12\x62\x61\x63kup_collections\x18\x01 \x03(\x0b\x32-.google.cloud.memorystore.v1.BackupCollection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x1aGetBackupCollectionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+memorystore.googleapis.com/BackupCollection\"\x80\x01\n\x12ListBackupsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!memorystore.googleapis.com/Backup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"y\n\x13ListBackupsResponse\x12\x34\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32#.google.cloud.memorystore.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"K\n\x10GetBackupRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!memorystore.googleapis.com/Backup\"o\n\x13\x44\x65leteBackupRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!memorystore.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"s\n\x13\x45xportBackupRequest\x12\x14\n\ngcs_bucket\x18\x02 \x01(\tH\x00\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!memorystore.googleapis.com/BackupB\r\n\x0b\x64\x65stination\"\xaa\x01\n\x15\x42\x61\x63kupInstanceRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\x12+\n\x03ttl\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x1b\n\tbackup_id\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0c\n\n_backup_id\"[\n\x1eGetCertificateAuthorityRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\"\x89\x04\n\x14\x43\x65rtificateAuthority\x12j\n\x11managed_server_ca\x18\x02 \x01(\x0b\x32M.google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthorityH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x1a\xab\x01\n\x1bManagedCertificateAuthority\x12i\n\x08\x63\x61_certs\x18\x01 \x03(\x0b\x32W.google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain\x1a!\n\tCertChain\x12\x14\n\x0c\x63\x65rtificates\x18\x01 \x03(\t:\xb6\x01\xea\x41\xb2\x01\n/memorystore.googleapis.com/CertificateAuthority\x12Qprojects/{project}/locations/{location}/instances/{instance}/certificateAuthority*\x16\x63\x65rtificateAuthorities2\x14\x63\x65rtificateAuthorityB\x0b\n\tserver_ca\"\x80\x05\n\"SharedRegionalCertificateAuthority\x12\x80\x01\n\x11managed_server_ca\x18\x02 \x01(\x0b\x32\x63.google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthorityH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x1a\xda\x01\n#RegionalManagedCertificateAuthority\x12\x87\x01\n\x08\x63\x61_certs\x18\x01 \x03(\x0b\x32u.google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain\x1a)\n\x11RegionalCertChain\x12\x14\n\x0c\x63\x65rtificates\x18\x01 \x03(\t:\xd9\x01\xea\x41\xd5\x01\n=memorystore.googleapis.com/SharedRegionalCertificateAuthority\x12Jprojects/{project}/locations/{location}/sharedRegionalCertificateAuthority*$sharedRegionalCertificateAuthorities2\"sharedRegionalCertificateAuthorityB\x0b\n\tserver_ca\"\x83\x01\n,GetSharedRegionalCertificateAuthorityRequest\x12S\n\x04name\x18\x01 \x01(\tBE\xe0\x41\x02\xfa\x41?\n=memorystore.googleapis.com/SharedRegionalCertificateAuthority\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xf6\x04\n\x0e\x45ncryptionInfo\x12N\n\x0f\x65ncryption_type\x18\x01 \x01(\x0e\x32\x30.google.cloud.memorystore.v1.EncryptionInfo.TypeB\x03\xe0\x41\x03\x12J\n\x10kms_key_versions\x18\x02 \x03(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12[\n\x15kms_key_primary_state\x18\x03 \x01(\x0e\x32\x37.google.cloud.memorystore.v1.EncryptionInfo.KmsKeyStateB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\\\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x01\x12\x1f\n\x1b\x43USTOMER_MANAGED_ENCRYPTION\x10\x02\"\xd1\x01\n\x0bKmsKeyState\x12\x1d\n\x19KMS_KEY_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03\x12\r\n\tDESTROYED\x10\x04\x12\x15\n\x11\x44\x45STROY_SCHEDULED\x10\x05\x12 \n\x1c\x45KM_KEY_UNREACHABLE_DETECTED\x10\x06\x12\x14\n\x10\x42ILLING_DISABLED\x10\x07\x12\x13\n\x0fUNKNOWN_FAILURE\x10\x08*W\n\x13PscConnectionStatus\x12%\n!PSC_CONNECTION_STATUS_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\r\n\tNOT_FOUND\x10\x02*\x89\x01\n\x0e\x43onnectionType\x12\x1f\n\x1b\x43ONNECTION_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x43ONNECTION_TYPE_DISCOVERY\x10\x01\x12\x1b\n\x17\x43ONNECTION_TYPE_PRIMARY\x10\x02\x12\x1a\n\x16\x43ONNECTION_TYPE_READER\x10\x03\x32\xe3\x19\n\x0bMemorystore\x12\xb6\x01\n\rListInstances\x12\x31.google.cloud.memorystore.v1.ListInstancesRequest\x1a\x32.google.cloud.memorystore.v1.ListInstancesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/instances\x12\xa3\x01\n\x0bGetInstance\x12/.google.cloud.memorystore.v1.GetInstanceRequest\x1a%.google.cloud.memorystore.v1.Instance\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/instances/*}\x12\xe2\x01\n\x0e\x43reateInstance\x12\x32.google.cloud.memorystore.v1.CreateInstanceRequest\x1a\x1d.google.longrunning.Operation\"}\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x1bparent,instance,instance_id\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/instances:\x08instance\x12\xe4\x01\n\x0eUpdateInstance\x12\x32.google.cloud.memorystore.v1.UpdateInstanceRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x14instance,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{instance.name=projects/*/locations/*/instances/*}:\x08instance\x12\xce\x01\n\x0e\x44\x65leteInstance\x12\x32.google.cloud.memorystore.v1.DeleteInstanceRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/instances/*}\x12\xdc\x01\n\x17GetCertificateAuthority\x12;.google.cloud.memorystore.v1.GetCertificateAuthorityRequest\x1a\x31.google.cloud.memorystore.v1.CertificateAuthority\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/instances/*}/certificateAuthority\x12\x88\x02\n%GetSharedRegionalCertificateAuthority\x12I.google.cloud.memorystore.v1.GetSharedRegionalCertificateAuthorityRequest\x1a?.google.cloud.memorystore.v1.SharedRegionalCertificateAuthority\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=projects/*/locations/*/sharedRegionalCertificateAuthority}\x12\x87\x02\n\x15RescheduleMaintenance\x12\x39.google.cloud.memorystore.v1.RescheduleMaintenanceRequest\x1a\x1d.google.longrunning.Operation\"\x93\x01\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\"name,reschedule_type,schedule_time\x82\xd3\xe4\x93\x02H\"C/v1/{name=projects/*/locations/*/instances/*}:rescheduleMaintenance:\x01*\x12\xd6\x01\n\x15ListBackupCollections\x12\x39.google.cloud.memorystore.v1.ListBackupCollectionsRequest\x1a:.google.cloud.memorystore.v1.ListBackupCollectionsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/backupCollections\x12\xc3\x01\n\x13GetBackupCollection\x12\x37.google.cloud.memorystore.v1.GetBackupCollectionRequest\x1a-.google.cloud.memorystore.v1.BackupCollection\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/backupCollections/*}\x12\xc2\x01\n\x0bListBackups\x12/.google.cloud.memorystore.v1.ListBackupsRequest\x1a\x30.google.cloud.memorystore.v1.ListBackupsResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/locations/*/backupCollections/*}/backups\x12\xaf\x01\n\tGetBackup\x12-.google.cloud.memorystore.v1.GetBackupRequest\x1a#.google.cloud.memorystore.v1.Backup\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xdc\x01\n\x0c\x44\x65leteBackup\x12\x30.google.cloud.memorystore.v1.DeleteBackupRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xd0\x01\n\x0c\x45xportBackup\x12\x30.google.cloud.memorystore.v1.ExportBackupRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02K\"F/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}:export:\x01*\x12\xcb\x01\n\x0e\x42\x61\x63kupInstance\x12\x32.google.cloud.memorystore.v1.BackupInstanceRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/v1/{name=projects/*/locations/*/instances/*}:backup:\x01*\x1aN\xca\x41\x1amemorystore.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x90\x07\n\x1f\x63om.google.cloud.memorystore.v1B\x0bV1mainProtoP\x01ZAcloud.google.com/go/memorystore/apiv1/memorystorepb;memorystorepb\xaa\x02\x1bGoogle.Cloud.Memorystore.V1\xca\x02\x1bGoogle\\Cloud\\Memorystore\\V1\xea\x02\x1eGoogle::Cloud::Memorystore::V1\xea\x41n\n%compute.googleapis.com/ForwardingRule\x12\x45projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}\xea\x41w\n(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}\xea\x41\\\n\x1fprivateca.googleapis.com/CaPool\x12\x39projects/{project}/locations/{location}/caPools/{ca_pool}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Memorystore + module V1 + Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance").msgclass + Instance::StateInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.StateInfo").msgclass + Instance::StateInfo::UpdateInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.StateInfo.UpdateInfo").msgclass + Instance::GcsBackupSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.GcsBackupSource").msgclass + Instance::ManagedBackupSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.ManagedBackupSource").msgclass + Instance::InstanceEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.InstanceEndpoint").msgclass + Instance::ConnectionDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.ConnectionDetail").msgclass + Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.State").enummodule + Instance::AuthorizationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.AuthorizationMode").enummodule + Instance::TransitEncryptionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.TransitEncryptionMode").enummodule + Instance::NodeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.NodeType").enummodule + Instance::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.Mode").enummodule + Instance::ServerCaMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.ServerCaMode").enummodule + AutomatedBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.AutomatedBackupConfig").msgclass + AutomatedBackupConfig::FixedFrequencySchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.AutomatedBackupConfig.FixedFrequencySchedule").msgclass + AutomatedBackupConfig::AutomatedBackupMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.AutomatedBackupConfig.AutomatedBackupMode").enummodule + BackupCollection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.BackupCollection").msgclass + Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Backup").msgclass + Backup::BackupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Backup.BackupType").enummodule + Backup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Backup.State").enummodule + BackupFile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.BackupFile").msgclass + CrossInstanceReplicationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.CrossInstanceReplicationConfig").msgclass + CrossInstanceReplicationConfig::RemoteInstance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance").msgclass + CrossInstanceReplicationConfig::Membership = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.CrossInstanceReplicationConfig.Membership").msgclass + CrossInstanceReplicationConfig::InstanceRole = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.CrossInstanceReplicationConfig.InstanceRole").enummodule + MaintenancePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.MaintenancePolicy").msgclass + WeeklyMaintenanceWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.WeeklyMaintenanceWindow").msgclass + MaintenanceSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.MaintenanceSchedule").msgclass + PscAttachmentDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PscAttachmentDetail").msgclass + PscAutoConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PscAutoConnection").msgclass + PscConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PscConnection").msgclass + DiscoveryEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.DiscoveryEndpoint").msgclass + PersistenceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PersistenceConfig").msgclass + PersistenceConfig::RDBConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PersistenceConfig.RDBConfig").msgclass + PersistenceConfig::RDBConfig::SnapshotPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PersistenceConfig.RDBConfig.SnapshotPeriod").enummodule + PersistenceConfig::AOFConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PersistenceConfig.AOFConfig").msgclass + PersistenceConfig::AOFConfig::AppendFsync = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PersistenceConfig.AOFConfig.AppendFsync").enummodule + PersistenceConfig::PersistenceMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PersistenceConfig.PersistenceMode").enummodule + NodeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.NodeConfig").msgclass + ZoneDistributionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ZoneDistributionConfig").msgclass + ZoneDistributionConfig::ZoneDistributionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ZoneDistributionConfig.ZoneDistributionMode").enummodule + RescheduleMaintenanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.RescheduleMaintenanceRequest").msgclass + RescheduleMaintenanceRequest::RescheduleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.RescheduleMaintenanceRequest.RescheduleType").enummodule + ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ListInstancesRequest").msgclass + ListInstancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ListInstancesResponse").msgclass + GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.GetInstanceRequest").msgclass + CreateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.CreateInstanceRequest").msgclass + UpdateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.UpdateInstanceRequest").msgclass + DeleteInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.DeleteInstanceRequest").msgclass + ListBackupCollectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ListBackupCollectionsRequest").msgclass + ListBackupCollectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ListBackupCollectionsResponse").msgclass + GetBackupCollectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.GetBackupCollectionRequest").msgclass + ListBackupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ListBackupsRequest").msgclass + ListBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ListBackupsResponse").msgclass + GetBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.GetBackupRequest").msgclass + DeleteBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.DeleteBackupRequest").msgclass + ExportBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ExportBackupRequest").msgclass + BackupInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.BackupInstanceRequest").msgclass + GetCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.GetCertificateAuthorityRequest").msgclass + CertificateAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.CertificateAuthority").msgclass + CertificateAuthority::ManagedCertificateAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority").msgclass + CertificateAuthority::ManagedCertificateAuthority::CertChain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain").msgclass + SharedRegionalCertificateAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.SharedRegionalCertificateAuthority").msgclass + SharedRegionalCertificateAuthority::RegionalManagedCertificateAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority").msgclass + SharedRegionalCertificateAuthority::RegionalManagedCertificateAuthority::RegionalCertChain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain").msgclass + GetSharedRegionalCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.GetSharedRegionalCertificateAuthorityRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.OperationMetadata").msgclass + EncryptionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.EncryptionInfo").msgclass + EncryptionInfo::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.EncryptionInfo.Type").enummodule + EncryptionInfo::KmsKeyState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.EncryptionInfo.KmsKeyState").enummodule + PscConnectionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PscConnectionStatus").enummodule + ConnectionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ConnectionType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_services_pb.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_services_pb.rb new file mode 100644 index 000000000000..62826610afd6 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_services_pb.rb @@ -0,0 +1,89 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/memorystore/v1/memorystore.proto for package 'Google.Cloud.Memorystore.V1' +# Original file comments: +# 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. +# 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/memorystore/v1/memorystore_pb' + +module Google + module Cloud + module Memorystore + module V1 + module Memorystore + # Service describing handlers for resources + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.memorystore.v1.Memorystore' + + # Lists Instances in a given project and location. + rpc :ListInstances, ::Google::Cloud::Memorystore::V1::ListInstancesRequest, ::Google::Cloud::Memorystore::V1::ListInstancesResponse + # Gets details of a single Instance. + rpc :GetInstance, ::Google::Cloud::Memorystore::V1::GetInstanceRequest, ::Google::Cloud::Memorystore::V1::Instance + # Creates a new Instance in a given project and location. + rpc :CreateInstance, ::Google::Cloud::Memorystore::V1::CreateInstanceRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single Instance. + rpc :UpdateInstance, ::Google::Cloud::Memorystore::V1::UpdateInstanceRequest, ::Google::Longrunning::Operation + # Deletes a single Instance. + rpc :DeleteInstance, ::Google::Cloud::Memorystore::V1::DeleteInstanceRequest, ::Google::Longrunning::Operation + # Gets details about the certificate authority for an Instance. + rpc :GetCertificateAuthority, ::Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest, ::Google::Cloud::Memorystore::V1::CertificateAuthority + # Gets the details of shared regional certificate authority information for + # Memorystore instance. + rpc :GetSharedRegionalCertificateAuthority, ::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest, ::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority + # Reschedules upcoming maintenance event. + rpc :RescheduleMaintenance, ::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest, ::Google::Longrunning::Operation + # Lists all backup collections owned by a consumer project in either the + # specified location (region) or all locations. + # + # If `location_id` is specified as `-` (wildcard), then all regions + # available to the project are queried, and the results are aggregated. + rpc :ListBackupCollections, ::Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest, ::Google::Cloud::Memorystore::V1::ListBackupCollectionsResponse + # Get a backup collection. + rpc :GetBackupCollection, ::Google::Cloud::Memorystore::V1::GetBackupCollectionRequest, ::Google::Cloud::Memorystore::V1::BackupCollection + # Lists all backups owned by a backup collection. + rpc :ListBackups, ::Google::Cloud::Memorystore::V1::ListBackupsRequest, ::Google::Cloud::Memorystore::V1::ListBackupsResponse + # Gets the details of a specific backup. + rpc :GetBackup, ::Google::Cloud::Memorystore::V1::GetBackupRequest, ::Google::Cloud::Memorystore::V1::Backup + # Deletes a specific backup. + rpc :DeleteBackup, ::Google::Cloud::Memorystore::V1::DeleteBackupRequest, ::Google::Longrunning::Operation + # Exports a specific backup to a customer target Cloud Storage URI. + rpc :ExportBackup, ::Google::Cloud::Memorystore::V1::ExportBackupRequest, ::Google::Longrunning::Operation + # Backup Instance. + # If this is the first time a backup is being created, a backup collection + # will be created at the backend, and this backup belongs to this collection. + # Both collection and backup will have a resource name. Backup will be + # executed for each shard. A replica (primary if nonHA) will be selected to + # perform the execution. Backup call will be rejected if there is an ongoing + # backup or update operation. Be aware that during preview, if the instance's + # internal software version is too old, critical update will be performed + # before actual backup. Once the internal software version is updated to the + # minimum version required by the backup feature, subsequent backups will not + # require critical update. After preview, there will be no critical update + # needed for backup. + rpc :BackupInstance, ::Google::Cloud::Memorystore::V1::BackupInstanceRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/rest.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/rest.rb new file mode 100644 index 000000000000..f1e30598150d --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# 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. +# 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/memorystore/v1/memorystore/rest" +require "google/cloud/memorystore/v1/bindings_override" +require "google/cloud/memorystore/v1/version" + +module Google + module Cloud + module Memorystore + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/memorystore/v1/rest" + # client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/version.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/version.rb new file mode 100644 index 000000000000..35e49e45c5c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# 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. +# 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 Memorystore + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/README.md new file mode 100644 index 000000000000..551567df9897 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Memorystore 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# 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. +# 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. + 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. + # @!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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# 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. +# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/field_info.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# 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. +# 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 + # Rich semantic information of an API field beyond basic typing. + # @!attribute [rw] format + # @return [::Google::Api::FieldInfo::Format] + # The standard format of a field value. This does not explicitly configure + # any API consumer, just documents the API's format for the field it is + # applied to. + # @!attribute [rw] referenced_types + # @return [::Array<::Google::Api::TypeReference>] + # The type(s) that the annotated, generic field may represent. + # + # Currently, this must only be used on fields of type `google.protobuf.Any`. + # Supporting other generic types may be considered in the future. + class FieldInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The standard format of a field value. The supported formats are all backed + # by either an RFC defined by the IETF or a Google-defined AIP. + module Format + # Default, unspecified value. + FORMAT_UNSPECIFIED = 0 + + # Universally Unique Identifier, version 4, value as defined by + # https://datatracker.ietf.org/doc/html/rfc4122. The value may be + # normalized to entirely lowercase letters. For example, the value + # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1 + + # Internet Protocol v4 value as defined by [RFC + # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + # condensed, with leading zeros in each octet stripped. For example, + # `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2 + + # Internet Protocol v6 value as defined by [RFC + # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + # normalized to entirely lowercase letters with zeros compressed, following + # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3 + + # An IP address in either v4 or v6 format as described by the individual + # values defined herein. See the comments on the IPV4 and IPV6 types for + # allowed normalizations of each. + IPV4_OR_IPV6 = 4 + end + end + + # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. + # @!attribute [rw] type_name + # @return [::String] + # The name of the type that the annotated, generic field may represent. + # If the type is in the same protobuf package, the value can be the simple + # message name e.g., `"MyMessage"`. Otherwise, the value must be the + # fully-qualified message name e.g., `"google.library.v1.Book"`. + # + # If the type(s) are unknown to the service (e.g. the field accepts generic + # user input), use the wildcard `"*"` to denote this behavior. + # + # See [AIP-202](https://google.aip.dev/202#type-references) for more details. + class TypeReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# 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. +# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# 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. +# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/cloud/memorystore/v1/memorystore.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/cloud/memorystore/v1/memorystore.rb new file mode 100644 index 000000000000..71ed7095cffe --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/cloud/memorystore/v1/memorystore.rb @@ -0,0 +1,1486 @@ +# frozen_string_literal: true + +# 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. +# 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 Memorystore + module V1 + # A Memorystore instance. + # @!attribute [rw] gcs_source + # @return [::Google::Cloud::Memorystore::V1::Instance::GcsBackupSource] + # Optional. Immutable. Backups that stored in Cloud Storage buckets. + # The Cloud Storage buckets need to be the same region as the instances. + # Read permission is required to import from the provided Cloud Storage + # Objects. + # + # Note: The following fields are mutually exclusive: `gcs_source`, `managed_backup_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] managed_backup_source + # @return [::Google::Cloud::Memorystore::V1::Instance::ManagedBackupSource] + # Optional. Immutable. Backups that generated and managed by memorystore + # service. + # + # Note: The following fields are mutually exclusive: `managed_backup_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # Identifier. Unique name of the instance. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation timestamp of the instance. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Latest update timestamp of the instance. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels to represent user-provided metadata. + # @!attribute [r] state + # @return [::Google::Cloud::Memorystore::V1::Instance::State] + # Output only. Current state of the instance. + # @!attribute [r] state_info + # @return [::Google::Cloud::Memorystore::V1::Instance::StateInfo] + # Output only. Additional information about the state of the instance. + # @!attribute [r] uid + # @return [::String] + # Output only. System assigned, unique identifier for the instance. + # @!attribute [rw] replica_count + # @return [::Integer] + # Optional. Number of replica nodes per shard. If omitted the default is 0 + # replicas. + # @!attribute [rw] authorization_mode + # @return [::Google::Cloud::Memorystore::V1::Instance::AuthorizationMode] + # Optional. Immutable. Authorization mode of the instance. + # @!attribute [rw] transit_encryption_mode + # @return [::Google::Cloud::Memorystore::V1::Instance::TransitEncryptionMode] + # Optional. Immutable. In-transit encryption mode of the instance. + # @!attribute [rw] shard_count + # @return [::Integer] + # Optional. Number of shards for the instance. + # @!attribute [r] discovery_endpoints + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Array<::Google::Cloud::Memorystore::V1::DiscoveryEndpoint>] + # Output only. Deprecated: The discovery_endpoints parameter is deprecated. + # As a result, it will not be populated if the connections are created using + # endpoints parameter. Instead of this parameter, for discovery, use + # endpoints.connections.pscConnection and + # endpoints.connections.pscAutoConnection + # with connectionType CONNECTION_TYPE_DISCOVERY. + # @!attribute [rw] node_type + # @return [::Google::Cloud::Memorystore::V1::Instance::NodeType] + # Optional. Machine type for individual nodes of the instance. + # @!attribute [rw] persistence_config + # @return [::Google::Cloud::Memorystore::V1::PersistenceConfig] + # Optional. Persistence configuration of the instance. + # @!attribute [rw] engine_version + # @return [::String] + # Optional. Engine version of the instance. + # @!attribute [rw] engine_configs + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-provided engine configurations for the instance. + # @!attribute [r] node_config + # @return [::Google::Cloud::Memorystore::V1::NodeConfig] + # Output only. Configuration of individual nodes of the instance. + # @!attribute [rw] zone_distribution_config + # @return [::Google::Cloud::Memorystore::V1::ZoneDistributionConfig] + # Optional. Immutable. Zone distribution configuration of the instance for + # node allocation. + # @!attribute [rw] deletion_protection_enabled + # @return [::Boolean] + # Optional. If set to true deletion of the instance will fail. + # @!attribute [rw] psc_auto_connections + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Array<::Google::Cloud::Memorystore::V1::PscAutoConnection>] + # Optional. Immutable. Deprecated: Use the + # endpoints.connections.psc_auto_connection value instead. + # @!attribute [r] psc_attachment_details + # @return [::Array<::Google::Cloud::Memorystore::V1::PscAttachmentDetail>] + # Output only. Service attachment details to configure PSC connections. + # @!attribute [rw] endpoints + # @return [::Array<::Google::Cloud::Memorystore::V1::Instance::InstanceEndpoint>] + # Optional. Endpoints for the instance. + # @!attribute [rw] mode + # @return [::Google::Cloud::Memorystore::V1::Instance::Mode] + # Optional. The mode config for the instance. + # @!attribute [rw] simulate_maintenance_event + # @return [::Boolean] + # Optional. Input only. Simulate a maintenance event. + # @!attribute [rw] ondemand_maintenance + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Optional. Input only. Ondemand maintenance for the instance. + # @!attribute [r] satisfies_pzs + # @return [::Boolean] + # Optional. Output only. Reserved for future use. + # @!attribute [r] satisfies_pzi + # @return [::Boolean] + # Optional. Output only. Reserved for future use. + # @!attribute [rw] maintenance_policy + # @return [::Google::Cloud::Memorystore::V1::MaintenancePolicy] + # Optional. The maintenance policy for the instance. If not provided, + # the maintenance event will be performed based on Memorystore + # internal rollout schedule. + # @!attribute [r] maintenance_schedule + # @return [::Google::Cloud::Memorystore::V1::MaintenanceSchedule] + # Output only. Published maintenance schedule. + # @!attribute [rw] cross_instance_replication_config + # @return [::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig] + # Optional. The config for cross instance replication. + # @!attribute [rw] async_instance_endpoints_deletion_enabled + # @return [::Boolean] + # Optional. If true, instance endpoints that are created and registered by + # customers can be deleted asynchronously. That is, such an instance endpoint + # can be de-registered before the forwarding rules in the instance endpoint + # are deleted. + # @!attribute [rw] kms_key + # @return [::String] + # Optional. The KMS key used to encrypt the at-rest data of the cluster. + # @!attribute [r] encryption_info + # @return [::Google::Cloud::Memorystore::V1::EncryptionInfo] + # Output only. Encryption information of the data at rest of the cluster. + # @!attribute [r] backup_collection + # @return [::String] + # Output only. The backup collection full resource name. Example: + # projects/\\{project}/locations/\\{location}/backupCollections/\\{collection} + # @!attribute [rw] automated_backup_config + # @return [::Google::Cloud::Memorystore::V1::AutomatedBackupConfig] + # Optional. The automated backup config for the instance. + # @!attribute [rw] maintenance_version + # @return [::String] + # Optional. This field can be used to trigger self service update to indicate + # the desired maintenance version. The input to this field can be determined + # by the available_maintenance_versions field. + # @!attribute [r] effective_maintenance_version + # @return [::String] + # Output only. This field represents the actual maintenance version of the + # instance. + # @!attribute [r] available_maintenance_versions + # @return [::Array<::String>] + # Output only. This field is used to determine the available maintenance + # versions for the self service update. + # @!attribute [rw] allow_fewer_zones_deployment + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Optional. Immutable. Deprecated, do not use. + # @!attribute [rw] server_ca_mode + # @return [::Google::Cloud::Memorystore::V1::Instance::ServerCaMode] + # Optional. Immutable. The Server CA mode for the instance. + # @!attribute [rw] server_ca_pool + # @return [::String] + # Optional. Immutable. The customer-managed CA pool for the instance. Only + # applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format: + # "projects/\\{project}/locations/\\{region}/caPools/\\{ca_pool}". + # @!attribute [rw] rotate_server_certificate + # @return [::Boolean] + # Optional. Input only. Rotate the server certificates. + class Instance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Additional information about the state of the instance. + # @!attribute [r] update_info + # @return [::Google::Cloud::Memorystore::V1::Instance::StateInfo::UpdateInfo] + # Output only. Describes ongoing update when instance state is UPDATING. + class StateInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents information about instance with state UPDATING. + # @!attribute [r] target_shard_count + # @return [::Integer] + # Output only. Target number of shards for the instance. + # @!attribute [r] target_replica_count + # @return [::Integer] + # Output only. Target number of replica nodes per shard for the instance. + # @!attribute [r] target_engine_version + # @return [::String] + # Output only. Target engine version for the instance. + # @!attribute [r] target_node_type + # @return [::Google::Cloud::Memorystore::V1::Instance::NodeType] + # Output only. Target node type for the instance. + class UpdateInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Backups that stored in Cloud Storage buckets. + # The Cloud Storage buckets need to be the same region as the instances. + # @!attribute [rw] uris + # @return [::Array<::String>] + # Optional. Example: gs://bucket1/object1, gs://bucket2/folder2/object2 + class GcsBackupSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Backups that generated and managed by memorystore. + # @!attribute [rw] backup + # @return [::String] + # Optional. Example: + # //memorystore.googleapis.com/projects/\\{project}/locations/\\{location}/backupCollections/\\{collection}/backups/\\{backup} + # A shorter version (without the prefix) of the backup name is also + # supported, like + # projects/\\{project}/locations/\\{location}/backupCollections/\\{collection}/backups/\\{backup_id} + # In this case, it assumes the backup is under memorystore.googleapis.com. + class ManagedBackupSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # InstanceEndpoint consists of PSC connections that are created + # as a group in each VPC network for accessing the instance. In each group, + # there shall be one connection for each service attachment in the cluster. + # @!attribute [rw] connections + # @return [::Array<::Google::Cloud::Memorystore::V1::Instance::ConnectionDetail>] + # Optional. A group of PSC connections. They are created in the same VPC + # network, one for each service attachment in the cluster. + class InstanceEndpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information of each PSC connection. + # @!attribute [rw] psc_auto_connection + # @return [::Google::Cloud::Memorystore::V1::PscAutoConnection] + # Immutable. Detailed information of a PSC connection that is created + # through service connectivity automation. + # + # Note: The following fields are mutually exclusive: `psc_auto_connection`, `psc_connection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] psc_connection + # @return [::Google::Cloud::Memorystore::V1::PscConnection] + # Detailed information of a PSC connection that is created by the user. + # + # Note: The following fields are mutually exclusive: `psc_connection`, `psc_auto_connection`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ConnectionDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!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 EngineConfigsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible states of the instance. + module State + # Not set. + STATE_UNSPECIFIED = 0 + + # Instance is being created. + CREATING = 1 + + # Instance has been created and is usable. + ACTIVE = 2 + + # Instance is being updated. + UPDATING = 3 + + # Instance is being deleted. + DELETING = 4 + end + + # Possible authorization modes of the instance. + module AuthorizationMode + # Not set. + AUTHORIZATION_MODE_UNSPECIFIED = 0 + + # Authorization disabled. + AUTH_DISABLED = 1 + + # IAM basic authorization. + IAM_AUTH = 2 + end + + # Possible in-transit encryption modes of the instance. + module TransitEncryptionMode + # Not set. + TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0 + + # In-transit encryption is disabled. + TRANSIT_ENCRYPTION_DISABLED = 1 + + # Server-managed encryption is used for in-transit encryption. + SERVER_AUTHENTICATION = 2 + end + + # Possible node types of the instance. See + # https://cloud.google.com/memorystore/docs/valkey/instance-node-specification + # for more information. + module NodeType + # Not set. + NODE_TYPE_UNSPECIFIED = 0 + + # Shared core nano. + SHARED_CORE_NANO = 1 + + # High memory medium. + HIGHMEM_MEDIUM = 2 + + # High memory extra large. + HIGHMEM_XLARGE = 3 + + # Standard small. + STANDARD_SMALL = 4 + end + + # The mode config, which is used to enable/disable cluster mode. + module Mode + # Mode is not specified. + MODE_UNSPECIFIED = 0 + + # Deprecated: Use CLUSTER_DISABLED instead. + STANDALONE = 1 + + # Instance is in cluster mode. + CLUSTER = 2 + + # Cluster mode is disabled for the instance. + CLUSTER_DISABLED = 4 + end + + # The Server CA mode for the instance. + module ServerCaMode + # Server CA mode not specified. + SERVER_CA_MODE_UNSPECIFIED = 0 + + # Each instance has its own Google-managed CA. + GOOGLE_MANAGED_PER_INSTANCE_CA = 1 + + # The instance uses a Google-managed shared CA for the instance's region. + GOOGLE_MANAGED_SHARED_CA = 2 + + # The instance uses a customer-managed CA from CAS. + CUSTOMER_MANAGED_CAS_CA = 3 + + # Deprecated: Use GOOGLE_MANAGED_PER_INSTANCE_CA instead. + SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA = 1 + + # Deprecated: Use GOOGLE_MANAGED_SHARED_CA instead. + SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA = 2 + + # Deprecated: Use CUSTOMER_MANAGED_CAS_CA instead. + SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA = 3 + end + end + + # The automated backup config for an instance. + # @!attribute [rw] fixed_frequency_schedule + # @return [::Google::Cloud::Memorystore::V1::AutomatedBackupConfig::FixedFrequencySchedule] + # Optional. Trigger automated backups at a fixed frequency. + # @!attribute [rw] automated_backup_mode + # @return [::Google::Cloud::Memorystore::V1::AutomatedBackupConfig::AutomatedBackupMode] + # Optional. The automated backup mode. If the mode is disabled, the other + # fields will be ignored. + # @!attribute [rw] retention + # @return [::Google::Protobuf::Duration] + # Optional. How long to keep automated backups before the backups are + # deleted. The value should be between 1 day and 365 days. If not specified, + # the default value is 35 days. + class AutomatedBackupConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This schedule allows the backup to be triggered at a fixed frequency + # (currently only daily is supported). + # @!attribute [rw] start_time + # @return [::Google::Type::TimeOfDay] + # Required. The start time of every automated backup in UTC. It must be set + # to the start of an hour. This field is required. + class FixedFrequencySchedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The automated backup mode. + module AutomatedBackupMode + # Default value. Automated backup config is not specified. + AUTOMATED_BACKUP_MODE_UNSPECIFIED = 0 + + # Automated backup config disabled. + DISABLED = 1 + + # Automated backup config enabled. + ENABLED = 2 + end + end + + # BackupCollection of an instance. + # @!attribute [rw] name + # @return [::String] + # Identifier. Full resource path of the backup collection. + # @!attribute [r] instance_uid + # @return [::String] + # Output only. The instance uid of the backup collection. + # @!attribute [r] instance + # @return [::String] + # Output only. The full resource path of the instance the backup collection + # belongs to. Example: + # projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [r] kms_key + # @return [::String] + # Output only. The KMS key used to encrypt the backups under this backup + # collection. + # @!attribute [r] uid + # @return [::String] + # Output only. System assigned unique identifier of the backup collection. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the backup collection was created. + # @!attribute [r] total_backup_size_bytes + # @return [::Integer] + # Output only. Total size of all backups in the backup collection. + # @!attribute [r] total_backup_count + # @return [::Integer] + # Output only. Total number of backups in the backup collection. + # @!attribute [r] last_backup_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last time a backup was created in the backup collection. + class BackupCollection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Backup of an instance. + # @!attribute [rw] name + # @return [::String] + # Identifier. Full resource path of the backup. the last part of the name is + # the backup id with the following format: [YYYYMMDDHHMMSS]_[Shorted Instance + # UID] OR customer specified while backup instance. Example: + # 20240515123000_1234 + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the backup was created. + # @!attribute [r] instance + # @return [::String] + # Output only. Instance resource path of this backup. + # @!attribute [r] instance_uid + # @return [::String] + # Output only. Instance uid of this backup. + # @!attribute [r] total_size_bytes + # @return [::Integer] + # Output only. Total size of the backup in bytes. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the backup will expire. + # @!attribute [r] engine_version + # @return [::String] + # Output only. valkey-7.5/valkey-8.0, etc. + # @!attribute [r] backup_files + # @return [::Array<::Google::Cloud::Memorystore::V1::BackupFile>] + # Output only. List of backup files of the backup. + # @!attribute [r] node_type + # @return [::Google::Cloud::Memorystore::V1::Instance::NodeType] + # Output only. Node type of the instance. + # @!attribute [r] replica_count + # @return [::Integer] + # Output only. Number of replicas for the instance. + # @!attribute [r] shard_count + # @return [::Integer] + # Output only. Number of shards for the instance. + # @!attribute [r] backup_type + # @return [::Google::Cloud::Memorystore::V1::Backup::BackupType] + # Output only. Type of the backup. + # @!attribute [r] state + # @return [::Google::Cloud::Memorystore::V1::Backup::State] + # Output only. State of the backup. + # @!attribute [r] encryption_info + # @return [::Google::Cloud::Memorystore::V1::EncryptionInfo] + # Output only. Encryption information of the backup. + # @!attribute [r] uid + # @return [::String] + # Output only. System assigned unique identifier of the backup. + class Backup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of the backup. + module BackupType + # The default value, not set. + BACKUP_TYPE_UNSPECIFIED = 0 + + # On-demand backup. + ON_DEMAND = 1 + + # Automated backup. + AUTOMATED = 2 + end + + # State of the backup. + module State + # The default value, not set. + STATE_UNSPECIFIED = 0 + + # The backup is being created. + CREATING = 1 + + # The backup is active to be used. + ACTIVE = 2 + + # The backup is being deleted. + DELETING = 3 + + # The backup is currently suspended due to reasons like project deletion, + # billing account closure, etc. + SUSPENDED = 4 + end + end + + # Backup is consisted of multiple backup files. + # @!attribute [r] file_name + # @return [::String] + # Output only. e.g: .rdb + # @!attribute [r] size_bytes + # @return [::Integer] + # Output only. Size of the backup file in bytes. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the backup file was created. + class BackupFile + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Cross instance replication config. + # @!attribute [rw] instance_role + # @return [::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::InstanceRole] + # Required. The role of the instance in cross instance replication. + # @!attribute [rw] primary_instance + # @return [::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::RemoteInstance] + # Optional. Details of the primary instance that is used as the replication + # source for this secondary instance. + # + # This field is only set for a secondary instance. + # @!attribute [rw] secondary_instances + # @return [::Array<::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::RemoteInstance>] + # Optional. List of secondary instances that are replicating from this + # primary instance. + # + # This field is only set for a primary instance. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last time cross instance replication config was updated. + # @!attribute [r] membership + # @return [::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::Membership] + # Output only. An output only view of all the member instances participating + # in the cross instance replication. This view will be provided by every + # member instance irrespective of its instance role(primary or secondary). + # + # A primary instance can provide information about all the secondary + # instances replicating from it. However, a secondary instance only knows + # about the primary instance from which it is replicating. However, for + # scenarios, where the primary instance is unavailable(e.g. regional outage), + # a Getinstance request can be sent to any other member instance and this + # field will list all the member instances participating in cross instance + # replication. + class CrossInstanceReplicationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Details of the remote instance associated with this instance in a cross + # instance replication setup. + # @!attribute [rw] instance + # @return [::String] + # Optional. The full resource path of the remote instance in + # the format: projects//locations//instances/ + # @!attribute [r] uid + # @return [::String] + # Output only. The unique identifier of the remote instance. + class RemoteInstance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An output only view of all the member instances participating in the cross + # instance replication. + # @!attribute [r] primary_instance + # @return [::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::RemoteInstance] + # Output only. The primary instance that acts as the source of replication + # for the secondary instances. + # @!attribute [r] secondary_instances + # @return [::Array<::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::RemoteInstance>] + # Output only. The list of secondary instances replicating from the primary + # instance. + class Membership + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The role of the instance in cross instance replication. + module InstanceRole + # instance role is not set. + # The behavior is equivalent to NONE. + INSTANCE_ROLE_UNSPECIFIED = 0 + + # This instance does not participate in cross instance replication. It is + # an independent instance and does not replicate to or from any other + # instances. + NONE = 1 + + # A instance that allows both reads and writes. Any data written to this + # instance is also replicated to the attached secondary instances. + PRIMARY = 2 + + # A instance that allows only reads and replicates data from a primary + # instance. + SECONDARY = 3 + end + end + + # Maintenance policy per instance. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the policy was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the policy was updated. + # @!attribute [rw] weekly_maintenance_window + # @return [::Array<::Google::Cloud::Memorystore::V1::WeeklyMaintenanceWindow>] + # Optional. Maintenance window that is applied to resources covered by this + # policy. Minimum 1. For the current version, the maximum number of + # weekly_window is expected to be one. + class MaintenancePolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Time window specified for weekly operations. + # @!attribute [rw] day + # @return [::Google::Type::DayOfWeek] + # Optional. Allows to define schedule that runs specified day of the week. + # @!attribute [rw] start_time + # @return [::Google::Type::TimeOfDay] + # Optional. Start time of the window in UTC. + class WeeklyMaintenanceWindow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Upcoming maintenance schedule. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The start time of any upcoming scheduled maintenance for this + # instance. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The end time of any upcoming scheduled maintenance for this + # instance. + class MaintenanceSchedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration of a service attachment of the cluster, for creating PSC + # connections. + # @!attribute [r] service_attachment + # @return [::String] + # Output only. Service attachment URI which your self-created PscConnection + # should use as target. + # @!attribute [r] connection_type + # @return [::Google::Cloud::Memorystore::V1::ConnectionType] + # Output only. Type of Psc endpoint. + class PscAttachmentDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details of consumer resources in a PSC connection. + # @!attribute [rw] port + # @return [::Integer] + # Optional. port will only be set for Primary/Reader or Discovery endpoint. + # @!attribute [r] psc_connection_id + # @return [::String] + # Output only. The PSC connection id of the forwarding rule connected to the + # service attachment. + # @!attribute [r] ip_address + # @return [::String] + # Output only. The IP allocated on the consumer network for the PSC + # forwarding rule. + # @!attribute [r] forwarding_rule + # @return [::String] + # Output only. The URI of the consumer side forwarding rule. + # Format: + # projects/\\{project}/regions/\\{region}/forwardingRules/\\{forwarding_rule} + # @!attribute [rw] project_id + # @return [::String] + # Required. The consumer project_id where PSC connections are established. + # This should be the same project_id that the instance is being created in. + # @!attribute [rw] network + # @return [::String] + # Required. The network where the PSC endpoints are created, in the form of + # projects/\\{project_id}/global/networks/\\{network_id}. + # @!attribute [r] service_attachment + # @return [::String] + # Output only. The service attachment which is the target of the PSC + # connection, in the form of + # projects/\\{project-id}/regions/\\{region}/serviceAttachments/\\{service-attachment-id}. + # @!attribute [r] psc_connection_status + # @return [::Google::Cloud::Memorystore::V1::PscConnectionStatus] + # Output only. The status of the PSC connection: whether a connection exists + # and ACTIVE or it no longer exists. Please note that this value is updated + # periodically. Please use Private Service Connect APIs for the latest + # status. + # @!attribute [r] connection_type + # @return [::Google::Cloud::Memorystore::V1::ConnectionType] + # Output only. Type of the PSC connection. + class PscAutoConnection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # User created Psc connection configuration. + # @!attribute [rw] port + # @return [::Integer] + # Optional. port will only be set for Primary/Reader or Discovery endpoint. + # @!attribute [rw] psc_connection_id + # @return [::String] + # Required. The PSC connection id of the forwarding rule connected to the + # service attachment. + # @!attribute [rw] ip_address + # @return [::String] + # Required. The IP allocated on the consumer network for the PSC forwarding + # rule. + # @!attribute [rw] forwarding_rule + # @return [::String] + # Required. The URI of the consumer side forwarding rule. + # Format: + # projects/\\{project}/regions/\\{region}/forwardingRules/\\{forwarding_rule} + # @!attribute [r] project_id + # @return [::String] + # Output only. The consumer project_id where the forwarding rule is created + # from. + # @!attribute [rw] network + # @return [::String] + # Required. The consumer network where the IP address resides, in the form of + # projects/\\{project_id}/global/networks/\\{network_id}. + # @!attribute [rw] service_attachment + # @return [::String] + # Required. The service attachment which is the target of the PSC connection, + # in the form of + # projects/\\{project-id}/regions/\\{region}/serviceAttachments/\\{service-attachment-id}. + # @!attribute [r] psc_connection_status + # @return [::Google::Cloud::Memorystore::V1::PscConnectionStatus] + # Output only. The status of the PSC connection: whether a connection exists + # and ACTIVE or it no longer exists. Please note that this value is updated + # periodically. Please use Private Service Connect APIs for the latest + # status. + # @!attribute [r] connection_type + # @return [::Google::Cloud::Memorystore::V1::ConnectionType] + # Output only. Type of the PSC connection. + class PscConnection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents an endpoint for clients to connect to the instance. + # @!attribute [r] address + # @return [::String] + # Output only. IP address of the exposed endpoint clients connect to. + # @!attribute [r] port + # @return [::Integer] + # Output only. The port number of the exposed endpoint. + # @!attribute [r] network + # @return [::String] + # Output only. The network where the IP address of the discovery endpoint + # will be reserved, in the form of + # projects/\\{network_project}/global/networks/\\{network_id}. + class DiscoveryEndpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents persistence configuration for a instance. + # @!attribute [rw] mode + # @return [::Google::Cloud::Memorystore::V1::PersistenceConfig::PersistenceMode] + # Optional. Current persistence mode. + # @!attribute [rw] rdb_config + # @return [::Google::Cloud::Memorystore::V1::PersistenceConfig::RDBConfig] + # Optional. RDB configuration. This field will be ignored if mode is not RDB. + # @!attribute [rw] aof_config + # @return [::Google::Cloud::Memorystore::V1::PersistenceConfig::AOFConfig] + # Optional. AOF configuration. This field will be ignored if mode is not AOF. + class PersistenceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for RDB based persistence. + # @!attribute [rw] rdb_snapshot_period + # @return [::Google::Cloud::Memorystore::V1::PersistenceConfig::RDBConfig::SnapshotPeriod] + # Optional. Period between RDB snapshots. + # @!attribute [rw] rdb_snapshot_start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Time that the first snapshot was/will be attempted, and to + # which future snapshots will be aligned. If not provided, the current time + # will be used. + class RDBConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible snapshot periods. + module SnapshotPeriod + # Not set. + SNAPSHOT_PERIOD_UNSPECIFIED = 0 + + # One hour. + ONE_HOUR = 1 + + # Six hours. + SIX_HOURS = 2 + + # Twelve hours. + TWELVE_HOURS = 3 + + # Twenty four hours. + TWENTY_FOUR_HOURS = 4 + end + end + + # Configuration for AOF based persistence. + # @!attribute [rw] append_fsync + # @return [::Google::Cloud::Memorystore::V1::PersistenceConfig::AOFConfig::AppendFsync] + # Optional. The fsync mode. + class AOFConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible fsync modes. + module AppendFsync + # Not set. Default: EVERY_SEC + APPEND_FSYNC_UNSPECIFIED = 0 + + # Never fsync. Normally Linux will flush data every 30 seconds with this + # configuration, but it's up to the kernel's exact tuning. + NEVER = 1 + + # Fsync every second. You may lose 1 second of data if there is a + # disaster. + EVERY_SEC = 2 + + # Fsync every time new write commands are appended to the AOF. The best + # data loss protection at the cost of performance. + ALWAYS = 3 + end + end + + # Possible persistence modes. + module PersistenceMode + # Not set. + PERSISTENCE_MODE_UNSPECIFIED = 0 + + # Persistence is disabled, and any snapshot data is deleted. + DISABLED = 1 + + # RDB based persistence is enabled. + RDB = 2 + + # AOF based persistence is enabled. + AOF = 3 + end + end + + # Represents configuration for nodes of the instance. + # @!attribute [r] size_gb + # @return [::Float] + # Output only. Memory size in GB of the node. + class NodeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Zone distribution configuration for allocation of instance resources. + # @!attribute [rw] zone + # @return [::String] + # Optional. Defines zone where all resources will be allocated with + # SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. + # @!attribute [rw] mode + # @return [::Google::Cloud::Memorystore::V1::ZoneDistributionConfig::ZoneDistributionMode] + # Optional. Current zone distribution mode. Defaults to MULTI_ZONE. + class ZoneDistributionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible zone distribution modes. + module ZoneDistributionMode + # Not Set. Default: MULTI_ZONE + ZONE_DISTRIBUTION_MODE_UNSPECIFIED = 0 + + # Distribute resources across 3 zones picked at random within the + # region. + MULTI_ZONE = 1 + + # Provision resources in a single zone. Zone field must be specified. + SINGLE_ZONE = 2 + end + end + + # Request for rescheduling instance maintenance. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the instance to reschedule maintenance for: + # `projects/{project}/locations/{location_id}/instances/{instance}` + # @!attribute [rw] reschedule_type + # @return [::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest::RescheduleType] + # Required. If reschedule type is SPECIFIC_TIME, schedule_time must be set. + # @!attribute [rw] schedule_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Timestamp when the maintenance shall be rescheduled to if + # reschedule_type=SPECIFIC_TIME, in RFC 3339 format. + # Example: `2012-11-15T16:19:00.094Z`. + class RescheduleMaintenanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reschedule options. + module RescheduleType + # Not set. + RESCHEDULE_TYPE_UNSPECIFIED = 0 + + # If the user wants to schedule the maintenance to happen now. + IMMEDIATE = 1 + + # If the user wants to reschedule the maintenance to a specific time. + SPECIFIC_TIME = 3 + end + end + + # Request message for [ListInstances][]. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent to list instances from. + # Format: projects/\\{project}/locations/\\{location} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Expression for filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Sort results by a defined order. Supported values: "name", + # "create_time". + class ListInstancesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for [ListInstances][]. + # @!attribute [rw] instances + # @return [::Array<::Google::Cloud::Memorystore::V1::Instance>] + # If the \\{location} requested was "-" the response contains a list of + # instances from all locations. Instances in unreachable locations will be + # omitted. + # @!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. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListInstancesResponse + 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/\\{project}/locations/\\{location}/instances/\\{instance} + class GetInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [CreateInstance][]. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this instance will be created. + # Format: projects/\\{project}/locations/\\{location} + # @!attribute [rw] instance_id + # @return [::String] + # Required. The ID to use for the instance, which will become the final + # component of the instance's resource name. + # + # This value is subject to the following restrictions: + # + # * Must be 4-63 characters in length + # * Must begin with a letter or digit + # * Must contain only lowercase letters, digits, and hyphens + # * Must not end with a hyphen + # * Must be unique within a location + # @!attribute [rw] instance + # @return [::Google::Cloud::Memorystore::V1::Instance] + # Required. The instance to create. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [UpdateInstance][]. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to be updated on the instance. At least one + # field must be specified. + # @!attribute [rw] instance + # @return [::Google::Cloud::Memorystore::V1::Instance] + # Required. The instance to update. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateInstanceRequest + 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/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for [ListBackupCollections] + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the backupCollection location using the + # form: + # `projects/{project_id}/locations/{location_id}` + # where `location_id` refers to a Google Cloud region. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of items to return. + # + # If not specified, a default value of 1000 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # {::Google::Cloud::Memorystore::V1::ListBackupCollectionsResponse#next_page_token `next_page_token`} + # to determine if there are more clusters left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The `next_page_token` value returned from a previous + # [ListBackupCollections] request, if any. + class ListBackupCollectionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for [ListBackupCollections]. + # @!attribute [rw] backup_collections + # @return [::Array<::Google::Cloud::Memorystore::V1::BackupCollection>] + # A list of backupCollections in the project. + # + # If the `location_id` in the parent field of the request is "-", all regions + # available to the project are queried, and the results aggregated. + # If in such an aggregated query a location is unavailable, a placeholder + # backupCollection entry is included in the response with the `name` field + # set to a value of the form + # `projects/{project_id}/locations/{location_id}/backupCollections/`- and the + # `status` field set to ERROR and `status_message` field set to "location not + # available for ListBackupCollections". + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListBackupCollectionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for [GetBackupCollection]. + # @!attribute [rw] name + # @return [::String] + # Required. Instance backupCollection resource name using the form: + # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` + # where `location_id` refers to a Google Cloud region. + class GetBackupCollectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for [ListBackups]. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the backupCollection using the form: + # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of items to return. + # + # If not specified, a default value of 1000 will be used by the service. + # Regardless of the page_size value, the response may include a partial list + # and a caller should only rely on response's + # {::Google::Cloud::Memorystore::V1::ListBackupsResponse#next_page_token `next_page_token`} + # to determine if there are more clusters left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The `next_page_token` value returned from a previous + # [ListBackupCollections] request, if any. + class ListBackupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for [ListBackups]. + # @!attribute [rw] backups + # @return [::Array<::Google::Cloud::Memorystore::V1::Backup>] + # A list of backups in the project. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Backups that could not be reached. + class ListBackupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for [GetBackup]. + # @!attribute [rw] name + # @return [::String] + # Required. Instance backup resource name using the form: + # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + class GetBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for [DeleteBackup]. + # @!attribute [rw] name + # @return [::String] + # Required. Instance backup resource name using the form: + # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + # @!attribute [rw] request_id + # @return [::String] + # Optional. Idempotent request UUID. + class DeleteBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for [ExportBackup]. + # @!attribute [rw] gcs_bucket + # @return [::String] + # Google Cloud Storage bucket, like "my-bucket". + # @!attribute [rw] name + # @return [::String] + # Required. Instance backup resource name using the form: + # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + class ExportBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for [BackupInstance]. + # @!attribute [rw] name + # @return [::String] + # Required. Instance resource name using the form: + # `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + # where `location_id` refers to a Google Cloud region. + # @!attribute [rw] ttl + # @return [::Google::Protobuf::Duration] + # Optional. TTL for the backup to expire. Value range is 1 day to 100 years. + # If not specified, the default value is 100 years. + # @!attribute [rw] backup_id + # @return [::String] + # Optional. The id of the backup to be created. If not specified, the + # default value ([YYYYMMDDHHMMSS]_[Shortened Instance UID] is used. + class BackupInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [GetCertificateAuthority][]. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the certificate authority. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/certificateAuthority + class GetCertificateAuthorityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A certificate authority for an instance. + # @!attribute [rw] managed_server_ca + # @return [::Google::Cloud::Memorystore::V1::CertificateAuthority::ManagedCertificateAuthority] + # A managed server certificate authority. + # @!attribute [rw] name + # @return [::String] + # Identifier. Unique name of the certificate authority. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance} + class CertificateAuthority + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A managed certificate authority. + # @!attribute [rw] ca_certs + # @return [::Array<::Google::Cloud::Memorystore::V1::CertificateAuthority::ManagedCertificateAuthority::CertChain>] + # PEM encoded CA certificate chains for managed server authentication. + class ManagedCertificateAuthority + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A certificate chain. + # @!attribute [rw] certificates + # @return [::Array<::String>] + # The certificates that form the CA chain in order of leaf to root. + class CertChain + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Shared regional certificate authority for an instance. + # @!attribute [rw] managed_server_ca + # @return [::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority::RegionalManagedCertificateAuthority] + # CA certificate chains for memorystore managed server authentication. + # @!attribute [rw] name + # @return [::String] + # Identifier. Unique name of the resource in this scope including project and + # location using the form: + # `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority` + class SharedRegionalCertificateAuthority + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # CA certificate chains for memorystore managed server authentication. + # @!attribute [rw] ca_certs + # @return [::Array<::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority::RegionalManagedCertificateAuthority::RegionalCertChain>] + # The PEM encoded CA certificate chains for memorystore managed + # server authentication + class RegionalManagedCertificateAuthority + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The certificates that form the CA chain, from leaf to root order. + # @!attribute [rw] certificates + # @return [::Array<::String>] + # The certificates that form the CA chain, from leaf to root order. + class RegionalCertChain + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Request for + # {::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_shared_regional_certificate_authority GetSharedRegionalCertificateAuthority}. + # @!attribute [rw] name + # @return [::String] + # Required. Regional certificate authority resource name using the form: + # `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority` + # where `location_id` refers to a Google Cloud region. + class GetSharedRegionalCertificateAuthorityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of a long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have been cancelled successfully + # have [Operation.error][] value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to + # `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # EncryptionInfo describes the encryption information of a cluster. + # @!attribute [r] encryption_type + # @return [::Google::Cloud::Memorystore::V1::EncryptionInfo::Type] + # Output only. Type of encryption. + # @!attribute [r] kms_key_versions + # @return [::Array<::String>] + # Output only. KMS key versions that are being used to protect the data + # at-rest. + # @!attribute [r] kms_key_primary_state + # @return [::Google::Cloud::Memorystore::V1::EncryptionInfo::KmsKeyState] + # Output only. The state of the primary version of the KMS key perceived by + # the system. This field is not populated in backups. + # @!attribute [r] last_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The most recent time when the encryption info was updated. + class EncryptionInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible encryption types. + module Type + # Encryption type not specified. Defaults to GOOGLE_DEFAULT_ENCRYPTION. + TYPE_UNSPECIFIED = 0 + + # The data is encrypted at rest with a key that is fully managed by Google. + # No key version will be populated. This is the default state. + GOOGLE_DEFAULT_ENCRYPTION = 1 + + # The data is encrypted at rest with a key that is managed by the customer. + # KMS key versions will be populated. + CUSTOMER_MANAGED_ENCRYPTION = 2 + end + + # The state of the KMS key perceived by the system. Refer to the public + # documentation for the impact of each state. + module KmsKeyState + # The default value. This value is unused. + KMS_KEY_STATE_UNSPECIFIED = 0 + + # The KMS key is enabled and correctly configured. + ENABLED = 1 + + # Permission denied on the KMS key. + PERMISSION_DENIED = 2 + + # The KMS key is disabled. + DISABLED = 3 + + # The KMS key is destroyed. + DESTROYED = 4 + + # The KMS key is scheduled to be destroyed. + DESTROY_SCHEDULED = 5 + + # The EKM key is unreachable. + EKM_KEY_UNREACHABLE_DETECTED = 6 + + # Billing is disabled for the project. + BILLING_DISABLED = 7 + + # All other unknown failures. + UNKNOWN_FAILURE = 8 + end + end + + # Status of the PSC connection. + module PscConnectionStatus + # PSC connection status is not specified. + PSC_CONNECTION_STATUS_UNSPECIFIED = 0 + + # The connection is active + ACTIVE = 1 + + # Connection not found + NOT_FOUND = 2 + end + + # Type of a PSC connection + module ConnectionType + # Connection Type is not set + CONNECTION_TYPE_UNSPECIFIED = 0 + + # Connection that will be used for topology discovery. + CONNECTION_TYPE_DISCOVERY = 1 + + # Connection that will be used as primary endpoint to access primary. + CONNECTION_TYPE_PRIMARY = 2 + + # Connection that will be used as reader endpoint to access replicas. + CONNECTION_TYPE_READER = 3 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# 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. +# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# 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. +# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# 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. +# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# 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. +# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# 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. +# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# 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. +# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# 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. +# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/type/dayofweek.rb new file mode 100644 index 000000000000..973211b9ffe7 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/type/dayofweek.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# 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. +# 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 day of the week. + module DayOfWeek + # The day of the week is unspecified. + DAY_OF_WEEK_UNSPECIFIED = 0 + + # Monday + MONDAY = 1 + + # Tuesday + TUESDAY = 2 + + # Wednesday + WEDNESDAY = 3 + + # Thursday + THURSDAY = 4 + + # Friday + FRIDAY = 5 + + # Saturday + SATURDAY = 6 + + # Sunday + SUNDAY = 7 + end + end +end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/type/timeofday.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/type/timeofday.rb new file mode 100644 index 000000000000..ae79b2f8dceb --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/type/timeofday.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# 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. +# 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 time of day. The date and time zone are either not significant + # or are specified elsewhere. An API may choose to allow leap seconds. Related + # types are [google.type.Date][google.type.Date] and + # `google.protobuf.Timestamp`. + # @!attribute [rw] hours + # @return [::Integer] + # Hours of a day in 24 hour format. Must be greater than or equal to 0 and + # typically must be less than or equal to 23. An API may choose to allow the + # value "24:00:00" for scenarios like business closing time. + # @!attribute [rw] minutes + # @return [::Integer] + # Minutes of an hour. Must be greater than or equal to 0 and less than or + # equal to 59. + # @!attribute [rw] seconds + # @return [::Integer] + # Seconds of a minute. Must be greater than or equal to 0 and typically must + # be less than or equal to 59. An API may allow the value 60 if it allows + # leap-seconds. + # @!attribute [rw] nanos + # @return [::Integer] + # Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 + # and less than or equal to 999,999,999. + class TimeOfDay + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-memorystore-v1/snippets/Gemfile new file mode 100644 index 000000000000..282b208b7d5d --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# 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. +# 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-memorystore-v1", path: "../" +else + gem "google-cloud-memorystore-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/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/backup_instance.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/backup_instance.rb new file mode 100644 index 000000000000..002dcdca0964 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/backup_instance.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. +# 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 memorystore_v1_generated_Memorystore_BackupInstance_sync] +require "google/cloud/memorystore/v1" + +## +# Snippet for the backup_instance call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#backup_instance. +# +def backup_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Memorystore::V1::BackupInstanceRequest.new + + # Call the backup_instance method. + result = client.backup_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 memorystore_v1_generated_Memorystore_BackupInstance_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/create_instance.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/create_instance.rb new file mode 100644 index 000000000000..17b43719c9bf --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/create_instance.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. +# 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 memorystore_v1_generated_Memorystore_CreateInstance_sync] +require "google/cloud/memorystore/v1" + +## +# Snippet for the create_instance call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#create_instance. +# +def create_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Memorystore::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 memorystore_v1_generated_Memorystore_CreateInstance_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/delete_backup.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/delete_backup.rb new file mode 100644 index 000000000000..dc03d50e11b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/delete_backup.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. +# 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 memorystore_v1_generated_Memorystore_DeleteBackup_sync] +require "google/cloud/memorystore/v1" + +## +# Snippet for the delete_backup call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#delete_backup. +# +def delete_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Memorystore::V1::DeleteBackupRequest.new + + # Call the delete_backup method. + result = client.delete_backup 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 memorystore_v1_generated_Memorystore_DeleteBackup_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/delete_instance.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/delete_instance.rb new file mode 100644 index 000000000000..1052bdd92304 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/delete_instance.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. +# 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 memorystore_v1_generated_Memorystore_DeleteInstance_sync] +require "google/cloud/memorystore/v1" + +## +# Snippet for the delete_instance call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#delete_instance. +# +def delete_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Memorystore::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 memorystore_v1_generated_Memorystore_DeleteInstance_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/export_backup.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/export_backup.rb new file mode 100644 index 000000000000..3a5c9f06865f --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/export_backup.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. +# 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 memorystore_v1_generated_Memorystore_ExportBackup_sync] +require "google/cloud/memorystore/v1" + +## +# Snippet for the export_backup call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#export_backup. +# +def export_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Memorystore::V1::ExportBackupRequest.new + + # Call the export_backup method. + result = client.export_backup 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 memorystore_v1_generated_Memorystore_ExportBackup_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_backup.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_backup.rb new file mode 100644 index 000000000000..dbda32b2923b --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_backup.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. +# 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 memorystore_v1_generated_Memorystore_GetBackup_sync] +require "google/cloud/memorystore/v1" + +## +# Snippet for the get_backup call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#get_backup. +# +def get_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Memorystore::V1::GetBackupRequest.new + + # Call the get_backup method. + result = client.get_backup request + + # The returned object is of type Google::Cloud::Memorystore::V1::Backup. + p result +end +# [END memorystore_v1_generated_Memorystore_GetBackup_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_backup_collection.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_backup_collection.rb new file mode 100644 index 000000000000..4812db149495 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_backup_collection.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. +# 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 memorystore_v1_generated_Memorystore_GetBackupCollection_sync] +require "google/cloud/memorystore/v1" + +## +# Snippet for the get_backup_collection call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#get_backup_collection. +# +def get_backup_collection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Memorystore::V1::GetBackupCollectionRequest.new + + # Call the get_backup_collection method. + result = client.get_backup_collection request + + # The returned object is of type Google::Cloud::Memorystore::V1::BackupCollection. + p result +end +# [END memorystore_v1_generated_Memorystore_GetBackupCollection_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_certificate_authority.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_certificate_authority.rb new file mode 100644 index 000000000000..c47aa4b96b27 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_certificate_authority.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. +# 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 memorystore_v1_generated_Memorystore_GetCertificateAuthority_sync] +require "google/cloud/memorystore/v1" + +## +# Snippet for the get_certificate_authority call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#get_certificate_authority. +# +def get_certificate_authority + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest.new + + # Call the get_certificate_authority method. + result = client.get_certificate_authority request + + # The returned object is of type Google::Cloud::Memorystore::V1::CertificateAuthority. + p result +end +# [END memorystore_v1_generated_Memorystore_GetCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_instance.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_instance.rb new file mode 100644 index 000000000000..08fbd9772957 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_instance.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. +# 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 memorystore_v1_generated_Memorystore_GetInstance_sync] +require "google/cloud/memorystore/v1" + +## +# Snippet for the get_instance call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#get_instance. +# +def get_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Memorystore::V1::GetInstanceRequest.new + + # Call the get_instance method. + result = client.get_instance request + + # The returned object is of type Google::Cloud::Memorystore::V1::Instance. + p result +end +# [END memorystore_v1_generated_Memorystore_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_shared_regional_certificate_authority.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_shared_regional_certificate_authority.rb new file mode 100644 index 000000000000..12874c3e2d45 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_shared_regional_certificate_authority.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# 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. +# 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 memorystore_v1_generated_Memorystore_GetSharedRegionalCertificateAuthority_sync] +require "google/cloud/memorystore/v1" + +## +# Snippet for the get_shared_regional_certificate_authority call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#get_shared_regional_certificate_authority. +# +def get_shared_regional_certificate_authority + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest.new + + # Call the get_shared_regional_certificate_authority method. + result = client.get_shared_regional_certificate_authority request + + # The returned object is of type Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority. + p result +end +# [END memorystore_v1_generated_Memorystore_GetSharedRegionalCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_backup_collections.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_backup_collections.rb new file mode 100644 index 000000000000..712abdc1a736 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_backup_collections.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# 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. +# 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 memorystore_v1_generated_Memorystore_ListBackupCollections_sync] +require "google/cloud/memorystore/v1" + +## +# Snippet for the list_backup_collections call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#list_backup_collections. +# +def list_backup_collections + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest.new + + # Call the list_backup_collections method. + result = client.list_backup_collections 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::Memorystore::V1::BackupCollection. + p item + end +end +# [END memorystore_v1_generated_Memorystore_ListBackupCollections_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_backups.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_backups.rb new file mode 100644 index 000000000000..7ae884d1556d --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_backups.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# 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. +# 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 memorystore_v1_generated_Memorystore_ListBackups_sync] +require "google/cloud/memorystore/v1" + +## +# Snippet for the list_backups call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#list_backups. +# +def list_backups + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Memorystore::V1::ListBackupsRequest.new + + # Call the list_backups method. + result = client.list_backups 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::Memorystore::V1::Backup. + p item + end +end +# [END memorystore_v1_generated_Memorystore_ListBackups_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_instances.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_instances.rb new file mode 100644 index 000000000000..3a79bca62e22 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_instances.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# 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. +# 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 memorystore_v1_generated_Memorystore_ListInstances_sync] +require "google/cloud/memorystore/v1" + +## +# Snippet for the list_instances call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#list_instances. +# +def list_instances + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Memorystore::V1::ListInstancesRequest.new + + # Call the list_instances method. + result = client.list_instances 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::Memorystore::V1::Instance. + p item + end +end +# [END memorystore_v1_generated_Memorystore_ListInstances_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/reschedule_maintenance.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/reschedule_maintenance.rb new file mode 100644 index 000000000000..37b016462398 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/reschedule_maintenance.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. +# 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 memorystore_v1_generated_Memorystore_RescheduleMaintenance_sync] +require "google/cloud/memorystore/v1" + +## +# Snippet for the reschedule_maintenance call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#reschedule_maintenance. +# +def reschedule_maintenance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest.new + + # Call the reschedule_maintenance method. + result = client.reschedule_maintenance 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 memorystore_v1_generated_Memorystore_RescheduleMaintenance_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/update_instance.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/update_instance.rb new file mode 100644 index 000000000000..a99c67ac08ca --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/update_instance.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# 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. +# 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 memorystore_v1_generated_Memorystore_UpdateInstance_sync] +require "google/cloud/memorystore/v1" + +## +# Snippet for the update_instance call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#update_instance. +# +def update_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Memorystore::V1::UpdateInstanceRequest.new + + # Call the update_instance method. + result = client.update_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 memorystore_v1_generated_Memorystore_UpdateInstance_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/snippet_metadata_google.cloud.memorystore.v1.json b/owl-bot-staging/google-cloud-memorystore-v1/snippets/snippet_metadata_google.cloud.memorystore.v1.json new file mode 100644 index 000000000000..fdc5f1c5a627 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/snippets/snippet_metadata_google.cloud.memorystore.v1.json @@ -0,0 +1,615 @@ +{ + "client_library": { + "name": "google-cloud-memorystore-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.memorystore.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "memorystore_v1_generated_Memorystore_ListInstances_sync", + "title": "Snippet for the list_instances call in the Memorystore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#list_instances.", + "file": "memorystore/list_instances.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_instances", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#list_instances", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Memorystore::V1::ListInstancesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Memorystore::V1::ListInstancesResponse", + "client": { + "short_name": "Memorystore::Rest::Client", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" + }, + "method": { + "short_name": "ListInstances", + "full_name": "google.cloud.memorystore.v1.Memorystore.ListInstances", + "service": { + "short_name": "Memorystore", + "full_name": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "memorystore_v1_generated_Memorystore_GetInstance_sync", + "title": "Snippet for the get_instance call in the Memorystore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_instance.", + "file": "memorystore/get_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_instance", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Memorystore::V1::GetInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Memorystore::V1::Instance", + "client": { + "short_name": "Memorystore::Rest::Client", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" + }, + "method": { + "short_name": "GetInstance", + "full_name": "google.cloud.memorystore.v1.Memorystore.GetInstance", + "service": { + "short_name": "Memorystore", + "full_name": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "memorystore_v1_generated_Memorystore_CreateInstance_sync", + "title": "Snippet for the create_instance call in the Memorystore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#create_instance.", + "file": "memorystore/create_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_instance", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#create_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Memorystore::V1::CreateInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Memorystore::Rest::Client", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" + }, + "method": { + "short_name": "CreateInstance", + "full_name": "google.cloud.memorystore.v1.Memorystore.CreateInstance", + "service": { + "short_name": "Memorystore", + "full_name": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "memorystore_v1_generated_Memorystore_UpdateInstance_sync", + "title": "Snippet for the update_instance call in the Memorystore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#update_instance.", + "file": "memorystore/update_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_instance", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#update_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Memorystore::V1::UpdateInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Memorystore::Rest::Client", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" + }, + "method": { + "short_name": "UpdateInstance", + "full_name": "google.cloud.memorystore.v1.Memorystore.UpdateInstance", + "service": { + "short_name": "Memorystore", + "full_name": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "memorystore_v1_generated_Memorystore_DeleteInstance_sync", + "title": "Snippet for the delete_instance call in the Memorystore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#delete_instance.", + "file": "memorystore/delete_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_instance", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#delete_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Memorystore::V1::DeleteInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Memorystore::Rest::Client", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" + }, + "method": { + "short_name": "DeleteInstance", + "full_name": "google.cloud.memorystore.v1.Memorystore.DeleteInstance", + "service": { + "short_name": "Memorystore", + "full_name": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "memorystore_v1_generated_Memorystore_GetCertificateAuthority_sync", + "title": "Snippet for the get_certificate_authority call in the Memorystore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_certificate_authority.", + "file": "memorystore/get_certificate_authority.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_certificate_authority", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_certificate_authority", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Memorystore::V1::CertificateAuthority", + "client": { + "short_name": "Memorystore::Rest::Client", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" + }, + "method": { + "short_name": "GetCertificateAuthority", + "full_name": "google.cloud.memorystore.v1.Memorystore.GetCertificateAuthority", + "service": { + "short_name": "Memorystore", + "full_name": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "memorystore_v1_generated_Memorystore_GetSharedRegionalCertificateAuthority_sync", + "title": "Snippet for the get_shared_regional_certificate_authority call in the Memorystore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_shared_regional_certificate_authority.", + "file": "memorystore/get_shared_regional_certificate_authority.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_shared_regional_certificate_authority", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_shared_regional_certificate_authority", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority", + "client": { + "short_name": "Memorystore::Rest::Client", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" + }, + "method": { + "short_name": "GetSharedRegionalCertificateAuthority", + "full_name": "google.cloud.memorystore.v1.Memorystore.GetSharedRegionalCertificateAuthority", + "service": { + "short_name": "Memorystore", + "full_name": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "memorystore_v1_generated_Memorystore_RescheduleMaintenance_sync", + "title": "Snippet for the reschedule_maintenance call in the Memorystore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#reschedule_maintenance.", + "file": "memorystore/reschedule_maintenance.rb", + "language": "RUBY", + "client_method": { + "short_name": "reschedule_maintenance", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#reschedule_maintenance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Memorystore::Rest::Client", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" + }, + "method": { + "short_name": "RescheduleMaintenance", + "full_name": "google.cloud.memorystore.v1.Memorystore.RescheduleMaintenance", + "service": { + "short_name": "Memorystore", + "full_name": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "memorystore_v1_generated_Memorystore_ListBackupCollections_sync", + "title": "Snippet for the list_backup_collections call in the Memorystore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#list_backup_collections.", + "file": "memorystore/list_backup_collections.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_collections", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#list_backup_collections", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Memorystore::V1::ListBackupCollectionsResponse", + "client": { + "short_name": "Memorystore::Rest::Client", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" + }, + "method": { + "short_name": "ListBackupCollections", + "full_name": "google.cloud.memorystore.v1.Memorystore.ListBackupCollections", + "service": { + "short_name": "Memorystore", + "full_name": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "memorystore_v1_generated_Memorystore_GetBackupCollection_sync", + "title": "Snippet for the get_backup_collection call in the Memorystore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_backup_collection.", + "file": "memorystore/get_backup_collection.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_collection", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_backup_collection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Memorystore::V1::GetBackupCollectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Memorystore::V1::BackupCollection", + "client": { + "short_name": "Memorystore::Rest::Client", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" + }, + "method": { + "short_name": "GetBackupCollection", + "full_name": "google.cloud.memorystore.v1.Memorystore.GetBackupCollection", + "service": { + "short_name": "Memorystore", + "full_name": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "memorystore_v1_generated_Memorystore_ListBackups_sync", + "title": "Snippet for the list_backups call in the Memorystore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#list_backups.", + "file": "memorystore/list_backups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backups", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#list_backups", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Memorystore::V1::ListBackupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Memorystore::V1::ListBackupsResponse", + "client": { + "short_name": "Memorystore::Rest::Client", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" + }, + "method": { + "short_name": "ListBackups", + "full_name": "google.cloud.memorystore.v1.Memorystore.ListBackups", + "service": { + "short_name": "Memorystore", + "full_name": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "memorystore_v1_generated_Memorystore_GetBackup_sync", + "title": "Snippet for the get_backup call in the Memorystore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_backup.", + "file": "memorystore/get_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Memorystore::V1::GetBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Memorystore::V1::Backup", + "client": { + "short_name": "Memorystore::Rest::Client", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" + }, + "method": { + "short_name": "GetBackup", + "full_name": "google.cloud.memorystore.v1.Memorystore.GetBackup", + "service": { + "short_name": "Memorystore", + "full_name": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "memorystore_v1_generated_Memorystore_DeleteBackup_sync", + "title": "Snippet for the delete_backup call in the Memorystore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#delete_backup.", + "file": "memorystore/delete_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#delete_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Memorystore::V1::DeleteBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Memorystore::Rest::Client", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" + }, + "method": { + "short_name": "DeleteBackup", + "full_name": "google.cloud.memorystore.v1.Memorystore.DeleteBackup", + "service": { + "short_name": "Memorystore", + "full_name": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "memorystore_v1_generated_Memorystore_ExportBackup_sync", + "title": "Snippet for the export_backup call in the Memorystore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#export_backup.", + "file": "memorystore/export_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_backup", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#export_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Memorystore::V1::ExportBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Memorystore::Rest::Client", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" + }, + "method": { + "short_name": "ExportBackup", + "full_name": "google.cloud.memorystore.v1.Memorystore.ExportBackup", + "service": { + "short_name": "Memorystore", + "full_name": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "memorystore_v1_generated_Memorystore_BackupInstance_sync", + "title": "Snippet for the backup_instance call in the Memorystore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#backup_instance.", + "file": "memorystore/backup_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "backup_instance", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#backup_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Memorystore::V1::BackupInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Memorystore::Rest::Client", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" + }, + "method": { + "short_name": "BackupInstance", + "full_name": "google.cloud.memorystore.v1.Memorystore.BackupInstance", + "service": { + "short_name": "Memorystore", + "full_name": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-memorystore-v1/test/google/cloud/memorystore/v1/memorystore_rest_test.rb b/owl-bot-staging/google-cloud-memorystore-v1/test/google/cloud/memorystore/v1/memorystore_rest_test.rb new file mode 100644 index 000000000000..b8c427935b67 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/test/google/cloud/memorystore/v1/memorystore_rest_test.rb @@ -0,0 +1,929 @@ +# frozen_string_literal: true + +# 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. +# 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/memorystore/v1/memorystore_pb" +require "google/cloud/memorystore/v1/memorystore/rest" + + +class ::Google::Cloud::Memorystore::V1::Memorystore::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_instances + # Create test objects. + client_result = ::Google::Cloud::Memorystore::V1::ListInstancesResponse.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" + order_by = "hello world" + + list_instances_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_list_instances_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_instances_client_stub do + # Create client + client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_instances parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_instances ::Google::Cloud::Memorystore::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_instances(::Google::Cloud::Memorystore::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_instances_client_stub.call_count + end + end + end + + def test_get_instance + # Create test objects. + client_result = ::Google::Cloud::Memorystore::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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do + # Create client + client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_instance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_instance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_instance ::Google::Cloud::Memorystore::V1::GetInstanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_instance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_instance(::Google::Cloud::Memorystore::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_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 = {} + request_id = "hello world" + + 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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_create_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_instance_client_stub do + # Create client + client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_instance parent: parent, instance_id: instance_id, instance: instance, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_instance ::Google::Cloud::Memorystore::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_instance(::Google::Cloud::Memorystore::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id), 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_update_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. + update_mask = {} + instance = {} + request_id = "hello world" + + update_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_update_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_instance_client_stub do + # Create client + client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_instance({ update_mask: update_mask, instance: instance, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_instance update_mask: update_mask, instance: instance, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_instance ::Google::Cloud::Memorystore::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_instance({ update_mask: update_mask, instance: instance, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_instance(::Google::Cloud::Memorystore::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_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" + request_id = "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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_delete_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_instance_client_stub do + # Create client + client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_instance({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_instance name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_instance ::Google::Cloud::Memorystore::V1::DeleteInstanceRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_instance({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_instance(::Google::Cloud::Memorystore::V1::DeleteInstanceRequest.new(name: name, request_id: request_id), 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_certificate_authority + # Create test objects. + client_result = ::Google::Cloud::Memorystore::V1::CertificateAuthority.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_certificate_authority_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_get_certificate_authority_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_certificate_authority_client_stub do + # Create client + client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_certificate_authority({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_certificate_authority name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_certificate_authority ::Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_certificate_authority({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_certificate_authority(::Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_certificate_authority_client_stub.call_count + end + end + end + + def test_get_shared_regional_certificate_authority + # Create test objects. + client_result = ::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_shared_regional_certificate_authority_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_get_shared_regional_certificate_authority_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_shared_regional_certificate_authority_client_stub do + # Create client + client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_shared_regional_certificate_authority({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_shared_regional_certificate_authority name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_shared_regional_certificate_authority ::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_shared_regional_certificate_authority({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_shared_regional_certificate_authority(::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_shared_regional_certificate_authority_client_stub.call_count + end + end + end + + def test_reschedule_maintenance + # 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" + reschedule_type = :RESCHEDULE_TYPE_UNSPECIFIED + schedule_time = {} + + reschedule_maintenance_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_reschedule_maintenance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, reschedule_maintenance_client_stub do + # Create client + client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.reschedule_maintenance({ name: name, reschedule_type: reschedule_type, schedule_time: schedule_time }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.reschedule_maintenance name: name, reschedule_type: reschedule_type, schedule_time: schedule_time do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.reschedule_maintenance ::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest.new(name: name, reschedule_type: reschedule_type, schedule_time: schedule_time) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.reschedule_maintenance({ name: name, reschedule_type: reschedule_type, schedule_time: schedule_time }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.reschedule_maintenance(::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest.new(name: name, reschedule_type: reschedule_type, schedule_time: schedule_time), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, reschedule_maintenance_client_stub.call_count + end + end + end + + def test_list_backup_collections + # Create test objects. + client_result = ::Google::Cloud::Memorystore::V1::ListBackupCollectionsResponse.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" + + list_backup_collections_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_list_backup_collections_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_collections_client_stub do + # Create client + client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backup_collections({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_backup_collections parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_backup_collections ::Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_backup_collections({ parent: parent, 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 + client.list_backup_collections(::Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest.new(parent: parent, 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_backup_collections_client_stub.call_count + end + end + end + + def test_get_backup_collection + # Create test objects. + client_result = ::Google::Cloud::Memorystore::V1::BackupCollection.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_collection_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_get_backup_collection_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_collection_client_stub do + # Create client + client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup_collection({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup_collection name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup_collection ::Google::Cloud::Memorystore::V1::GetBackupCollectionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup_collection({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup_collection(::Google::Cloud::Memorystore::V1::GetBackupCollectionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_collection_client_stub.call_count + end + end + end + + def test_list_backups + # Create test objects. + client_result = ::Google::Cloud::Memorystore::V1::ListBackupsResponse.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" + + list_backups_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_list_backups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backups_client_stub do + # Create client + client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backups({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_backups parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_backups ::Google::Cloud::Memorystore::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_backups({ parent: parent, 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 + client.list_backups(::Google::Cloud::Memorystore::V1::ListBackupsRequest.new(parent: parent, 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_backups_client_stub.call_count + end + end + end + + def test_get_backup + # Create test objects. + client_result = ::Google::Cloud::Memorystore::V1::Backup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_get_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_client_stub do + # Create client + client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup ::Google::Cloud::Memorystore::V1::GetBackupRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup(::Google::Cloud::Memorystore::V1::GetBackupRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_client_stub.call_count + end + end + end + + def test_delete_backup + # 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" + request_id = "hello world" + + delete_backup_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_delete_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_client_stub do + # Create client + client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_backup({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_backup name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_backup ::Google::Cloud::Memorystore::V1::DeleteBackupRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_backup({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_backup(::Google::Cloud::Memorystore::V1::DeleteBackupRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_backup_client_stub.call_count + end + end + end + + def test_export_backup + # 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. + gcs_bucket = "hello world" + name = "hello world" + + export_backup_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_export_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_backup_client_stub do + # Create client + client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_backup({ gcs_bucket: gcs_bucket, name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_backup gcs_bucket: gcs_bucket, name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_backup ::Google::Cloud::Memorystore::V1::ExportBackupRequest.new(gcs_bucket: gcs_bucket, name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_backup({ gcs_bucket: gcs_bucket, name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_backup(::Google::Cloud::Memorystore::V1::ExportBackupRequest.new(gcs_bucket: gcs_bucket, name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_backup_client_stub.call_count + end + end + end + + def test_backup_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" + ttl = {} + backup_id = "hello world" + + backup_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_backup_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, backup_instance_client_stub do + # Create client + client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.backup_instance({ name: name, ttl: ttl, backup_id: backup_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.backup_instance name: name, ttl: ttl, backup_id: backup_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.backup_instance ::Google::Cloud::Memorystore::V1::BackupInstanceRequest.new(name: name, ttl: ttl, backup_id: backup_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.backup_instance({ name: name, ttl: ttl, backup_id: backup_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.backup_instance(::Google::Cloud::Memorystore::V1::BackupInstanceRequest.new(name: name, ttl: ttl, backup_id: backup_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, backup_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::Memorystore::V1::Memorystore::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::Memorystore::V1::Memorystore::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/test/helper.rb b/owl-bot-staging/google-cloud-memorystore-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-memorystore-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# 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. +# 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" From 76d188b1bd660d5b7a88e2bc897b63b52f91ccb5 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 31 Mar 2026 03:05:51 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../.owlbot-manifest.json | 1 + .../gapic_metadata.json | 5 + .../cloud/memorystore/v1/memorystore/paths.rb | 36 + .../memorystore/v1/memorystore/rest/client.rb | 88 + .../v1/memorystore/rest/service_stub.rb | 61 + .../cloud/memorystore/v1/memorystore_pb.rb | 7 +- .../memorystore/v1/memorystore_services_pb.rb | 3 + .../proto_docs/google/api/client.rb | 174 +- .../cloud/memorystore/v1/memorystore.rb | 80 + .../proto_docs/google/type/timeofday.rb | 16 +- ...t_shared_regional_certificate_authority.rb | 0 ..._metadata_google.cloud.memorystore.v1.json | 40 + .../memorystore/v1/memorystore_rest_test.rb | 54 + .../google-cloud-memorystore-v1/.gitignore | 22 - .../.repo-metadata.json | 17 - .../google-cloud-memorystore-v1/.rubocop.yml | 33 - .../google-cloud-memorystore-v1/.toys.rb | 28 - .../google-cloud-memorystore-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../google-cloud-memorystore-v1/CHANGELOG.md | 2 - .../google-cloud-memorystore-v1/Gemfile | 14 - .../google-cloud-memorystore-v1/LICENSE.md | 201 -- .../google-cloud-memorystore-v1/README.md | 154 -- .../google-cloud-memorystore-v1/Rakefile | 169 -- .../gapic_metadata.json | 93 - .../google-cloud-memorystore-v1.gemspec | 29 - .../lib/google-cloud-memorystore-v1.rb | 21 - .../lib/google/cloud/memorystore/v1.rb | 40 - .../cloud/memorystore/v1/bindings_override.rb | 75 - .../cloud/memorystore/v1/memorystore.rb | 48 - .../memorystore/v1/memorystore/credentials.rb | 47 - .../cloud/memorystore/v1/memorystore/paths.rb | 244 --- .../cloud/memorystore/v1/memorystore/rest.rb | 54 - .../memorystore/v1/memorystore/rest/client.rb | 1896 ----------------- .../v1/memorystore/rest/operations.rb | 924 -------- .../v1/memorystore/rest/service_stub.rb | 1001 --------- .../cloud/memorystore/v1/memorystore_pb.rb | 105 - .../memorystore/v1/memorystore_services_pb.rb | 89 - .../lib/google/cloud/memorystore/v1/rest.rb | 38 - .../google/cloud/memorystore/v1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 ----- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/field_info.rb | 88 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../cloud/memorystore/v1/memorystore.rb | 1486 ------------- .../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/dayofweek.rb | 49 - .../proto_docs/google/type/timeofday.rb | 49 - .../snippets/Gemfile | 32 - .../snippets/memorystore/backup_instance.rb | 54 - .../snippets/memorystore/create_instance.rb | 54 - .../snippets/memorystore/delete_backup.rb | 54 - .../snippets/memorystore/delete_instance.rb | 54 - .../snippets/memorystore/export_backup.rb | 54 - .../snippets/memorystore/get_backup.rb | 47 - .../memorystore/get_backup_collection.rb | 47 - .../memorystore/get_certificate_authority.rb | 47 - .../snippets/memorystore/get_instance.rb | 47 - .../memorystore/list_backup_collections.rb | 51 - .../snippets/memorystore/list_backups.rb | 51 - .../snippets/memorystore/list_instances.rb | 51 - .../memorystore/reschedule_maintenance.rb | 54 - .../snippets/memorystore/update_instance.rb | 54 - ..._metadata_google.cloud.memorystore.v1.json | 615 ------ .../memorystore/v1/memorystore_rest_test.rb | 929 -------- .../test/helper.rb | 26 - 74 files changed, 529 insertions(+), 11383 deletions(-) rename {owl-bot-staging/google-cloud-memorystore-v1 => google-cloud-memorystore-v1}/snippets/memorystore/get_shared_regional_certificate_authority.rb (100%) delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/google-cloud-memorystore-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google-cloud-memorystore-v1.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/paths.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_pb.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/cloud/memorystore/v1/memorystore.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/type/dayofweek.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/type/timeofday.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/backup_instance.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/create_instance.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/delete_backup.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/delete_instance.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/export_backup.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_backup.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_backup_collection.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_certificate_authority.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_instance.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_backup_collections.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_backups.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_instances.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/reschedule_maintenance.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/update_instance.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/snippets/snippet_metadata_google.cloud.memorystore.v1.json delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/test/google/cloud/memorystore/v1/memorystore_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-memorystore-v1/test/helper.rb diff --git a/google-cloud-memorystore-v1/.owlbot-manifest.json b/google-cloud-memorystore-v1/.owlbot-manifest.json index 3f4032aeb838..8394ae1fe412 100644 --- a/google-cloud-memorystore-v1/.owlbot-manifest.json +++ b/google-cloud-memorystore-v1/.owlbot-manifest.json @@ -53,6 +53,7 @@ "snippets/memorystore/get_backup_collection.rb", "snippets/memorystore/get_certificate_authority.rb", "snippets/memorystore/get_instance.rb", + "snippets/memorystore/get_shared_regional_certificate_authority.rb", "snippets/memorystore/list_backup_collections.rb", "snippets/memorystore/list_backups.rb", "snippets/memorystore/list_instances.rb", diff --git a/google-cloud-memorystore-v1/gapic_metadata.json b/google-cloud-memorystore-v1/gapic_metadata.json index 3add7a73384b..87d428ba0d71 100644 --- a/google-cloud-memorystore-v1/gapic_metadata.json +++ b/google-cloud-memorystore-v1/gapic_metadata.json @@ -40,6 +40,11 @@ "get_certificate_authority" ] }, + "GetSharedRegionalCertificateAuthority": { + "methods": [ + "get_shared_regional_certificate_authority" + ] + }, "RescheduleMaintenance": { "methods": [ "reschedule_maintenance" diff --git a/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/paths.rb b/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/paths.rb index 7a32d42511a1..9776e8fde7ee 100644 --- a/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/paths.rb +++ b/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/paths.rb @@ -64,6 +64,25 @@ def backup_collection_path project:, location:, backup_collection: "projects/#{project}/locations/#{location}/backupCollections/#{backup_collection}" end + ## + # Create a fully-qualified CaPool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/caPools/{ca_pool}` + # + # @param project [String] + # @param location [String] + # @param ca_pool [String] + # + # @return [::String] + def ca_pool_path project:, location:, ca_pool: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/caPools/#{ca_pool}" + end + ## # Create a fully-qualified CryptoKey resource string. # @@ -199,6 +218,23 @@ def service_attachment_path project:, region:, service_attachment: "projects/#{project}/regions/#{region}/serviceAttachments/#{service_attachment}" end + ## + # Create a fully-qualified SharedRegionalCertificateAuthority resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def shared_regional_certificate_authority_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}/sharedRegionalCertificateAuthority" + end + extend self end end diff --git a/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/client.rb b/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/client.rb index 20f6c2799810..9caa64d3cc22 100644 --- a/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/client.rb +++ b/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/client.rb @@ -803,6 +803,87 @@ def get_certificate_authority request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Gets the details of shared regional certificate authority information for + # Memorystore instance. + # + # @overload get_shared_regional_certificate_authority(request, options = nil) + # Pass arguments to `get_shared_regional_certificate_authority` via a request object, either of type + # {::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest, ::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_shared_regional_certificate_authority(name: nil) + # Pass arguments to `get_shared_regional_certificate_authority` 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. Regional certificate authority resource name using the form: + # `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority` + # where `location_id` refers to a Google Cloud region. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/memorystore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest.new + # + # # Call the get_shared_regional_certificate_authority method. + # result = client.get_shared_regional_certificate_authority request + # + # # The returned object is of type Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority. + # p result + # + def get_shared_regional_certificate_authority request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest + + # 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_shared_regional_certificate_authority.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::Memorystore::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_shared_regional_certificate_authority.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_shared_regional_certificate_authority.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @memorystore_stub.get_shared_regional_certificate_authority 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 + ## # Reschedules upcoming maintenance event. # @@ -1724,6 +1805,11 @@ class Rpcs # attr_reader :get_certificate_authority ## + # RPC-specific configuration for `get_shared_regional_certificate_authority` + # @return [::Gapic::Config::Method] + # + attr_reader :get_shared_regional_certificate_authority + ## # RPC-specific configuration for `reschedule_maintenance` # @return [::Gapic::Config::Method] # @@ -1778,6 +1864,8 @@ def initialize parent_rpcs = nil @delete_instance = ::Gapic::Config::Method.new delete_instance_config get_certificate_authority_config = parent_rpcs.get_certificate_authority if parent_rpcs.respond_to? :get_certificate_authority @get_certificate_authority = ::Gapic::Config::Method.new get_certificate_authority_config + get_shared_regional_certificate_authority_config = parent_rpcs.get_shared_regional_certificate_authority if parent_rpcs.respond_to? :get_shared_regional_certificate_authority + @get_shared_regional_certificate_authority = ::Gapic::Config::Method.new get_shared_regional_certificate_authority_config reschedule_maintenance_config = parent_rpcs.reschedule_maintenance if parent_rpcs.respond_to? :reschedule_maintenance @reschedule_maintenance = ::Gapic::Config::Method.new reschedule_maintenance_config list_backup_collections_config = parent_rpcs.list_backup_collections if parent_rpcs.respond_to? :list_backup_collections diff --git a/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/service_stub.rb b/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/service_stub.rb index 831781ae4540..701601072960 100644 --- a/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/service_stub.rb +++ b/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/service_stub.rb @@ -313,6 +313,46 @@ def get_certificate_authority request_pb, options = nil end end + ## + # Baseline implementation for the get_shared_regional_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest] + # 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::Memorystore::V1::SharedRegionalCertificateAuthority] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority] + # A result object deserialized from the server's reply + def get_shared_regional_certificate_authority request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_shared_regional_certificate_authority_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_shared_regional_certificate_authority", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + ## # Baseline implementation for the reschedule_maintenance REST call # @@ -761,6 +801,27 @@ def self.transcode_get_certificate_authority_request request_pb transcoder.transcode request_pb end + ## + # @private + # + # GRPC transcoding helper method for the get_shared_regional_certificate_authority REST call + # + # @param request_pb [::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest] + # 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_shared_regional_certificate_authority_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/sharedRegionalCertificateAuthority/?$}, false] + ] + ) + transcoder.transcode request_pb + end + ## # @private # diff --git a/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_pb.rb b/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_pb.rb index e3f81980b870..e556abc53ee6 100644 --- a/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_pb.rb +++ b/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_pb.rb @@ -18,7 +18,7 @@ require 'google/type/timeofday_pb' -descriptor_data = "\n-google/cloud/memorystore/v1/memorystore.proto\x12\x1bgoogle.cloud.memorystore.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"\xa7#\n\x08Instance\x12S\n\ngcs_source\x18\x17 \x01(\x0b\x32\x35.google.cloud.memorystore.v1.Instance.GcsBackupSourceB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12\x62\n\x15managed_backup_source\x18\x18 \x01(\x0b\x32\x39.google.cloud.memorystore.v1.Instance.ManagedBackupSourceB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\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\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.memorystore.v1.Instance.LabelsEntryB\x03\xe0\x41\x01\x12?\n\x05state\x18\x05 \x01(\x0e\x32+.google.cloud.memorystore.v1.Instance.StateB\x03\xe0\x41\x03\x12H\n\nstate_info\x18\x06 \x01(\x0b\x32/.google.cloud.memorystore.v1.Instance.StateInfoB\x03\xe0\x41\x03\x12\x18\n\x03uid\x18\x07 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1f\n\rreplica_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12[\n\x12\x61uthorization_mode\x18\t \x01(\x0e\x32\x37.google.cloud.memorystore.v1.Instance.AuthorizationModeB\x06\xe0\x41\x01\xe0\x41\x05\x12\x64\n\x17transit_encryption_mode\x18\n \x01(\x0e\x32;.google.cloud.memorystore.v1.Instance.TransitEncryptionModeB\x06\xe0\x41\x01\xe0\x41\x05\x12\x18\n\x0bshard_count\x18\x0b \x01(\x05\x42\x03\xe0\x41\x01\x12R\n\x13\x64iscovery_endpoints\x18\x0c \x03(\x0b\x32..google.cloud.memorystore.v1.DiscoveryEndpointB\x05\x18\x01\xe0\x41\x03\x12\x46\n\tnode_type\x18\r \x01(\x0e\x32..google.cloud.memorystore.v1.Instance.NodeTypeB\x03\xe0\x41\x01\x12O\n\x12persistence_config\x18\x0e \x01(\x0b\x32..google.cloud.memorystore.v1.PersistenceConfigB\x03\xe0\x41\x01\x12\x1b\n\x0e\x65ngine_version\x18\x0f \x01(\tB\x03\xe0\x41\x01\x12U\n\x0e\x65ngine_configs\x18\x10 \x03(\x0b\x32\x38.google.cloud.memorystore.v1.Instance.EngineConfigsEntryB\x03\xe0\x41\x01\x12\x41\n\x0bnode_config\x18\x11 \x01(\x0b\x32\'.google.cloud.memorystore.v1.NodeConfigB\x03\xe0\x41\x03\x12]\n\x18zone_distribution_config\x18\x12 \x01(\x0b\x32\x33.google.cloud.memorystore.v1.ZoneDistributionConfigB\x06\xe0\x41\x01\xe0\x41\x05\x12-\n\x1b\x64\x65letion_protection_enabled\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12V\n\x14psc_auto_connections\x18\x14 \x03(\x0b\x32..google.cloud.memorystore.v1.PscAutoConnectionB\x08\x18\x01\xe0\x41\x01\xe0\x41\x05\x12U\n\x16psc_attachment_details\x18\x15 \x03(\x0b\x32\x30.google.cloud.memorystore.v1.PscAttachmentDetailB\x03\xe0\x41\x03\x12N\n\tendpoints\x18\x19 \x03(\x0b\x32\x36.google.cloud.memorystore.v1.Instance.InstanceEndpointB\x03\xe0\x41\x01\x12=\n\x04mode\x18\x1a \x01(\x0e\x32*.google.cloud.memorystore.v1.Instance.ModeB\x03\xe0\x41\x01\x12/\n\x1asimulate_maintenance_event\x18\x1b \x01(\x08\x42\x06\xe0\x41\x01\xe0\x41\x04H\x03\x88\x01\x01\x12+\n\x14ondemand_maintenance\x18\x1c \x01(\x08\x42\x08\x18\x01\xe0\x41\x01\xe0\x41\x04H\x04\x88\x01\x01\x12\"\n\rsatisfies_pzs\x18\x1d \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\"\n\rsatisfies_pzi\x18\x1e \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x06\x88\x01\x01\x12O\n\x12maintenance_policy\x18\x1f \x01(\x0b\x32..google.cloud.memorystore.v1.MaintenancePolicyB\x03\xe0\x41\x01\x12S\n\x14maintenance_schedule\x18 \x01(\x0b\x32\x30.google.cloud.memorystore.v1.MaintenanceScheduleB\x03\xe0\x41\x03\x12k\n!cross_instance_replication_config\x18! \x01(\x0b\x32;.google.cloud.memorystore.v1.CrossInstanceReplicationConfigB\x03\xe0\x41\x01\x12;\n)async_instance_endpoints_deletion_enabled\x18, \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12?\n\x07kms_key\x18- \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKeyH\x08\x88\x01\x01\x12I\n\x0f\x65ncryption_info\x18. \x01(\x0b\x32+.google.cloud.memorystore.v1.EncryptionInfoB\x03\xe0\x41\x03\x12S\n\x11\x62\x61\x63kup_collection\x18/ \x01(\tB3\xe0\x41\x03\xfa\x41-\n+memorystore.googleapis.com/BackupCollectionH\t\x88\x01\x01\x12X\n\x17\x61utomated_backup_config\x18\x30 \x01(\x0b\x32\x32.google.cloud.memorystore.v1.AutomatedBackupConfigB\x03\xe0\x41\x01\x12%\n\x13maintenance_version\x18\x31 \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12/\n\x1d\x65\x66\x66\x65\x63tive_maintenance_version\x18\x32 \x01(\tB\x03\xe0\x41\x03H\x0b\x88\x01\x01\x12+\n\x1e\x61vailable_maintenance_versions\x18\x33 \x03(\tB\x03\xe0\x41\x03\x12.\n\x1c\x61llow_fewer_zones_deployment\x18\x36 \x01(\x08\x42\x08\x18\x01\xe0\x41\x01\xe0\x41\x05\x1a\xa4\x03\n\tStateInfo\x12V\n\x0bupdate_info\x18\x01 \x01(\x0b\x32:.google.cloud.memorystore.v1.Instance.StateInfo.UpdateInfoB\x03\xe0\x41\x03H\x00\x1a\xb6\x02\n\nUpdateInfo\x12$\n\x12target_shard_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12&\n\x14target_replica_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\'\n\x15target_engine_version\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12R\n\x10target_node_type\x18\x04 \x01(\x0e\x32..google.cloud.memorystore.v1.Instance.NodeTypeB\x03\xe0\x41\x03H\x03\x88\x01\x01\x42\x15\n\x13_target_shard_countB\x17\n\x15_target_replica_countB\x18\n\x16_target_engine_versionB\x13\n\x11_target_node_typeB\x06\n\x04info\x1a$\n\x0fGcsBackupSource\x12\x11\n\x04uris\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a*\n\x13ManagedBackupSource\x12\x13\n\x06\x62\x61\x63kup\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x64\n\x10InstanceEndpoint\x12P\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32\x36.google.cloud.memorystore.v1.Instance.ConnectionDetailB\x03\xe0\x41\x01\x1a\xba\x01\n\x10\x43onnectionDetail\x12R\n\x13psc_auto_connection\x18\x01 \x01(\x0b\x32..google.cloud.memorystore.v1.PscAutoConnectionB\x03\xe0\x41\x05H\x00\x12\x44\n\x0epsc_connection\x18\x02 \x01(\x0b\x32*.google.cloud.memorystore.v1.PscConnectionH\x00\x42\x0c\n\nconnection\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x34\n\x12\x45ngineConfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\"X\n\x11\x41uthorizationMode\x12\"\n\x1e\x41UTHORIZATION_MODE_UNSPECIFIED\x10\x00\x12\x11\n\rAUTH_DISABLED\x10\x01\x12\x0c\n\x08IAM_AUTH\x10\x02\"|\n\x15TransitEncryptionMode\x12\'\n#TRANSIT_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bTRANSIT_ENCRYPTION_DISABLED\x10\x01\x12\x19\n\x15SERVER_AUTHENTICATION\x10\x02\"w\n\x08NodeType\x12\x19\n\x15NODE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10SHARED_CORE_NANO\x10\x01\x12\x12\n\x0eHIGHMEM_MEDIUM\x10\x02\x12\x12\n\x0eHIGHMEM_XLARGE\x10\x03\x12\x12\n\x0eSTANDARD_SMALL\x10\x04\"S\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x12\n\nSTANDALONE\x10\x01\x1a\x02\x08\x01\x12\x0b\n\x07\x43LUSTER\x10\x02\x12\x14\n\x10\x43LUSTER_DISABLED\x10\x04:{\xea\x41x\n#memorystore.googleapis.com/Instance\x12.google.cloud.memorystore.v1.PersistenceConfig.PersistenceModeB\x03\xe0\x41\x01\x12Q\n\nrdb_config\x18\x02 \x01(\x0b\x32\x38.google.cloud.memorystore.v1.PersistenceConfig.RDBConfigB\x03\xe0\x41\x01\x12Q\n\naof_config\x18\x03 \x01(\x0b\x32\x38.google.cloud.memorystore.v1.PersistenceConfig.AOFConfigB\x03\xe0\x41\x01\x1a\xb1\x02\n\tRDBConfig\x12i\n\x13rdb_snapshot_period\x18\x01 \x01(\x0e\x32G.google.cloud.memorystore.v1.PersistenceConfig.RDBConfig.SnapshotPeriodB\x03\xe0\x41\x01\x12@\n\x17rdb_snapshot_start_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"w\n\x0eSnapshotPeriod\x12\x1f\n\x1bSNAPSHOT_PERIOD_UNSPECIFIED\x10\x00\x12\x0c\n\x08ONE_HOUR\x10\x01\x12\r\n\tSIX_HOURS\x10\x02\x12\x10\n\x0cTWELVE_HOURS\x10\x03\x12\x15\n\x11TWENTY_FOUR_HOURS\x10\x04\x1a\xbf\x01\n\tAOFConfig\x12_\n\x0c\x61ppend_fsync\x18\x01 \x01(\x0e\x32\x44.google.cloud.memorystore.v1.PersistenceConfig.AOFConfig.AppendFsyncB\x03\xe0\x41\x01\"Q\n\x0b\x41ppendFsync\x12\x1c\n\x18\x41PPEND_FSYNC_UNSPECIFIED\x10\x00\x12\t\n\x05NEVER\x10\x01\x12\r\n\tEVERY_SEC\x10\x02\x12\n\n\x06\x41LWAYS\x10\x03\"S\n\x0fPersistenceMode\x12 \n\x1cPERSISTENCE_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x07\n\x03RDB\x10\x02\x12\x07\n\x03\x41OF\x10\x03\"\"\n\nNodeConfig\x12\x14\n\x07size_gb\x18\x01 \x01(\x01\x42\x03\xe0\x41\x03\"\xe9\x01\n\x16ZoneDistributionConfig\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12[\n\x04mode\x18\x01 \x01(\x0e\x32H.google.cloud.memorystore.v1.ZoneDistributionConfig.ZoneDistributionModeB\x03\xe0\x41\x01\"_\n\x14ZoneDistributionMode\x12&\n\"ZONE_DISTRIBUTION_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nMULTI_ZONE\x10\x01\x12\x0f\n\x0bSINGLE_ZONE\x10\x02\"\xce\x02\n\x1cRescheduleMaintenanceRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\x12\x66\n\x0freschedule_type\x18\x02 \x01(\x0e\x32H.google.cloud.memorystore.v1.RescheduleMaintenanceRequest.RescheduleTypeB\x03\xe0\x41\x02\x12\x36\n\rschedule_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"S\n\x0eRescheduleType\x12\x1f\n\x1bRESCHEDULE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tIMMEDIATE\x10\x01\x12\x11\n\rSPECIFIC_TIME\x10\x03\"\xb0\x01\n\x14ListInstancesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#memorystore.googleapis.com/Instance\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x7f\n\x15ListInstancesResponse\x12\x38\n\tinstances\x18\x01 \x03(\x0b\x32%.google.cloud.memorystore.v1.Instance\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"O\n\x12GetInstanceRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\"\xcd\x01\n\x15\x43reateInstanceRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#memorystore.googleapis.com/Instance\x12\x18\n\x0binstance_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\x08instance\x18\x03 \x01(\x0b\x32%.google.cloud.memorystore.v1.InstanceB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xac\x01\n\x15UpdateInstanceRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12<\n\x08instance\x18\x02 \x01(\x0b\x32%.google.cloud.memorystore.v1.InstanceB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"s\n\x15\x44\x65leteInstanceRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x94\x01\n\x1cListBackupCollectionsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+memorystore.googleapis.com/BackupCollection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x98\x01\n\x1dListBackupCollectionsResponse\x12I\n\x12\x62\x61\x63kup_collections\x18\x01 \x03(\x0b\x32-.google.cloud.memorystore.v1.BackupCollection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x1aGetBackupCollectionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+memorystore.googleapis.com/BackupCollection\"\x80\x01\n\x12ListBackupsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!memorystore.googleapis.com/Backup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"y\n\x13ListBackupsResponse\x12\x34\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32#.google.cloud.memorystore.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"K\n\x10GetBackupRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!memorystore.googleapis.com/Backup\"o\n\x13\x44\x65leteBackupRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!memorystore.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"s\n\x13\x45xportBackupRequest\x12\x14\n\ngcs_bucket\x18\x02 \x01(\tH\x00\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!memorystore.googleapis.com/BackupB\r\n\x0b\x64\x65stination\"\xaa\x01\n\x15\x42\x61\x63kupInstanceRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\x12+\n\x03ttl\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x1b\n\tbackup_id\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0c\n\n_backup_id\"[\n\x1eGetCertificateAuthorityRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\"\x89\x04\n\x14\x43\x65rtificateAuthority\x12j\n\x11managed_server_ca\x18\x02 \x01(\x0b\x32M.google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthorityH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x1a\xab\x01\n\x1bManagedCertificateAuthority\x12i\n\x08\x63\x61_certs\x18\x01 \x03(\x0b\x32W.google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain\x1a!\n\tCertChain\x12\x14\n\x0c\x63\x65rtificates\x18\x01 \x03(\t:\xb6\x01\xea\x41\xb2\x01\n/memorystore.googleapis.com/CertificateAuthority\x12Qprojects/{project}/locations/{location}/instances/{instance}/certificateAuthority*\x16\x63\x65rtificateAuthorities2\x14\x63\x65rtificateAuthorityB\x0b\n\tserver_ca\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xf6\x04\n\x0e\x45ncryptionInfo\x12N\n\x0f\x65ncryption_type\x18\x01 \x01(\x0e\x32\x30.google.cloud.memorystore.v1.EncryptionInfo.TypeB\x03\xe0\x41\x03\x12J\n\x10kms_key_versions\x18\x02 \x03(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12[\n\x15kms_key_primary_state\x18\x03 \x01(\x0e\x32\x37.google.cloud.memorystore.v1.EncryptionInfo.KmsKeyStateB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\\\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x01\x12\x1f\n\x1b\x43USTOMER_MANAGED_ENCRYPTION\x10\x02\"\xd1\x01\n\x0bKmsKeyState\x12\x1d\n\x19KMS_KEY_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03\x12\r\n\tDESTROYED\x10\x04\x12\x15\n\x11\x44\x45STROY_SCHEDULED\x10\x05\x12 \n\x1c\x45KM_KEY_UNREACHABLE_DETECTED\x10\x06\x12\x14\n\x10\x42ILLING_DISABLED\x10\x07\x12\x13\n\x0fUNKNOWN_FAILURE\x10\x08*W\n\x13PscConnectionStatus\x12%\n!PSC_CONNECTION_STATUS_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\r\n\tNOT_FOUND\x10\x02*\x89\x01\n\x0e\x43onnectionType\x12\x1f\n\x1b\x43ONNECTION_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x43ONNECTION_TYPE_DISCOVERY\x10\x01\x12\x1b\n\x17\x43ONNECTION_TYPE_PRIMARY\x10\x02\x12\x1a\n\x16\x43ONNECTION_TYPE_READER\x10\x03\x32\xd8\x17\n\x0bMemorystore\x12\xb6\x01\n\rListInstances\x12\x31.google.cloud.memorystore.v1.ListInstancesRequest\x1a\x32.google.cloud.memorystore.v1.ListInstancesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/instances\x12\xa3\x01\n\x0bGetInstance\x12/.google.cloud.memorystore.v1.GetInstanceRequest\x1a%.google.cloud.memorystore.v1.Instance\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/instances/*}\x12\xe2\x01\n\x0e\x43reateInstance\x12\x32.google.cloud.memorystore.v1.CreateInstanceRequest\x1a\x1d.google.longrunning.Operation\"}\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x1bparent,instance,instance_id\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/instances:\x08instance\x12\xe4\x01\n\x0eUpdateInstance\x12\x32.google.cloud.memorystore.v1.UpdateInstanceRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x14instance,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{instance.name=projects/*/locations/*/instances/*}:\x08instance\x12\xce\x01\n\x0e\x44\x65leteInstance\x12\x32.google.cloud.memorystore.v1.DeleteInstanceRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/instances/*}\x12\xdc\x01\n\x17GetCertificateAuthority\x12;.google.cloud.memorystore.v1.GetCertificateAuthorityRequest\x1a\x31.google.cloud.memorystore.v1.CertificateAuthority\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/instances/*}/certificateAuthority\x12\x87\x02\n\x15RescheduleMaintenance\x12\x39.google.cloud.memorystore.v1.RescheduleMaintenanceRequest\x1a\x1d.google.longrunning.Operation\"\x93\x01\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\"name,reschedule_type,schedule_time\x82\xd3\xe4\x93\x02H\"C/v1/{name=projects/*/locations/*/instances/*}:rescheduleMaintenance:\x01*\x12\xd6\x01\n\x15ListBackupCollections\x12\x39.google.cloud.memorystore.v1.ListBackupCollectionsRequest\x1a:.google.cloud.memorystore.v1.ListBackupCollectionsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/backupCollections\x12\xc3\x01\n\x13GetBackupCollection\x12\x37.google.cloud.memorystore.v1.GetBackupCollectionRequest\x1a-.google.cloud.memorystore.v1.BackupCollection\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/backupCollections/*}\x12\xc2\x01\n\x0bListBackups\x12/.google.cloud.memorystore.v1.ListBackupsRequest\x1a\x30.google.cloud.memorystore.v1.ListBackupsResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/locations/*/backupCollections/*}/backups\x12\xaf\x01\n\tGetBackup\x12-.google.cloud.memorystore.v1.GetBackupRequest\x1a#.google.cloud.memorystore.v1.Backup\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xdc\x01\n\x0c\x44\x65leteBackup\x12\x30.google.cloud.memorystore.v1.DeleteBackupRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xd0\x01\n\x0c\x45xportBackup\x12\x30.google.cloud.memorystore.v1.ExportBackupRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02K\"F/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}:export:\x01*\x12\xcb\x01\n\x0e\x42\x61\x63kupInstance\x12\x32.google.cloud.memorystore.v1.BackupInstanceRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/v1/{name=projects/*/locations/*/instances/*}:backup:\x01*\x1aN\xca\x41\x1amemorystore.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb1\x06\n\x1f\x63om.google.cloud.memorystore.v1B\x0bV1mainProtoP\x01ZAcloud.google.com/go/memorystore/apiv1/memorystorepb;memorystorepb\xaa\x02\x1bGoogle.Cloud.Memorystore.V1\xca\x02\x1bGoogle\\Cloud\\Memorystore\\V1\xea\x02\x1eGoogle::Cloud::Memorystore::V1\xea\x41n\n%compute.googleapis.com/ForwardingRule\x12\x45projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}\xea\x41w\n(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}b\x06proto3" +descriptor_data = "\n-google/cloud/memorystore/v1/memorystore.proto\x12\x1bgoogle.cloud.memorystore.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"\xe9\'\n\x08Instance\x12S\n\ngcs_source\x18\x17 \x01(\x0b\x32\x35.google.cloud.memorystore.v1.Instance.GcsBackupSourceB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12\x62\n\x15managed_backup_source\x18\x18 \x01(\x0b\x32\x39.google.cloud.memorystore.v1.Instance.ManagedBackupSourceB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\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\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.memorystore.v1.Instance.LabelsEntryB\x03\xe0\x41\x01\x12?\n\x05state\x18\x05 \x01(\x0e\x32+.google.cloud.memorystore.v1.Instance.StateB\x03\xe0\x41\x03\x12H\n\nstate_info\x18\x06 \x01(\x0b\x32/.google.cloud.memorystore.v1.Instance.StateInfoB\x03\xe0\x41\x03\x12\x18\n\x03uid\x18\x07 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1f\n\rreplica_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12[\n\x12\x61uthorization_mode\x18\t \x01(\x0e\x32\x37.google.cloud.memorystore.v1.Instance.AuthorizationModeB\x06\xe0\x41\x01\xe0\x41\x05\x12\x64\n\x17transit_encryption_mode\x18\n \x01(\x0e\x32;.google.cloud.memorystore.v1.Instance.TransitEncryptionModeB\x06\xe0\x41\x01\xe0\x41\x05\x12\x18\n\x0bshard_count\x18\x0b \x01(\x05\x42\x03\xe0\x41\x01\x12R\n\x13\x64iscovery_endpoints\x18\x0c \x03(\x0b\x32..google.cloud.memorystore.v1.DiscoveryEndpointB\x05\x18\x01\xe0\x41\x03\x12\x46\n\tnode_type\x18\r \x01(\x0e\x32..google.cloud.memorystore.v1.Instance.NodeTypeB\x03\xe0\x41\x01\x12O\n\x12persistence_config\x18\x0e \x01(\x0b\x32..google.cloud.memorystore.v1.PersistenceConfigB\x03\xe0\x41\x01\x12\x1b\n\x0e\x65ngine_version\x18\x0f \x01(\tB\x03\xe0\x41\x01\x12U\n\x0e\x65ngine_configs\x18\x10 \x03(\x0b\x32\x38.google.cloud.memorystore.v1.Instance.EngineConfigsEntryB\x03\xe0\x41\x01\x12\x41\n\x0bnode_config\x18\x11 \x01(\x0b\x32\'.google.cloud.memorystore.v1.NodeConfigB\x03\xe0\x41\x03\x12]\n\x18zone_distribution_config\x18\x12 \x01(\x0b\x32\x33.google.cloud.memorystore.v1.ZoneDistributionConfigB\x06\xe0\x41\x01\xe0\x41\x05\x12-\n\x1b\x64\x65letion_protection_enabled\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12V\n\x14psc_auto_connections\x18\x14 \x03(\x0b\x32..google.cloud.memorystore.v1.PscAutoConnectionB\x08\x18\x01\xe0\x41\x01\xe0\x41\x05\x12U\n\x16psc_attachment_details\x18\x15 \x03(\x0b\x32\x30.google.cloud.memorystore.v1.PscAttachmentDetailB\x03\xe0\x41\x03\x12N\n\tendpoints\x18\x19 \x03(\x0b\x32\x36.google.cloud.memorystore.v1.Instance.InstanceEndpointB\x03\xe0\x41\x01\x12=\n\x04mode\x18\x1a \x01(\x0e\x32*.google.cloud.memorystore.v1.Instance.ModeB\x03\xe0\x41\x01\x12/\n\x1asimulate_maintenance_event\x18\x1b \x01(\x08\x42\x06\xe0\x41\x01\xe0\x41\x04H\x03\x88\x01\x01\x12+\n\x14ondemand_maintenance\x18\x1c \x01(\x08\x42\x08\x18\x01\xe0\x41\x01\xe0\x41\x04H\x04\x88\x01\x01\x12\"\n\rsatisfies_pzs\x18\x1d \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\"\n\rsatisfies_pzi\x18\x1e \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x06\x88\x01\x01\x12O\n\x12maintenance_policy\x18\x1f \x01(\x0b\x32..google.cloud.memorystore.v1.MaintenancePolicyB\x03\xe0\x41\x01\x12S\n\x14maintenance_schedule\x18 \x01(\x0b\x32\x30.google.cloud.memorystore.v1.MaintenanceScheduleB\x03\xe0\x41\x03\x12k\n!cross_instance_replication_config\x18! \x01(\x0b\x32;.google.cloud.memorystore.v1.CrossInstanceReplicationConfigB\x03\xe0\x41\x01\x12;\n)async_instance_endpoints_deletion_enabled\x18, \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12?\n\x07kms_key\x18- \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKeyH\x08\x88\x01\x01\x12I\n\x0f\x65ncryption_info\x18. \x01(\x0b\x32+.google.cloud.memorystore.v1.EncryptionInfoB\x03\xe0\x41\x03\x12S\n\x11\x62\x61\x63kup_collection\x18/ \x01(\tB3\xe0\x41\x03\xfa\x41-\n+memorystore.googleapis.com/BackupCollectionH\t\x88\x01\x01\x12X\n\x17\x61utomated_backup_config\x18\x30 \x01(\x0b\x32\x32.google.cloud.memorystore.v1.AutomatedBackupConfigB\x03\xe0\x41\x01\x12%\n\x13maintenance_version\x18\x31 \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12/\n\x1d\x65\x66\x66\x65\x63tive_maintenance_version\x18\x32 \x01(\tB\x03\xe0\x41\x03H\x0b\x88\x01\x01\x12+\n\x1e\x61vailable_maintenance_versions\x18\x33 \x03(\tB\x03\xe0\x41\x03\x12.\n\x1c\x61llow_fewer_zones_deployment\x18\x36 \x01(\x08\x42\x08\x18\x01\xe0\x41\x01\xe0\x41\x05\x12W\n\x0eserver_ca_mode\x18\x38 \x01(\x0e\x32\x32.google.cloud.memorystore.v1.Instance.ServerCaModeB\x06\xe0\x41\x01\xe0\x41\x05H\x0c\x88\x01\x01\x12G\n\x0eserver_ca_pool\x18\x39 \x01(\tB*\xe0\x41\x01\xe0\x41\x05\xfa\x41!\n\x1fprivateca.googleapis.com/CaPoolH\r\x88\x01\x01\x12.\n\x19rotate_server_certificate\x18: \x01(\x08\x42\x06\xe0\x41\x01\xe0\x41\x04H\x0e\x88\x01\x01\x1a\xa4\x03\n\tStateInfo\x12V\n\x0bupdate_info\x18\x01 \x01(\x0b\x32:.google.cloud.memorystore.v1.Instance.StateInfo.UpdateInfoB\x03\xe0\x41\x03H\x00\x1a\xb6\x02\n\nUpdateInfo\x12$\n\x12target_shard_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12&\n\x14target_replica_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\'\n\x15target_engine_version\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12R\n\x10target_node_type\x18\x04 \x01(\x0e\x32..google.cloud.memorystore.v1.Instance.NodeTypeB\x03\xe0\x41\x03H\x03\x88\x01\x01\x42\x15\n\x13_target_shard_countB\x17\n\x15_target_replica_countB\x18\n\x16_target_engine_versionB\x13\n\x11_target_node_typeB\x06\n\x04info\x1a$\n\x0fGcsBackupSource\x12\x11\n\x04uris\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a*\n\x13ManagedBackupSource\x12\x13\n\x06\x62\x61\x63kup\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x64\n\x10InstanceEndpoint\x12P\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32\x36.google.cloud.memorystore.v1.Instance.ConnectionDetailB\x03\xe0\x41\x01\x1a\xba\x01\n\x10\x43onnectionDetail\x12R\n\x13psc_auto_connection\x18\x01 \x01(\x0b\x32..google.cloud.memorystore.v1.PscAutoConnectionB\x03\xe0\x41\x05H\x00\x12\x44\n\x0epsc_connection\x18\x02 \x01(\x0b\x32*.google.cloud.memorystore.v1.PscConnectionH\x00\x42\x0c\n\nconnection\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x34\n\x12\x45ngineConfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\"X\n\x11\x41uthorizationMode\x12\"\n\x1e\x41UTHORIZATION_MODE_UNSPECIFIED\x10\x00\x12\x11\n\rAUTH_DISABLED\x10\x01\x12\x0c\n\x08IAM_AUTH\x10\x02\"|\n\x15TransitEncryptionMode\x12\'\n#TRANSIT_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bTRANSIT_ENCRYPTION_DISABLED\x10\x01\x12\x19\n\x15SERVER_AUTHENTICATION\x10\x02\"w\n\x08NodeType\x12\x19\n\x15NODE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10SHARED_CORE_NANO\x10\x01\x12\x12\n\x0eHIGHMEM_MEDIUM\x10\x02\x12\x12\n\x0eHIGHMEM_XLARGE\x10\x03\x12\x12\n\x0eSTANDARD_SMALL\x10\x04\"S\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x12\n\nSTANDALONE\x10\x01\x1a\x02\x08\x01\x12\x0b\n\x07\x43LUSTER\x10\x02\x12\x14\n\x10\x43LUSTER_DISABLED\x10\x04\"\xa9\x02\n\x0cServerCaMode\x12\x1e\n\x1aSERVER_CA_MODE_UNSPECIFIED\x10\x00\x12\"\n\x1eGOOGLE_MANAGED_PER_INSTANCE_CA\x10\x01\x12\x1c\n\x18GOOGLE_MANAGED_SHARED_CA\x10\x02\x12\x1b\n\x17\x43USTOMER_MANAGED_CAS_CA\x10\x03\x12\x35\n-SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA\x10\x01\x1a\x02\x08\x01\x12/\n\'SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA\x10\x02\x1a\x02\x08\x01\x12.\n&SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA\x10\x03\x1a\x02\x08\x01\x1a\x02\x10\x01:{\xea\x41x\n#memorystore.googleapis.com/Instance\x12.google.cloud.memorystore.v1.PersistenceConfig.PersistenceModeB\x03\xe0\x41\x01\x12Q\n\nrdb_config\x18\x02 \x01(\x0b\x32\x38.google.cloud.memorystore.v1.PersistenceConfig.RDBConfigB\x03\xe0\x41\x01\x12Q\n\naof_config\x18\x03 \x01(\x0b\x32\x38.google.cloud.memorystore.v1.PersistenceConfig.AOFConfigB\x03\xe0\x41\x01\x1a\xb1\x02\n\tRDBConfig\x12i\n\x13rdb_snapshot_period\x18\x01 \x01(\x0e\x32G.google.cloud.memorystore.v1.PersistenceConfig.RDBConfig.SnapshotPeriodB\x03\xe0\x41\x01\x12@\n\x17rdb_snapshot_start_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"w\n\x0eSnapshotPeriod\x12\x1f\n\x1bSNAPSHOT_PERIOD_UNSPECIFIED\x10\x00\x12\x0c\n\x08ONE_HOUR\x10\x01\x12\r\n\tSIX_HOURS\x10\x02\x12\x10\n\x0cTWELVE_HOURS\x10\x03\x12\x15\n\x11TWENTY_FOUR_HOURS\x10\x04\x1a\xbf\x01\n\tAOFConfig\x12_\n\x0c\x61ppend_fsync\x18\x01 \x01(\x0e\x32\x44.google.cloud.memorystore.v1.PersistenceConfig.AOFConfig.AppendFsyncB\x03\xe0\x41\x01\"Q\n\x0b\x41ppendFsync\x12\x1c\n\x18\x41PPEND_FSYNC_UNSPECIFIED\x10\x00\x12\t\n\x05NEVER\x10\x01\x12\r\n\tEVERY_SEC\x10\x02\x12\n\n\x06\x41LWAYS\x10\x03\"S\n\x0fPersistenceMode\x12 \n\x1cPERSISTENCE_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x07\n\x03RDB\x10\x02\x12\x07\n\x03\x41OF\x10\x03\"\"\n\nNodeConfig\x12\x14\n\x07size_gb\x18\x01 \x01(\x01\x42\x03\xe0\x41\x03\"\xe9\x01\n\x16ZoneDistributionConfig\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12[\n\x04mode\x18\x01 \x01(\x0e\x32H.google.cloud.memorystore.v1.ZoneDistributionConfig.ZoneDistributionModeB\x03\xe0\x41\x01\"_\n\x14ZoneDistributionMode\x12&\n\"ZONE_DISTRIBUTION_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nMULTI_ZONE\x10\x01\x12\x0f\n\x0bSINGLE_ZONE\x10\x02\"\xce\x02\n\x1cRescheduleMaintenanceRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\x12\x66\n\x0freschedule_type\x18\x02 \x01(\x0e\x32H.google.cloud.memorystore.v1.RescheduleMaintenanceRequest.RescheduleTypeB\x03\xe0\x41\x02\x12\x36\n\rschedule_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"S\n\x0eRescheduleType\x12\x1f\n\x1bRESCHEDULE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tIMMEDIATE\x10\x01\x12\x11\n\rSPECIFIC_TIME\x10\x03\"\xb0\x01\n\x14ListInstancesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#memorystore.googleapis.com/Instance\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x7f\n\x15ListInstancesResponse\x12\x38\n\tinstances\x18\x01 \x03(\x0b\x32%.google.cloud.memorystore.v1.Instance\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"O\n\x12GetInstanceRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\"\xcd\x01\n\x15\x43reateInstanceRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#memorystore.googleapis.com/Instance\x12\x18\n\x0binstance_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\x08instance\x18\x03 \x01(\x0b\x32%.google.cloud.memorystore.v1.InstanceB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xac\x01\n\x15UpdateInstanceRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12<\n\x08instance\x18\x02 \x01(\x0b\x32%.google.cloud.memorystore.v1.InstanceB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"s\n\x15\x44\x65leteInstanceRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x94\x01\n\x1cListBackupCollectionsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+memorystore.googleapis.com/BackupCollection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x98\x01\n\x1dListBackupCollectionsResponse\x12I\n\x12\x62\x61\x63kup_collections\x18\x01 \x03(\x0b\x32-.google.cloud.memorystore.v1.BackupCollection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x1aGetBackupCollectionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+memorystore.googleapis.com/BackupCollection\"\x80\x01\n\x12ListBackupsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!memorystore.googleapis.com/Backup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"y\n\x13ListBackupsResponse\x12\x34\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32#.google.cloud.memorystore.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"K\n\x10GetBackupRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!memorystore.googleapis.com/Backup\"o\n\x13\x44\x65leteBackupRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!memorystore.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"s\n\x13\x45xportBackupRequest\x12\x14\n\ngcs_bucket\x18\x02 \x01(\tH\x00\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!memorystore.googleapis.com/BackupB\r\n\x0b\x64\x65stination\"\xaa\x01\n\x15\x42\x61\x63kupInstanceRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\x12+\n\x03ttl\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x1b\n\tbackup_id\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0c\n\n_backup_id\"[\n\x1eGetCertificateAuthorityRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\"\x89\x04\n\x14\x43\x65rtificateAuthority\x12j\n\x11managed_server_ca\x18\x02 \x01(\x0b\x32M.google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthorityH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x1a\xab\x01\n\x1bManagedCertificateAuthority\x12i\n\x08\x63\x61_certs\x18\x01 \x03(\x0b\x32W.google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain\x1a!\n\tCertChain\x12\x14\n\x0c\x63\x65rtificates\x18\x01 \x03(\t:\xb6\x01\xea\x41\xb2\x01\n/memorystore.googleapis.com/CertificateAuthority\x12Qprojects/{project}/locations/{location}/instances/{instance}/certificateAuthority*\x16\x63\x65rtificateAuthorities2\x14\x63\x65rtificateAuthorityB\x0b\n\tserver_ca\"\x80\x05\n\"SharedRegionalCertificateAuthority\x12\x80\x01\n\x11managed_server_ca\x18\x02 \x01(\x0b\x32\x63.google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthorityH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x1a\xda\x01\n#RegionalManagedCertificateAuthority\x12\x87\x01\n\x08\x63\x61_certs\x18\x01 \x03(\x0b\x32u.google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain\x1a)\n\x11RegionalCertChain\x12\x14\n\x0c\x63\x65rtificates\x18\x01 \x03(\t:\xd9\x01\xea\x41\xd5\x01\n=memorystore.googleapis.com/SharedRegionalCertificateAuthority\x12Jprojects/{project}/locations/{location}/sharedRegionalCertificateAuthority*$sharedRegionalCertificateAuthorities2\"sharedRegionalCertificateAuthorityB\x0b\n\tserver_ca\"\x83\x01\n,GetSharedRegionalCertificateAuthorityRequest\x12S\n\x04name\x18\x01 \x01(\tBE\xe0\x41\x02\xfa\x41?\n=memorystore.googleapis.com/SharedRegionalCertificateAuthority\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xf6\x04\n\x0e\x45ncryptionInfo\x12N\n\x0f\x65ncryption_type\x18\x01 \x01(\x0e\x32\x30.google.cloud.memorystore.v1.EncryptionInfo.TypeB\x03\xe0\x41\x03\x12J\n\x10kms_key_versions\x18\x02 \x03(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12[\n\x15kms_key_primary_state\x18\x03 \x01(\x0e\x32\x37.google.cloud.memorystore.v1.EncryptionInfo.KmsKeyStateB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\\\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x01\x12\x1f\n\x1b\x43USTOMER_MANAGED_ENCRYPTION\x10\x02\"\xd1\x01\n\x0bKmsKeyState\x12\x1d\n\x19KMS_KEY_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03\x12\r\n\tDESTROYED\x10\x04\x12\x15\n\x11\x44\x45STROY_SCHEDULED\x10\x05\x12 \n\x1c\x45KM_KEY_UNREACHABLE_DETECTED\x10\x06\x12\x14\n\x10\x42ILLING_DISABLED\x10\x07\x12\x13\n\x0fUNKNOWN_FAILURE\x10\x08*W\n\x13PscConnectionStatus\x12%\n!PSC_CONNECTION_STATUS_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\r\n\tNOT_FOUND\x10\x02*\x89\x01\n\x0e\x43onnectionType\x12\x1f\n\x1b\x43ONNECTION_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x43ONNECTION_TYPE_DISCOVERY\x10\x01\x12\x1b\n\x17\x43ONNECTION_TYPE_PRIMARY\x10\x02\x12\x1a\n\x16\x43ONNECTION_TYPE_READER\x10\x03\x32\xe3\x19\n\x0bMemorystore\x12\xb6\x01\n\rListInstances\x12\x31.google.cloud.memorystore.v1.ListInstancesRequest\x1a\x32.google.cloud.memorystore.v1.ListInstancesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/instances\x12\xa3\x01\n\x0bGetInstance\x12/.google.cloud.memorystore.v1.GetInstanceRequest\x1a%.google.cloud.memorystore.v1.Instance\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/instances/*}\x12\xe2\x01\n\x0e\x43reateInstance\x12\x32.google.cloud.memorystore.v1.CreateInstanceRequest\x1a\x1d.google.longrunning.Operation\"}\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x1bparent,instance,instance_id\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/instances:\x08instance\x12\xe4\x01\n\x0eUpdateInstance\x12\x32.google.cloud.memorystore.v1.UpdateInstanceRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x14instance,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{instance.name=projects/*/locations/*/instances/*}:\x08instance\x12\xce\x01\n\x0e\x44\x65leteInstance\x12\x32.google.cloud.memorystore.v1.DeleteInstanceRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/instances/*}\x12\xdc\x01\n\x17GetCertificateAuthority\x12;.google.cloud.memorystore.v1.GetCertificateAuthorityRequest\x1a\x31.google.cloud.memorystore.v1.CertificateAuthority\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/instances/*}/certificateAuthority\x12\x88\x02\n%GetSharedRegionalCertificateAuthority\x12I.google.cloud.memorystore.v1.GetSharedRegionalCertificateAuthorityRequest\x1a?.google.cloud.memorystore.v1.SharedRegionalCertificateAuthority\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=projects/*/locations/*/sharedRegionalCertificateAuthority}\x12\x87\x02\n\x15RescheduleMaintenance\x12\x39.google.cloud.memorystore.v1.RescheduleMaintenanceRequest\x1a\x1d.google.longrunning.Operation\"\x93\x01\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\"name,reschedule_type,schedule_time\x82\xd3\xe4\x93\x02H\"C/v1/{name=projects/*/locations/*/instances/*}:rescheduleMaintenance:\x01*\x12\xd6\x01\n\x15ListBackupCollections\x12\x39.google.cloud.memorystore.v1.ListBackupCollectionsRequest\x1a:.google.cloud.memorystore.v1.ListBackupCollectionsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/backupCollections\x12\xc3\x01\n\x13GetBackupCollection\x12\x37.google.cloud.memorystore.v1.GetBackupCollectionRequest\x1a-.google.cloud.memorystore.v1.BackupCollection\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/backupCollections/*}\x12\xc2\x01\n\x0bListBackups\x12/.google.cloud.memorystore.v1.ListBackupsRequest\x1a\x30.google.cloud.memorystore.v1.ListBackupsResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/locations/*/backupCollections/*}/backups\x12\xaf\x01\n\tGetBackup\x12-.google.cloud.memorystore.v1.GetBackupRequest\x1a#.google.cloud.memorystore.v1.Backup\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xdc\x01\n\x0c\x44\x65leteBackup\x12\x30.google.cloud.memorystore.v1.DeleteBackupRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xd0\x01\n\x0c\x45xportBackup\x12\x30.google.cloud.memorystore.v1.ExportBackupRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02K\"F/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}:export:\x01*\x12\xcb\x01\n\x0e\x42\x61\x63kupInstance\x12\x32.google.cloud.memorystore.v1.BackupInstanceRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/v1/{name=projects/*/locations/*/instances/*}:backup:\x01*\x1aN\xca\x41\x1amemorystore.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x90\x07\n\x1f\x63om.google.cloud.memorystore.v1B\x0bV1mainProtoP\x01ZAcloud.google.com/go/memorystore/apiv1/memorystorepb;memorystorepb\xaa\x02\x1bGoogle.Cloud.Memorystore.V1\xca\x02\x1bGoogle\\Cloud\\Memorystore\\V1\xea\x02\x1eGoogle::Cloud::Memorystore::V1\xea\x41n\n%compute.googleapis.com/ForwardingRule\x12\x45projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}\xea\x41w\n(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}\xea\x41\\\n\x1fprivateca.googleapis.com/CaPool\x12\x39projects/{project}/locations/{location}/caPools/{ca_pool}b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) @@ -39,6 +39,7 @@ module V1 Instance::TransitEncryptionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.TransitEncryptionMode").enummodule Instance::NodeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.NodeType").enummodule Instance::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.Mode").enummodule + Instance::ServerCaMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.ServerCaMode").enummodule AutomatedBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.AutomatedBackupConfig").msgclass AutomatedBackupConfig::FixedFrequencySchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.AutomatedBackupConfig.FixedFrequencySchedule").msgclass AutomatedBackupConfig::AutomatedBackupMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.AutomatedBackupConfig.AutomatedBackupMode").enummodule @@ -88,6 +89,10 @@ module V1 CertificateAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.CertificateAuthority").msgclass CertificateAuthority::ManagedCertificateAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority").msgclass CertificateAuthority::ManagedCertificateAuthority::CertChain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain").msgclass + SharedRegionalCertificateAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.SharedRegionalCertificateAuthority").msgclass + SharedRegionalCertificateAuthority::RegionalManagedCertificateAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority").msgclass + SharedRegionalCertificateAuthority::RegionalManagedCertificateAuthority::RegionalCertChain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain").msgclass + GetSharedRegionalCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.GetSharedRegionalCertificateAuthorityRequest").msgclass OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.OperationMetadata").msgclass EncryptionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.EncryptionInfo").msgclass EncryptionInfo::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.EncryptionInfo.Type").enummodule diff --git a/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_services_pb.rb b/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_services_pb.rb index 8f221a66807d..7f62a037cedc 100644 --- a/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_services_pb.rb +++ b/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_services_pb.rb @@ -45,6 +45,9 @@ class Service rpc :DeleteInstance, ::Google::Cloud::Memorystore::V1::DeleteInstanceRequest, ::Google::Longrunning::Operation # Gets details about the certificate authority for an Instance. rpc :GetCertificateAuthority, ::Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest, ::Google::Cloud::Memorystore::V1::CertificateAuthority + # Gets the details of shared regional certificate authority information for + # Memorystore instance. + rpc :GetSharedRegionalCertificateAuthority, ::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest, ::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority # Reschedules upcoming maintenance event. rpc :RescheduleMaintenance, ::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest, ::Google::Longrunning::Operation # Lists all backup collections owned by a consumer project in either the diff --git a/google-cloud-memorystore-v1/proto_docs/google/api/client.rb b/google-cloud-memorystore-v1/proto_docs/google/api/client.rb index 483a6510978e..a8b1b06d1cad 100644 --- a/google-cloud-memorystore-v1/proto_docs/google/api/client.rb +++ b/google-cloud-memorystore-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # 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 @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!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 @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # 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 @@ -428,6 +458,77 @@ class SelectiveGapicGeneration 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 @@ -469,5 +570,20 @@ module ClientLibraryDestination # 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-memorystore-v1/proto_docs/google/cloud/memorystore/v1/memorystore.rb b/google-cloud-memorystore-v1/proto_docs/google/cloud/memorystore/v1/memorystore.rb index d5506e52efe3..44b2dc3aa075 100644 --- a/google-cloud-memorystore-v1/proto_docs/google/cloud/memorystore/v1/memorystore.rb +++ b/google-cloud-memorystore-v1/proto_docs/google/cloud/memorystore/v1/memorystore.rb @@ -176,6 +176,17 @@ module V1 # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Boolean] # Optional. Immutable. Deprecated, do not use. + # @!attribute [rw] server_ca_mode + # @return [::Google::Cloud::Memorystore::V1::Instance::ServerCaMode] + # Optional. Immutable. The Server CA mode for the instance. + # @!attribute [rw] server_ca_pool + # @return [::String] + # Optional. Immutable. The customer-managed CA pool for the instance. Only + # applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format: + # "projects/\\{project}/locations/\\{region}/caPools/\\{ca_pool}". + # @!attribute [rw] rotate_server_certificate + # @return [::Boolean] + # Optional. Input only. Rotate the server certificates. class Instance include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -354,6 +365,30 @@ module Mode # Cluster mode is disabled for the instance. CLUSTER_DISABLED = 4 end + + # The Server CA mode for the instance. + module ServerCaMode + # Server CA mode not specified. + SERVER_CA_MODE_UNSPECIFIED = 0 + + # Each instance has its own Google-managed CA. + GOOGLE_MANAGED_PER_INSTANCE_CA = 1 + + # The instance uses a Google-managed shared CA for the instance's region. + GOOGLE_MANAGED_SHARED_CA = 2 + + # The instance uses a customer-managed CA from CAS. + CUSTOMER_MANAGED_CAS_CA = 3 + + # Deprecated: Use GOOGLE_MANAGED_PER_INSTANCE_CA instead. + SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA = 1 + + # Deprecated: Use GOOGLE_MANAGED_SHARED_CA instead. + SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA = 2 + + # Deprecated: Use CUSTOMER_MANAGED_CAS_CA instead. + SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA = 3 + end end # The automated backup config for an instance. @@ -1278,6 +1313,51 @@ class CertChain end end + # Shared regional certificate authority for an instance. + # @!attribute [rw] managed_server_ca + # @return [::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority::RegionalManagedCertificateAuthority] + # CA certificate chains for memorystore managed server authentication. + # @!attribute [rw] name + # @return [::String] + # Identifier. Unique name of the resource in this scope including project and + # location using the form: + # `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority` + class SharedRegionalCertificateAuthority + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # CA certificate chains for memorystore managed server authentication. + # @!attribute [rw] ca_certs + # @return [::Array<::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority::RegionalManagedCertificateAuthority::RegionalCertChain>] + # The PEM encoded CA certificate chains for memorystore managed + # server authentication + class RegionalManagedCertificateAuthority + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The certificates that form the CA chain, from leaf to root order. + # @!attribute [rw] certificates + # @return [::Array<::String>] + # The certificates that form the CA chain, from leaf to root order. + class RegionalCertChain + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Request for + # {::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_shared_regional_certificate_authority GetSharedRegionalCertificateAuthority}. + # @!attribute [rw] name + # @return [::String] + # Required. Regional certificate authority resource name using the form: + # `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority` + # where `location_id` refers to a Google Cloud region. + class GetSharedRegionalCertificateAuthorityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Represents the metadata of a long-running operation. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] diff --git a/google-cloud-memorystore-v1/proto_docs/google/type/timeofday.rb b/google-cloud-memorystore-v1/proto_docs/google/type/timeofday.rb index 2945a0388a91..7398716a2aa5 100644 --- a/google-cloud-memorystore-v1/proto_docs/google/type/timeofday.rb +++ b/google-cloud-memorystore-v1/proto_docs/google/type/timeofday.rb @@ -25,18 +25,22 @@ module Type # `google.protobuf.Timestamp`. # @!attribute [rw] hours # @return [::Integer] - # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose - # to allow the value "24:00:00" for scenarios like business closing time. + # Hours of a day in 24 hour format. Must be greater than or equal to 0 and + # typically must be less than or equal to 23. An API may choose to allow the + # value "24:00:00" for scenarios like business closing time. # @!attribute [rw] minutes # @return [::Integer] - # Minutes of hour of day. Must be from 0 to 59. + # Minutes of an hour. Must be greater than or equal to 0 and less than or + # equal to 59. # @!attribute [rw] seconds # @return [::Integer] - # Seconds of minutes of the time. Must normally be from 0 to 59. An API may - # allow the value 60 if it allows leap-seconds. + # Seconds of a minute. Must be greater than or equal to 0 and typically must + # be less than or equal to 59. An API may allow the value 60 if it allows + # leap-seconds. # @!attribute [rw] nanos # @return [::Integer] - # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + # Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 + # and less than or equal to 999,999,999. class TimeOfDay include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_shared_regional_certificate_authority.rb b/google-cloud-memorystore-v1/snippets/memorystore/get_shared_regional_certificate_authority.rb similarity index 100% rename from owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_shared_regional_certificate_authority.rb rename to google-cloud-memorystore-v1/snippets/memorystore/get_shared_regional_certificate_authority.rb diff --git a/google-cloud-memorystore-v1/snippets/snippet_metadata_google.cloud.memorystore.v1.json b/google-cloud-memorystore-v1/snippets/snippet_metadata_google.cloud.memorystore.v1.json index b2a95e40a598..06c68316fa66 100644 --- a/google-cloud-memorystore-v1/snippets/snippet_metadata_google.cloud.memorystore.v1.json +++ b/google-cloud-memorystore-v1/snippets/snippet_metadata_google.cloud.memorystore.v1.json @@ -251,6 +251,46 @@ } ] }, + { + "region_tag": "memorystore_v1_generated_Memorystore_GetSharedRegionalCertificateAuthority_sync", + "title": "Snippet for the get_shared_regional_certificate_authority call in the Memorystore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_shared_regional_certificate_authority.", + "file": "memorystore/get_shared_regional_certificate_authority.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_shared_regional_certificate_authority", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_shared_regional_certificate_authority", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority", + "client": { + "short_name": "Memorystore::Rest::Client", + "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" + }, + "method": { + "short_name": "GetSharedRegionalCertificateAuthority", + "full_name": "google.cloud.memorystore.v1.Memorystore.GetSharedRegionalCertificateAuthority", + "service": { + "short_name": "Memorystore", + "full_name": "google.cloud.memorystore.v1.Memorystore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, { "region_tag": "memorystore_v1_generated_Memorystore_RescheduleMaintenance_sync", "title": "Snippet for the reschedule_maintenance call in the Memorystore service", diff --git a/google-cloud-memorystore-v1/test/google/cloud/memorystore/v1/memorystore_rest_test.rb b/google-cloud-memorystore-v1/test/google/cloud/memorystore/v1/memorystore_rest_test.rb index 7a6daf8f3ff1..31e1ee88e043 100644 --- a/google-cloud-memorystore-v1/test/google/cloud/memorystore/v1/memorystore_rest_test.rb +++ b/google-cloud-memorystore-v1/test/google/cloud/memorystore/v1/memorystore_rest_test.rb @@ -412,6 +412,60 @@ def test_get_certificate_authority end end + def test_get_shared_regional_certificate_authority + # Create test objects. + client_result = ::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_shared_regional_certificate_authority_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_get_shared_regional_certificate_authority_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_shared_regional_certificate_authority_client_stub do + # Create client + client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_shared_regional_certificate_authority({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_shared_regional_certificate_authority name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_shared_regional_certificate_authority ::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_shared_regional_certificate_authority({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_shared_regional_certificate_authority(::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_shared_regional_certificate_authority_client_stub.call_count + end + end + end + def test_reschedule_maintenance # Create test objects. client_result = ::Google::Longrunning::Operation.new diff --git a/owl-bot-staging/google-cloud-memorystore-v1/.gitignore b/owl-bot-staging/google-cloud-memorystore-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -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/owl-bot-staging/google-cloud-memorystore-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-memorystore-v1/.repo-metadata.json deleted file mode 100644 index ae6a536c0217..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "memorystore.googleapis.com", - "api_shortname": "memorystore", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1/latest", - "distribution_name": "google-cloud-memorystore-v1", - "is_cloud": true, - "language": "ruby", - "name": "memorystore", - "name_pretty": "Memorystore V1 API", - "product_documentation": "https://cloud.google.com/memorystore/docs/valkey", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "google-cloud-memorystore-v1 is the official client library for the Memorystore V1 API. Note that google-cloud-memorystore-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-memorystore instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/memorystore/docs/valkey", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-memorystore-v1/.rubocop.yml b/owl-bot-staging/google-cloud-memorystore-v1/.rubocop.yml deleted file mode 100644 index 6ca03107a3bf..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-memorystore-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-memorystore-v1.rb" diff --git a/owl-bot-staging/google-cloud-memorystore-v1/.toys.rb b/owl-bot-staging/google-cloud-memorystore-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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/owl-bot-staging/google-cloud-memorystore-v1/.yardopts b/owl-bot-staging/google-cloud-memorystore-v1/.yardopts deleted file mode 100644 index 5b462b7f3ad0..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Memorystore V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-memorystore-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-memorystore-v1/AUTHENTICATION.md deleted file mode 100644 index 557b1fbb3672..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-memorystore-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-memorystore-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/memorystore/v1" - -client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/memorystore/v1" - -::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::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-memorystore-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/memorystore/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::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/owl-bot-staging/google-cloud-memorystore-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-memorystore-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-memorystore-v1/Gemfile b/owl-bot-staging/google-cloud-memorystore-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-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/owl-bot-staging/google-cloud-memorystore-v1/LICENSE.md b/owl-bot-staging/google-cloud-memorystore-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/owl-bot-staging/google-cloud-memorystore-v1/README.md b/owl-bot-staging/google-cloud-memorystore-v1/README.md deleted file mode 100644 index c3231ee7bbe2..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Memorystore V1 API - -API Client library for the Memorystore V1 API - -google-cloud-memorystore-v1 is the official client library for the Memorystore V1 API. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Memorystore V1 API. Most users should consider using -the main client gem, -[google-cloud-memorystore](https://rubygems.org/gems/google-cloud-memorystore). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-memorystore-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/memorystore.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/memorystore/v1" - -client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new -request = ::Google::Cloud::Memorystore::V1::ListInstancesRequest.new # (request fields as keyword arguments...) -response = client.list_instances request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/memorystore/docs/valkey) -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/memorystore/v1" -require "logger" - -client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::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.0+. - -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-memorystore`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-memorystore-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-memorystore`. -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-memorystore-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. diff --git a/owl-bot-staging/google-cloud-memorystore-v1/Rakefile b/owl-bot-staging/google-cloud-memorystore-v1/Rakefile deleted file mode 100644 index 74f59275b399..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 "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-memorystore-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/memorystore/v1/memorystore/credentials" - ::Google::Cloud::Memorystore::V1::Memorystore::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-memorystore-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-memorystore-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-memorystore-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-memorystore-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-memorystore-v1" - header "google-cloud-memorystore-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-memorystore-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-memorystore-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-memorystore-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-memorystore-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/owl-bot-staging/google-cloud-memorystore-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-memorystore-v1/gapic_metadata.json deleted file mode 100644 index 87d428ba0d71..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/gapic_metadata.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.memorystore.v1", - "libraryPackage": "::Google::Cloud::Memorystore::V1", - "services": { - "Memorystore": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Memorystore::V1::Memorystore::Client", - "rpcs": { - "ListInstances": { - "methods": [ - "list_instances" - ] - }, - "GetInstance": { - "methods": [ - "get_instance" - ] - }, - "CreateInstance": { - "methods": [ - "create_instance" - ] - }, - "UpdateInstance": { - "methods": [ - "update_instance" - ] - }, - "DeleteInstance": { - "methods": [ - "delete_instance" - ] - }, - "GetCertificateAuthority": { - "methods": [ - "get_certificate_authority" - ] - }, - "GetSharedRegionalCertificateAuthority": { - "methods": [ - "get_shared_regional_certificate_authority" - ] - }, - "RescheduleMaintenance": { - "methods": [ - "reschedule_maintenance" - ] - }, - "ListBackupCollections": { - "methods": [ - "list_backup_collections" - ] - }, - "GetBackupCollection": { - "methods": [ - "get_backup_collection" - ] - }, - "ListBackups": { - "methods": [ - "list_backups" - ] - }, - "GetBackup": { - "methods": [ - "get_backup" - ] - }, - "DeleteBackup": { - "methods": [ - "delete_backup" - ] - }, - "ExportBackup": { - "methods": [ - "export_backup" - ] - }, - "BackupInstance": { - "methods": [ - "backup_instance" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-memorystore-v1/google-cloud-memorystore-v1.gemspec b/owl-bot-staging/google-cloud-memorystore-v1/google-cloud-memorystore-v1.gemspec deleted file mode 100644 index a0557c2b15f5..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/google-cloud-memorystore-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/memorystore/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-memorystore-v1" - gem.version = Google::Cloud::Memorystore::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "google-cloud-memorystore-v1 is the official client library for the Memorystore V1 API. Note that google-cloud-memorystore-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-memorystore instead. See the readme for more details." - gem.summary = "API Client library for the Memorystore V1 API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google-cloud-memorystore-v1.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google-cloud-memorystore-v1.rb deleted file mode 100644 index 0bee6d7afd0e..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/lib/google-cloud-memorystore-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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/memorystore/v1" diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1.rb deleted file mode 100644 index 76ec75f7cb15..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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/memorystore/v1/memorystore" -require "google/cloud/memorystore/v1/version" - -module Google - module Cloud - module Memorystore - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/memorystore/v1" - # client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/memorystore/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/bindings_override.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/bindings_override.rb deleted file mode 100644 index 01102cd86502..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/bindings_override.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 Memorystore - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/memorystore/v1/rest" - # client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Memorystore"] - 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 - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore.rb deleted file mode 100644 index ee8efee2e0e2..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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/config" -require "gapic/config/method" - -require "google/cloud/memorystore/v1/version" - -require "google/cloud/memorystore/v1/memorystore/credentials" -require "google/cloud/memorystore/v1/memorystore/paths" -require "google/cloud/memorystore/v1/memorystore/rest" - -module Google - module Cloud - module Memorystore - module V1 - ## - # Service describing handlers for resources - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/memorystore/v1/memorystore/rest" - # client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - module Memorystore - end - end - end - end -end - -helper_path = ::File.join __dir__, "memorystore", "helpers.rb" -require "google/cloud/memorystore/v1/memorystore/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/credentials.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/credentials.rb deleted file mode 100644 index f831a48ac265..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 Memorystore - module V1 - module Memorystore - # Credentials for the Memorystore 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/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/paths.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/paths.rb deleted file mode 100644 index 44fa4260f014..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/paths.rb +++ /dev/null @@ -1,244 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 Memorystore - module V1 - module Memorystore - # Path helper methods for the Memorystore API. - module Paths - ## - # Create a fully-qualified Backup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupCollections/{backup_collection}/backups/{backup}` - # - # @param project [String] - # @param location [String] - # @param backup_collection [String] - # @param backup [String] - # - # @return [::String] - def backup_path project:, location:, backup_collection:, backup: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "backup_collection cannot contain /" if backup_collection.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupCollections/#{backup_collection}/backups/#{backup}" - end - - ## - # Create a fully-qualified BackupCollection resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupCollections/{backup_collection}` - # - # @param project [String] - # @param location [String] - # @param backup_collection [String] - # - # @return [::String] - def backup_collection_path project:, location:, backup_collection: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupCollections/#{backup_collection}" - end - - ## - # Create a fully-qualified CaPool resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/caPools/{ca_pool}` - # - # @param project [String] - # @param location [String] - # @param ca_pool [String] - # - # @return [::String] - def ca_pool_path project:, location:, ca_pool: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/caPools/#{ca_pool}" - end - - ## - # Create a fully-qualified CryptoKey resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` - # - # @param project [String] - # @param location [String] - # @param key_ring [String] - # @param crypto_key [String] - # - # @return [::String] - def crypto_key_path project:, location:, key_ring:, crypto_key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" - end - - ## - # Create a fully-qualified CryptoKeyVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` - # - # @param project [String] - # @param location [String] - # @param key_ring [String] - # @param crypto_key [String] - # @param crypto_key_version [String] - # - # @return [::String] - def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" - raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" - end - - ## - # Create a fully-qualified ForwardingRule resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}` - # - # @param project [String] - # @param region [String] - # @param forwarding_rule [String] - # - # @return [::String] - def forwarding_rule_path project:, region:, forwarding_rule: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" - - "projects/#{project}/regions/#{region}/forwardingRules/#{forwarding_rule}" - end - - ## - # 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 - - ## - # Create a fully-qualified Network resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/global/networks/{network}` - # - # @param project [String] - # @param network [String] - # - # @return [::String] - def network_path project:, network: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/global/networks/#{network}" - end - - ## - # Create a fully-qualified ServiceAttachment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}` - # - # @param project [String] - # @param region [String] - # @param service_attachment [String] - # - # @return [::String] - def service_attachment_path project:, region:, service_attachment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" - - "projects/#{project}/regions/#{region}/serviceAttachments/#{service_attachment}" - end - - ## - # Create a fully-qualified SharedRegionalCertificateAuthority resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def shared_regional_certificate_authority_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}/sharedRegionalCertificateAuthority" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest.rb deleted file mode 100644 index 013b8ba79f84..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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/memorystore/v1/version" -require "google/cloud/memorystore/v1/bindings_override" - -require "google/cloud/memorystore/v1/memorystore/credentials" -require "google/cloud/memorystore/v1/memorystore/paths" -require "google/cloud/memorystore/v1/memorystore/rest/operations" -require "google/cloud/memorystore/v1/memorystore/rest/client" - -module Google - module Cloud - module Memorystore - module V1 - ## - # Service describing handlers for resources - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/memorystore/v1/memorystore/rest" - # client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - module Memorystore - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/memorystore/v1/memorystore/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/client.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/client.rb deleted file mode 100644 index fc1598701e89..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/client.rb +++ /dev/null @@ -1,1896 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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/memorystore/v1/memorystore_pb" -require "google/cloud/memorystore/v1/memorystore/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Memorystore - module V1 - module Memorystore - module Rest - ## - # REST client for the Memorystore service. - # - # Service describing handlers for resources - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "memorystore.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :memorystore_stub - - ## - # Configure the Memorystore Client class. - # - # See {::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Memorystore clients - # ::Google::Cloud::Memorystore::V1::Memorystore::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", "Memorystore", "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_instances.timeout = 60.0 - default_config.rpcs.list_instances.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_instance.timeout = 60.0 - default_config.rpcs.get_instance.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_instance.timeout = 600.0 - - default_config.rpcs.update_instance.timeout = 600.0 - - default_config.rpcs.delete_instance.timeout = 600.0 - - default_config.rpcs.get_certificate_authority.timeout = 60.0 - default_config.rpcs.get_certificate_authority.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Memorystore 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::Memorystore::V1::Memorystore::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 - @memorystore_stub.universe_domain - end - - ## - # Create a new Memorystore REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Memorystore 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::Memorystore::V1::Memorystore::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 - - @memorystore_stub = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @memorystore_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 = @memorystore_stub.endpoint - config.universe_domain = @memorystore_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @memorystore_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Memorystore::V1::Memorystore::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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @memorystore_stub.logger - end - - # Service calls - - ## - # Lists Instances in a given project and location. - # - # @overload list_instances(request, options = nil) - # Pass arguments to `list_instances` via a request object, either of type - # {::Google::Cloud::Memorystore::V1::ListInstancesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Memorystore::V1::ListInstancesRequest, ::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_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_instances` 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 to list instances from. - # Format: projects/\\{project}/locations/\\{location} - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Expression for filtering results. - # @param order_by [::String] - # Optional. Sort results by a defined order. Supported values: "name", - # "create_time". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1::Instance>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1::Instance>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/memorystore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Memorystore::V1::ListInstancesRequest.new - # - # # Call the list_instances method. - # result = client.list_instances 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::Memorystore::V1::Instance. - # p item - # end - # - def list_instances request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::ListInstancesRequest - - # 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_instances.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::Memorystore::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_instances.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_instances.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @memorystore_stub.list_instances request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @memorystore_stub, :list_instances, "instances", 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 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::Memorystore::V1::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Memorystore::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/\\{project}/locations/\\{location}/instances/\\{instance} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Memorystore::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Memorystore::V1::Instance] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/memorystore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Memorystore::V1::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::Memorystore::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::Memorystore::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::Memorystore::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 - - @memorystore_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 - - ## - # Creates a new Instance in a given project and location. - # - # @overload create_instance(request, options = nil) - # Pass arguments to `create_instance` via a request object, either of type - # {::Google::Cloud::Memorystore::V1::CreateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Memorystore::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, request_id: 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. The parent resource where this instance will be created. - # Format: projects/\\{project}/locations/\\{location} - # @param instance_id [::String] - # Required. The ID to use for the instance, which will become the final - # component of the instance's resource name. - # - # This value is subject to the following restrictions: - # - # * Must be 4-63 characters in length - # * Must begin with a letter or digit - # * Must contain only lowercase letters, digits, and hyphens - # * Must not end with a hyphen - # * Must be unique within a location - # @param instance [::Google::Cloud::Memorystore::V1::Instance, ::Hash] - # Required. The instance to create. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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/memorystore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Memorystore::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::Memorystore::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::Memorystore::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 - - @memorystore_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 - - ## - # Updates the parameters of a single Instance. - # - # @overload update_instance(request, options = nil) - # Pass arguments to `update_instance` via a request object, either of type - # {::Google::Cloud::Memorystore::V1::UpdateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Memorystore::V1::UpdateInstanceRequest, ::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_instance(update_mask: nil, instance: nil, request_id: nil) - # Pass arguments to `update_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to be updated on the instance. At least one - # field must be specified. - # @param instance [::Google::Cloud::Memorystore::V1::Instance, ::Hash] - # Required. The instance to update. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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/memorystore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Memorystore::V1::UpdateInstanceRequest.new - # - # # Call the update_instance method. - # result = client.update_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 update_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::UpdateInstanceRequest - - # 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_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::Memorystore::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_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @memorystore_stub.update_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 a single Instance. - # - # @overload delete_instance(request, options = nil) - # Pass arguments to `delete_instance` via a request object, either of type - # {::Google::Cloud::Memorystore::V1::DeleteInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Memorystore::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, request_id: 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/\\{project}/locations/\\{location}/instances/\\{instance} - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @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/memorystore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Memorystore::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::Memorystore::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::Memorystore::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 - - @memorystore_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 about the certificate authority for an Instance. - # - # @overload get_certificate_authority(request, options = nil) - # Pass arguments to `get_certificate_authority` via a request object, either of type - # {::Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest, ::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_certificate_authority(name: nil) - # Pass arguments to `get_certificate_authority` 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 certificate authority. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/certificateAuthority - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Memorystore::V1::CertificateAuthority] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Memorystore::V1::CertificateAuthority] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/memorystore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest.new - # - # # Call the get_certificate_authority method. - # result = client.get_certificate_authority request - # - # # The returned object is of type Google::Cloud::Memorystore::V1::CertificateAuthority. - # p result - # - def get_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest - - # 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_certificate_authority.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::Memorystore::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_certificate_authority.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @memorystore_stub.get_certificate_authority 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 - - ## - # Gets the details of shared regional certificate authority information for - # Memorystore instance. - # - # @overload get_shared_regional_certificate_authority(request, options = nil) - # Pass arguments to `get_shared_regional_certificate_authority` via a request object, either of type - # {::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest, ::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_shared_regional_certificate_authority(name: nil) - # Pass arguments to `get_shared_regional_certificate_authority` 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. Regional certificate authority resource name using the form: - # `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority` - # where `location_id` refers to a Google Cloud region. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/memorystore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest.new - # - # # Call the get_shared_regional_certificate_authority method. - # result = client.get_shared_regional_certificate_authority request - # - # # The returned object is of type Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority. - # p result - # - def get_shared_regional_certificate_authority request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest - - # 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_shared_regional_certificate_authority.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::Memorystore::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_shared_regional_certificate_authority.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_shared_regional_certificate_authority.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @memorystore_stub.get_shared_regional_certificate_authority 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 - - ## - # Reschedules upcoming maintenance event. - # - # @overload reschedule_maintenance(request, options = nil) - # Pass arguments to `reschedule_maintenance` via a request object, either of type - # {::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest, ::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 reschedule_maintenance(name: nil, reschedule_type: nil, schedule_time: nil) - # Pass arguments to `reschedule_maintenance` 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. Name of the instance to reschedule maintenance for: - # `projects/{project}/locations/{location_id}/instances/{instance}` - # @param reschedule_type [::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest::RescheduleType] - # Required. If reschedule type is SPECIFIC_TIME, schedule_time must be set. - # @param schedule_time [::Google::Protobuf::Timestamp, ::Hash] - # Optional. Timestamp when the maintenance shall be rescheduled to if - # reschedule_type=SPECIFIC_TIME, in RFC 3339 format. - # Example: `2012-11-15T16:19:00.094Z`. - # @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/memorystore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest.new - # - # # Call the reschedule_maintenance method. - # result = client.reschedule_maintenance 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 reschedule_maintenance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest - - # 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.reschedule_maintenance.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::Memorystore::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.reschedule_maintenance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.reschedule_maintenance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @memorystore_stub.reschedule_maintenance 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 - - ## - # Lists all backup collections owned by a consumer project in either the - # specified location (region) or all locations. - # - # If `location_id` is specified as `-` (wildcard), then all regions - # available to the project are queried, and the results are aggregated. - # - # @overload list_backup_collections(request, options = nil) - # Pass arguments to `list_backup_collections` via a request object, either of type - # {::Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest, ::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_backup_collections(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_backup_collections` 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 resource name of the backupCollection location using the - # form: - # `projects/{project_id}/locations/{location_id}` - # where `location_id` refers to a Google Cloud region. - # @param page_size [::Integer] - # Optional. The maximum number of items to return. - # - # If not specified, a default value of 1000 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # {::Google::Cloud::Memorystore::V1::ListBackupCollectionsResponse#next_page_token `next_page_token`} - # to determine if there are more clusters left to be queried. - # @param page_token [::String] - # Optional. The `next_page_token` value returned from a previous - # [ListBackupCollections] request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1::BackupCollection>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1::BackupCollection>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/memorystore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest.new - # - # # Call the list_backup_collections method. - # result = client.list_backup_collections 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::Memorystore::V1::BackupCollection. - # p item - # end - # - def list_backup_collections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest - - # 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_backup_collections.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::Memorystore::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_backup_collections.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backup_collections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @memorystore_stub.list_backup_collections request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @memorystore_stub, :list_backup_collections, "backup_collections", 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 - - ## - # Get a backup collection. - # - # @overload get_backup_collection(request, options = nil) - # Pass arguments to `get_backup_collection` via a request object, either of type - # {::Google::Cloud::Memorystore::V1::GetBackupCollectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Memorystore::V1::GetBackupCollectionRequest, ::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_backup_collection(name: nil) - # Pass arguments to `get_backup_collection` 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. Instance backupCollection resource name using the form: - # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` - # where `location_id` refers to a Google Cloud region. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Memorystore::V1::BackupCollection] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Memorystore::V1::BackupCollection] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/memorystore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Memorystore::V1::GetBackupCollectionRequest.new - # - # # Call the get_backup_collection method. - # result = client.get_backup_collection request - # - # # The returned object is of type Google::Cloud::Memorystore::V1::BackupCollection. - # p result - # - def get_backup_collection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::GetBackupCollectionRequest - - # 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_backup_collection.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::Memorystore::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_backup_collection.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup_collection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @memorystore_stub.get_backup_collection 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 backups owned by a backup collection. - # - # @overload list_backups(request, options = nil) - # Pass arguments to `list_backups` via a request object, either of type - # {::Google::Cloud::Memorystore::V1::ListBackupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Memorystore::V1::ListBackupsRequest, ::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_backups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_backups` 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 resource name of the backupCollection using the form: - # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` - # @param page_size [::Integer] - # Optional. The maximum number of items to return. - # - # If not specified, a default value of 1000 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # {::Google::Cloud::Memorystore::V1::ListBackupsResponse#next_page_token `next_page_token`} - # to determine if there are more clusters left to be queried. - # @param page_token [::String] - # Optional. The `next_page_token` value returned from a previous - # [ListBackupCollections] request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1::Backup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Memorystore::V1::Backup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/memorystore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Memorystore::V1::ListBackupsRequest.new - # - # # Call the list_backups method. - # result = client.list_backups 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::Memorystore::V1::Backup. - # p item - # end - # - def list_backups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::ListBackupsRequest - - # 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_backups.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::Memorystore::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_backups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @memorystore_stub.list_backups request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @memorystore_stub, :list_backups, "backups", 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 details of a specific backup. - # - # @overload get_backup(request, options = nil) - # Pass arguments to `get_backup` via a request object, either of type - # {::Google::Cloud::Memorystore::V1::GetBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Memorystore::V1::GetBackupRequest, ::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_backup(name: nil) - # Pass arguments to `get_backup` 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. Instance backup resource name using the form: - # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Memorystore::V1::Backup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Memorystore::V1::Backup] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/memorystore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Memorystore::V1::GetBackupRequest.new - # - # # Call the get_backup method. - # result = client.get_backup request - # - # # The returned object is of type Google::Cloud::Memorystore::V1::Backup. - # p result - # - def get_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::GetBackupRequest - - # 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_backup.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::Memorystore::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_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @memorystore_stub.get_backup 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 specific backup. - # - # @overload delete_backup(request, options = nil) - # Pass arguments to `delete_backup` via a request object, either of type - # {::Google::Cloud::Memorystore::V1::DeleteBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Memorystore::V1::DeleteBackupRequest, ::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_backup(name: nil, request_id: nil) - # Pass arguments to `delete_backup` 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. Instance backup resource name using the form: - # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - # @param request_id [::String] - # Optional. Idempotent request UUID. - # @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/memorystore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Memorystore::V1::DeleteBackupRequest.new - # - # # Call the delete_backup method. - # result = client.delete_backup 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_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::DeleteBackupRequest - - # 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_backup.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::Memorystore::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_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @memorystore_stub.delete_backup 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 - - ## - # Exports a specific backup to a customer target Cloud Storage URI. - # - # @overload export_backup(request, options = nil) - # Pass arguments to `export_backup` via a request object, either of type - # {::Google::Cloud::Memorystore::V1::ExportBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Memorystore::V1::ExportBackupRequest, ::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 export_backup(gcs_bucket: nil, name: nil) - # Pass arguments to `export_backup` 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 gcs_bucket [::String] - # Google Cloud Storage bucket, like "my-bucket". - # @param name [::String] - # Required. Instance backup resource name using the form: - # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - # @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/memorystore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Memorystore::V1::ExportBackupRequest.new - # - # # Call the export_backup method. - # result = client.export_backup 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 export_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::ExportBackupRequest - - # 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.export_backup.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::Memorystore::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.export_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @memorystore_stub.export_backup 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 - - ## - # Backup Instance. - # If this is the first time a backup is being created, a backup collection - # will be created at the backend, and this backup belongs to this collection. - # Both collection and backup will have a resource name. Backup will be - # executed for each shard. A replica (primary if nonHA) will be selected to - # perform the execution. Backup call will be rejected if there is an ongoing - # backup or update operation. Be aware that during preview, if the instance's - # internal software version is too old, critical update will be performed - # before actual backup. Once the internal software version is updated to the - # minimum version required by the backup feature, subsequent backups will not - # require critical update. After preview, there will be no critical update - # needed for backup. - # - # @overload backup_instance(request, options = nil) - # Pass arguments to `backup_instance` via a request object, either of type - # {::Google::Cloud::Memorystore::V1::BackupInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Memorystore::V1::BackupInstanceRequest, ::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 backup_instance(name: nil, ttl: nil, backup_id: nil) - # Pass arguments to `backup_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. Instance resource name using the form: - # `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - # where `location_id` refers to a Google Cloud region. - # @param ttl [::Google::Protobuf::Duration, ::Hash] - # Optional. TTL for the backup to expire. Value range is 1 day to 100 years. - # If not specified, the default value is 100 years. - # @param backup_id [::String] - # Optional. The id of the backup to be created. If not specified, the - # default value ([YYYYMMDDHHMMSS]_[Shortened Instance UID] is used. - # @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/memorystore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Memorystore::V1::BackupInstanceRequest.new - # - # # Call the backup_instance method. - # result = client.backup_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 backup_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memorystore::V1::BackupInstanceRequest - - # 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.backup_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::Memorystore::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.backup_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.backup_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @memorystore_stub.backup_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 - - ## - # Configuration class for the Memorystore REST API. - # - # This class represents the configuration for Memorystore 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::Memorystore::V1::Memorystore::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_instances to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.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. - # * `: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 = "memorystore.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 Memorystore 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_instances` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instances - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - ## - # RPC-specific configuration for `create_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :create_instance - ## - # RPC-specific configuration for `update_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :update_instance - ## - # RPC-specific configuration for `delete_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_instance - ## - # RPC-specific configuration for `get_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate_authority - ## - # RPC-specific configuration for `get_shared_regional_certificate_authority` - # @return [::Gapic::Config::Method] - # - attr_reader :get_shared_regional_certificate_authority - ## - # RPC-specific configuration for `reschedule_maintenance` - # @return [::Gapic::Config::Method] - # - attr_reader :reschedule_maintenance - ## - # RPC-specific configuration for `list_backup_collections` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_collections - ## - # RPC-specific configuration for `get_backup_collection` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_collection - ## - # RPC-specific configuration for `list_backups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backups - ## - # RPC-specific configuration for `get_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup - ## - # RPC-specific configuration for `delete_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup - ## - # RPC-specific configuration for `export_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :export_backup - ## - # RPC-specific configuration for `backup_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :backup_instance - - # @private - def initialize parent_rpcs = nil - list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances - @list_instances = ::Gapic::Config::Method.new list_instances_config - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance - @create_instance = ::Gapic::Config::Method.new create_instance_config - update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance - @update_instance = ::Gapic::Config::Method.new update_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_certificate_authority_config = parent_rpcs.get_certificate_authority if parent_rpcs.respond_to? :get_certificate_authority - @get_certificate_authority = ::Gapic::Config::Method.new get_certificate_authority_config - get_shared_regional_certificate_authority_config = parent_rpcs.get_shared_regional_certificate_authority if parent_rpcs.respond_to? :get_shared_regional_certificate_authority - @get_shared_regional_certificate_authority = ::Gapic::Config::Method.new get_shared_regional_certificate_authority_config - reschedule_maintenance_config = parent_rpcs.reschedule_maintenance if parent_rpcs.respond_to? :reschedule_maintenance - @reschedule_maintenance = ::Gapic::Config::Method.new reschedule_maintenance_config - list_backup_collections_config = parent_rpcs.list_backup_collections if parent_rpcs.respond_to? :list_backup_collections - @list_backup_collections = ::Gapic::Config::Method.new list_backup_collections_config - get_backup_collection_config = parent_rpcs.get_backup_collection if parent_rpcs.respond_to? :get_backup_collection - @get_backup_collection = ::Gapic::Config::Method.new get_backup_collection_config - list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups - @list_backups = ::Gapic::Config::Method.new list_backups_config - get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup - @get_backup = ::Gapic::Config::Method.new get_backup_config - delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup - @delete_backup = ::Gapic::Config::Method.new delete_backup_config - export_backup_config = parent_rpcs.export_backup if parent_rpcs.respond_to? :export_backup - @export_backup = ::Gapic::Config::Method.new export_backup_config - backup_instance_config = parent_rpcs.backup_instance if parent_rpcs.respond_to? :backup_instance - @backup_instance = ::Gapic::Config::Method.new backup_instance_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/operations.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/operations.rb deleted file mode 100644 index 9a993c6f693a..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/operations.rb +++ /dev/null @@ -1,924 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 Memorystore - module V1 - module Memorystore - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "memorystore.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Memorystore 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 Memorystore 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::Memorystore::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::Memorystore::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::Memorystore::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::Memorystore::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. - # * `: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 = "memorystore.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. - # * `: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", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/service_stub.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/service_stub.rb deleted file mode 100644 index 8c8870854cd7..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore/rest/service_stub.rb +++ /dev/null @@ -1,1001 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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/memorystore/v1/memorystore_pb" - -module Google - module Cloud - module Memorystore - module V1 - module Memorystore - module Rest - ## - # REST service stub for the Memorystore 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_instances REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::ListInstancesRequest] - # 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::Memorystore::V1::ListInstancesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Memorystore::V1::ListInstancesResponse] - # A result object deserialized from the server's reply - def list_instances request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_instances_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_instances", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Memorystore::V1::ListInstancesResponse.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::Memorystore::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::Memorystore::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Memorystore::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::Memorystore::V1::Instance.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_instance REST call - # - # @param request_pb [::Google::Cloud::Memorystore::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 update_instance REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::UpdateInstanceRequest] - # 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 update_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_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: "update_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::Memorystore::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_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest] - # 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::Memorystore::V1::CertificateAuthority] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Memorystore::V1::CertificateAuthority] - # A result object deserialized from the server's reply - def get_certificate_authority request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_authority_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_certificate_authority", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Memorystore::V1::CertificateAuthority.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_shared_regional_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest] - # 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::Memorystore::V1::SharedRegionalCertificateAuthority] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority] - # A result object deserialized from the server's reply - def get_shared_regional_certificate_authority request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_shared_regional_certificate_authority_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_shared_regional_certificate_authority", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the reschedule_maintenance REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest] - # 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 reschedule_maintenance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_reschedule_maintenance_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: "reschedule_maintenance", - 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 list_backup_collections REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest] - # 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::Memorystore::V1::ListBackupCollectionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Memorystore::V1::ListBackupCollectionsResponse] - # A result object deserialized from the server's reply - def list_backup_collections request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_collections_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_backup_collections", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Memorystore::V1::ListBackupCollectionsResponse.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_backup_collection REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::GetBackupCollectionRequest] - # 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::Memorystore::V1::BackupCollection] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Memorystore::V1::BackupCollection] - # A result object deserialized from the server's reply - def get_backup_collection request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_collection_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_backup_collection", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Memorystore::V1::BackupCollection.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_backups REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::ListBackupsRequest] - # 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::Memorystore::V1::ListBackupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Memorystore::V1::ListBackupsResponse] - # A result object deserialized from the server's reply - def list_backups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_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_backups", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Memorystore::V1::ListBackupsResponse.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_backup REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::GetBackupRequest] - # 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::Memorystore::V1::Backup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Memorystore::V1::Backup] - # A result object deserialized from the server's reply - def get_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_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_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Memorystore::V1::Backup.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_backup REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::DeleteBackupRequest] - # 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_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_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_backup", - 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 export_backup REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::ExportBackupRequest] - # 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 export_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_backup_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: "export_backup", - 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 backup_instance REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::BackupInstanceRequest] - # 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 backup_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_backup_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: "backup_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 - - ## - # @private - # - # GRPC transcoding helper method for the list_instances REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::ListInstancesRequest] - # 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_instances_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/instances", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_instance REST call - # - # @param request_pb [::Google::Cloud::Memorystore::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 - - ## - # @private - # - # GRPC transcoding helper method for the create_instance REST call - # - # @param request_pb [::Google::Cloud::Memorystore::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 update_instance REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::UpdateInstanceRequest] - # 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_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{instance.name}", - body: "instance", - matches: [ - ["instance.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_instance REST call - # - # @param request_pb [::Google::Cloud::Memorystore::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_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest] - # 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_certificate_authority_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/certificateAuthority", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_shared_regional_certificate_authority REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest] - # 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_shared_regional_certificate_authority_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/sharedRegionalCertificateAuthority/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the reschedule_maintenance REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_reschedule_maintenance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:rescheduleMaintenance", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backup_collections REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest] - # 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_backup_collections_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupCollections", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup_collection REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::GetBackupCollectionRequest] - # 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_backup_collection_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backups REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::ListBackupsRequest] - # 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_backups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backups", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::GetBackupRequest] - # 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_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::DeleteBackupRequest] - # 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_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_backup REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::ExportBackupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:export", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the backup_instance REST call - # - # @param request_pb [::Google::Cloud::Memorystore::V1::BackupInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_backup_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:backup", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_pb.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_pb.rb deleted file mode 100644 index e556abc53ee6..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_pb.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/memorystore/v1/memorystore.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/dayofweek_pb' -require 'google/type/timeofday_pb' - - -descriptor_data = "\n-google/cloud/memorystore/v1/memorystore.proto\x12\x1bgoogle.cloud.memorystore.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"\xe9\'\n\x08Instance\x12S\n\ngcs_source\x18\x17 \x01(\x0b\x32\x35.google.cloud.memorystore.v1.Instance.GcsBackupSourceB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12\x62\n\x15managed_backup_source\x18\x18 \x01(\x0b\x32\x39.google.cloud.memorystore.v1.Instance.ManagedBackupSourceB\x06\xe0\x41\x01\xe0\x41\x05H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\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\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.memorystore.v1.Instance.LabelsEntryB\x03\xe0\x41\x01\x12?\n\x05state\x18\x05 \x01(\x0e\x32+.google.cloud.memorystore.v1.Instance.StateB\x03\xe0\x41\x03\x12H\n\nstate_info\x18\x06 \x01(\x0b\x32/.google.cloud.memorystore.v1.Instance.StateInfoB\x03\xe0\x41\x03\x12\x18\n\x03uid\x18\x07 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12\x1f\n\rreplica_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12[\n\x12\x61uthorization_mode\x18\t \x01(\x0e\x32\x37.google.cloud.memorystore.v1.Instance.AuthorizationModeB\x06\xe0\x41\x01\xe0\x41\x05\x12\x64\n\x17transit_encryption_mode\x18\n \x01(\x0e\x32;.google.cloud.memorystore.v1.Instance.TransitEncryptionModeB\x06\xe0\x41\x01\xe0\x41\x05\x12\x18\n\x0bshard_count\x18\x0b \x01(\x05\x42\x03\xe0\x41\x01\x12R\n\x13\x64iscovery_endpoints\x18\x0c \x03(\x0b\x32..google.cloud.memorystore.v1.DiscoveryEndpointB\x05\x18\x01\xe0\x41\x03\x12\x46\n\tnode_type\x18\r \x01(\x0e\x32..google.cloud.memorystore.v1.Instance.NodeTypeB\x03\xe0\x41\x01\x12O\n\x12persistence_config\x18\x0e \x01(\x0b\x32..google.cloud.memorystore.v1.PersistenceConfigB\x03\xe0\x41\x01\x12\x1b\n\x0e\x65ngine_version\x18\x0f \x01(\tB\x03\xe0\x41\x01\x12U\n\x0e\x65ngine_configs\x18\x10 \x03(\x0b\x32\x38.google.cloud.memorystore.v1.Instance.EngineConfigsEntryB\x03\xe0\x41\x01\x12\x41\n\x0bnode_config\x18\x11 \x01(\x0b\x32\'.google.cloud.memorystore.v1.NodeConfigB\x03\xe0\x41\x03\x12]\n\x18zone_distribution_config\x18\x12 \x01(\x0b\x32\x33.google.cloud.memorystore.v1.ZoneDistributionConfigB\x06\xe0\x41\x01\xe0\x41\x05\x12-\n\x1b\x64\x65letion_protection_enabled\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12V\n\x14psc_auto_connections\x18\x14 \x03(\x0b\x32..google.cloud.memorystore.v1.PscAutoConnectionB\x08\x18\x01\xe0\x41\x01\xe0\x41\x05\x12U\n\x16psc_attachment_details\x18\x15 \x03(\x0b\x32\x30.google.cloud.memorystore.v1.PscAttachmentDetailB\x03\xe0\x41\x03\x12N\n\tendpoints\x18\x19 \x03(\x0b\x32\x36.google.cloud.memorystore.v1.Instance.InstanceEndpointB\x03\xe0\x41\x01\x12=\n\x04mode\x18\x1a \x01(\x0e\x32*.google.cloud.memorystore.v1.Instance.ModeB\x03\xe0\x41\x01\x12/\n\x1asimulate_maintenance_event\x18\x1b \x01(\x08\x42\x06\xe0\x41\x01\xe0\x41\x04H\x03\x88\x01\x01\x12+\n\x14ondemand_maintenance\x18\x1c \x01(\x08\x42\x08\x18\x01\xe0\x41\x01\xe0\x41\x04H\x04\x88\x01\x01\x12\"\n\rsatisfies_pzs\x18\x1d \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\"\n\rsatisfies_pzi\x18\x1e \x01(\x08\x42\x06\xe0\x41\x03\xe0\x41\x01H\x06\x88\x01\x01\x12O\n\x12maintenance_policy\x18\x1f \x01(\x0b\x32..google.cloud.memorystore.v1.MaintenancePolicyB\x03\xe0\x41\x01\x12S\n\x14maintenance_schedule\x18 \x01(\x0b\x32\x30.google.cloud.memorystore.v1.MaintenanceScheduleB\x03\xe0\x41\x03\x12k\n!cross_instance_replication_config\x18! \x01(\x0b\x32;.google.cloud.memorystore.v1.CrossInstanceReplicationConfigB\x03\xe0\x41\x01\x12;\n)async_instance_endpoints_deletion_enabled\x18, \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12?\n\x07kms_key\x18- \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKeyH\x08\x88\x01\x01\x12I\n\x0f\x65ncryption_info\x18. \x01(\x0b\x32+.google.cloud.memorystore.v1.EncryptionInfoB\x03\xe0\x41\x03\x12S\n\x11\x62\x61\x63kup_collection\x18/ \x01(\tB3\xe0\x41\x03\xfa\x41-\n+memorystore.googleapis.com/BackupCollectionH\t\x88\x01\x01\x12X\n\x17\x61utomated_backup_config\x18\x30 \x01(\x0b\x32\x32.google.cloud.memorystore.v1.AutomatedBackupConfigB\x03\xe0\x41\x01\x12%\n\x13maintenance_version\x18\x31 \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12/\n\x1d\x65\x66\x66\x65\x63tive_maintenance_version\x18\x32 \x01(\tB\x03\xe0\x41\x03H\x0b\x88\x01\x01\x12+\n\x1e\x61vailable_maintenance_versions\x18\x33 \x03(\tB\x03\xe0\x41\x03\x12.\n\x1c\x61llow_fewer_zones_deployment\x18\x36 \x01(\x08\x42\x08\x18\x01\xe0\x41\x01\xe0\x41\x05\x12W\n\x0eserver_ca_mode\x18\x38 \x01(\x0e\x32\x32.google.cloud.memorystore.v1.Instance.ServerCaModeB\x06\xe0\x41\x01\xe0\x41\x05H\x0c\x88\x01\x01\x12G\n\x0eserver_ca_pool\x18\x39 \x01(\tB*\xe0\x41\x01\xe0\x41\x05\xfa\x41!\n\x1fprivateca.googleapis.com/CaPoolH\r\x88\x01\x01\x12.\n\x19rotate_server_certificate\x18: \x01(\x08\x42\x06\xe0\x41\x01\xe0\x41\x04H\x0e\x88\x01\x01\x1a\xa4\x03\n\tStateInfo\x12V\n\x0bupdate_info\x18\x01 \x01(\x0b\x32:.google.cloud.memorystore.v1.Instance.StateInfo.UpdateInfoB\x03\xe0\x41\x03H\x00\x1a\xb6\x02\n\nUpdateInfo\x12$\n\x12target_shard_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12&\n\x14target_replica_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\'\n\x15target_engine_version\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12R\n\x10target_node_type\x18\x04 \x01(\x0e\x32..google.cloud.memorystore.v1.Instance.NodeTypeB\x03\xe0\x41\x03H\x03\x88\x01\x01\x42\x15\n\x13_target_shard_countB\x17\n\x15_target_replica_countB\x18\n\x16_target_engine_versionB\x13\n\x11_target_node_typeB\x06\n\x04info\x1a$\n\x0fGcsBackupSource\x12\x11\n\x04uris\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a*\n\x13ManagedBackupSource\x12\x13\n\x06\x62\x61\x63kup\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\x64\n\x10InstanceEndpoint\x12P\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32\x36.google.cloud.memorystore.v1.Instance.ConnectionDetailB\x03\xe0\x41\x01\x1a\xba\x01\n\x10\x43onnectionDetail\x12R\n\x13psc_auto_connection\x18\x01 \x01(\x0b\x32..google.cloud.memorystore.v1.PscAutoConnectionB\x03\xe0\x41\x05H\x00\x12\x44\n\x0epsc_connection\x18\x02 \x01(\x0b\x32*.google.cloud.memorystore.v1.PscConnectionH\x00\x42\x0c\n\nconnection\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x34\n\x12\x45ngineConfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08UPDATING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\"X\n\x11\x41uthorizationMode\x12\"\n\x1e\x41UTHORIZATION_MODE_UNSPECIFIED\x10\x00\x12\x11\n\rAUTH_DISABLED\x10\x01\x12\x0c\n\x08IAM_AUTH\x10\x02\"|\n\x15TransitEncryptionMode\x12\'\n#TRANSIT_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bTRANSIT_ENCRYPTION_DISABLED\x10\x01\x12\x19\n\x15SERVER_AUTHENTICATION\x10\x02\"w\n\x08NodeType\x12\x19\n\x15NODE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10SHARED_CORE_NANO\x10\x01\x12\x12\n\x0eHIGHMEM_MEDIUM\x10\x02\x12\x12\n\x0eHIGHMEM_XLARGE\x10\x03\x12\x12\n\x0eSTANDARD_SMALL\x10\x04\"S\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x12\n\nSTANDALONE\x10\x01\x1a\x02\x08\x01\x12\x0b\n\x07\x43LUSTER\x10\x02\x12\x14\n\x10\x43LUSTER_DISABLED\x10\x04\"\xa9\x02\n\x0cServerCaMode\x12\x1e\n\x1aSERVER_CA_MODE_UNSPECIFIED\x10\x00\x12\"\n\x1eGOOGLE_MANAGED_PER_INSTANCE_CA\x10\x01\x12\x1c\n\x18GOOGLE_MANAGED_SHARED_CA\x10\x02\x12\x1b\n\x17\x43USTOMER_MANAGED_CAS_CA\x10\x03\x12\x35\n-SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA\x10\x01\x1a\x02\x08\x01\x12/\n\'SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA\x10\x02\x1a\x02\x08\x01\x12.\n&SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA\x10\x03\x1a\x02\x08\x01\x1a\x02\x10\x01:{\xea\x41x\n#memorystore.googleapis.com/Instance\x12.google.cloud.memorystore.v1.PersistenceConfig.PersistenceModeB\x03\xe0\x41\x01\x12Q\n\nrdb_config\x18\x02 \x01(\x0b\x32\x38.google.cloud.memorystore.v1.PersistenceConfig.RDBConfigB\x03\xe0\x41\x01\x12Q\n\naof_config\x18\x03 \x01(\x0b\x32\x38.google.cloud.memorystore.v1.PersistenceConfig.AOFConfigB\x03\xe0\x41\x01\x1a\xb1\x02\n\tRDBConfig\x12i\n\x13rdb_snapshot_period\x18\x01 \x01(\x0e\x32G.google.cloud.memorystore.v1.PersistenceConfig.RDBConfig.SnapshotPeriodB\x03\xe0\x41\x01\x12@\n\x17rdb_snapshot_start_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"w\n\x0eSnapshotPeriod\x12\x1f\n\x1bSNAPSHOT_PERIOD_UNSPECIFIED\x10\x00\x12\x0c\n\x08ONE_HOUR\x10\x01\x12\r\n\tSIX_HOURS\x10\x02\x12\x10\n\x0cTWELVE_HOURS\x10\x03\x12\x15\n\x11TWENTY_FOUR_HOURS\x10\x04\x1a\xbf\x01\n\tAOFConfig\x12_\n\x0c\x61ppend_fsync\x18\x01 \x01(\x0e\x32\x44.google.cloud.memorystore.v1.PersistenceConfig.AOFConfig.AppendFsyncB\x03\xe0\x41\x01\"Q\n\x0b\x41ppendFsync\x12\x1c\n\x18\x41PPEND_FSYNC_UNSPECIFIED\x10\x00\x12\t\n\x05NEVER\x10\x01\x12\r\n\tEVERY_SEC\x10\x02\x12\n\n\x06\x41LWAYS\x10\x03\"S\n\x0fPersistenceMode\x12 \n\x1cPERSISTENCE_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x07\n\x03RDB\x10\x02\x12\x07\n\x03\x41OF\x10\x03\"\"\n\nNodeConfig\x12\x14\n\x07size_gb\x18\x01 \x01(\x01\x42\x03\xe0\x41\x03\"\xe9\x01\n\x16ZoneDistributionConfig\x12\x11\n\x04zone\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12[\n\x04mode\x18\x01 \x01(\x0e\x32H.google.cloud.memorystore.v1.ZoneDistributionConfig.ZoneDistributionModeB\x03\xe0\x41\x01\"_\n\x14ZoneDistributionMode\x12&\n\"ZONE_DISTRIBUTION_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nMULTI_ZONE\x10\x01\x12\x0f\n\x0bSINGLE_ZONE\x10\x02\"\xce\x02\n\x1cRescheduleMaintenanceRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\x12\x66\n\x0freschedule_type\x18\x02 \x01(\x0e\x32H.google.cloud.memorystore.v1.RescheduleMaintenanceRequest.RescheduleTypeB\x03\xe0\x41\x02\x12\x36\n\rschedule_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"S\n\x0eRescheduleType\x12\x1f\n\x1bRESCHEDULE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tIMMEDIATE\x10\x01\x12\x11\n\rSPECIFIC_TIME\x10\x03\"\xb0\x01\n\x14ListInstancesRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#memorystore.googleapis.com/Instance\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x7f\n\x15ListInstancesResponse\x12\x38\n\tinstances\x18\x01 \x03(\x0b\x32%.google.cloud.memorystore.v1.Instance\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"O\n\x12GetInstanceRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\"\xcd\x01\n\x15\x43reateInstanceRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#memorystore.googleapis.com/Instance\x12\x18\n\x0binstance_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\x08instance\x18\x03 \x01(\x0b\x32%.google.cloud.memorystore.v1.InstanceB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xac\x01\n\x15UpdateInstanceRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12<\n\x08instance\x18\x02 \x01(\x0b\x32%.google.cloud.memorystore.v1.InstanceB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"s\n\x15\x44\x65leteInstanceRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\x94\x01\n\x1cListBackupCollectionsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\x12+memorystore.googleapis.com/BackupCollection\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x98\x01\n\x1dListBackupCollectionsResponse\x12I\n\x12\x62\x61\x63kup_collections\x18\x01 \x03(\x0b\x32-.google.cloud.memorystore.v1.BackupCollection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x1aGetBackupCollectionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+memorystore.googleapis.com/BackupCollection\"\x80\x01\n\x12ListBackupsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!memorystore.googleapis.com/Backup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"y\n\x13ListBackupsResponse\x12\x34\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32#.google.cloud.memorystore.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"K\n\x10GetBackupRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!memorystore.googleapis.com/Backup\"o\n\x13\x44\x65leteBackupRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!memorystore.googleapis.com/Backup\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"s\n\x13\x45xportBackupRequest\x12\x14\n\ngcs_bucket\x18\x02 \x01(\tH\x00\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!memorystore.googleapis.com/BackupB\r\n\x0b\x64\x65stination\"\xaa\x01\n\x15\x42\x61\x63kupInstanceRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\x12+\n\x03ttl\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x1b\n\tbackup_id\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x0c\n\n_backup_id\"[\n\x1eGetCertificateAuthorityRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#memorystore.googleapis.com/Instance\"\x89\x04\n\x14\x43\x65rtificateAuthority\x12j\n\x11managed_server_ca\x18\x02 \x01(\x0b\x32M.google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthorityH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x1a\xab\x01\n\x1bManagedCertificateAuthority\x12i\n\x08\x63\x61_certs\x18\x01 \x03(\x0b\x32W.google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain\x1a!\n\tCertChain\x12\x14\n\x0c\x63\x65rtificates\x18\x01 \x03(\t:\xb6\x01\xea\x41\xb2\x01\n/memorystore.googleapis.com/CertificateAuthority\x12Qprojects/{project}/locations/{location}/instances/{instance}/certificateAuthority*\x16\x63\x65rtificateAuthorities2\x14\x63\x65rtificateAuthorityB\x0b\n\tserver_ca\"\x80\x05\n\"SharedRegionalCertificateAuthority\x12\x80\x01\n\x11managed_server_ca\x18\x02 \x01(\x0b\x32\x63.google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthorityH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x1a\xda\x01\n#RegionalManagedCertificateAuthority\x12\x87\x01\n\x08\x63\x61_certs\x18\x01 \x03(\x0b\x32u.google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain\x1a)\n\x11RegionalCertChain\x12\x14\n\x0c\x63\x65rtificates\x18\x01 \x03(\t:\xd9\x01\xea\x41\xd5\x01\n=memorystore.googleapis.com/SharedRegionalCertificateAuthority\x12Jprojects/{project}/locations/{location}/sharedRegionalCertificateAuthority*$sharedRegionalCertificateAuthorities2\"sharedRegionalCertificateAuthorityB\x0b\n\tserver_ca\"\x83\x01\n,GetSharedRegionalCertificateAuthorityRequest\x12S\n\x04name\x18\x01 \x01(\tBE\xe0\x41\x02\xfa\x41?\n=memorystore.googleapis.com/SharedRegionalCertificateAuthority\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xf6\x04\n\x0e\x45ncryptionInfo\x12N\n\x0f\x65ncryption_type\x18\x01 \x01(\x0e\x32\x30.google.cloud.memorystore.v1.EncryptionInfo.TypeB\x03\xe0\x41\x03\x12J\n\x10kms_key_versions\x18\x02 \x03(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12[\n\x15kms_key_primary_state\x18\x03 \x01(\x0e\x32\x37.google.cloud.memorystore.v1.EncryptionInfo.KmsKeyStateB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\\\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x01\x12\x1f\n\x1b\x43USTOMER_MANAGED_ENCRYPTION\x10\x02\"\xd1\x01\n\x0bKmsKeyState\x12\x1d\n\x19KMS_KEY_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x15\n\x11PERMISSION_DENIED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03\x12\r\n\tDESTROYED\x10\x04\x12\x15\n\x11\x44\x45STROY_SCHEDULED\x10\x05\x12 \n\x1c\x45KM_KEY_UNREACHABLE_DETECTED\x10\x06\x12\x14\n\x10\x42ILLING_DISABLED\x10\x07\x12\x13\n\x0fUNKNOWN_FAILURE\x10\x08*W\n\x13PscConnectionStatus\x12%\n!PSC_CONNECTION_STATUS_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\r\n\tNOT_FOUND\x10\x02*\x89\x01\n\x0e\x43onnectionType\x12\x1f\n\x1b\x43ONNECTION_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x43ONNECTION_TYPE_DISCOVERY\x10\x01\x12\x1b\n\x17\x43ONNECTION_TYPE_PRIMARY\x10\x02\x12\x1a\n\x16\x43ONNECTION_TYPE_READER\x10\x03\x32\xe3\x19\n\x0bMemorystore\x12\xb6\x01\n\rListInstances\x12\x31.google.cloud.memorystore.v1.ListInstancesRequest\x1a\x32.google.cloud.memorystore.v1.ListInstancesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/instances\x12\xa3\x01\n\x0bGetInstance\x12/.google.cloud.memorystore.v1.GetInstanceRequest\x1a%.google.cloud.memorystore.v1.Instance\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/instances/*}\x12\xe2\x01\n\x0e\x43reateInstance\x12\x32.google.cloud.memorystore.v1.CreateInstanceRequest\x1a\x1d.google.longrunning.Operation\"}\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x1bparent,instance,instance_id\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/instances:\x08instance\x12\xe4\x01\n\x0eUpdateInstance\x12\x32.google.cloud.memorystore.v1.UpdateInstanceRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x14instance,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{instance.name=projects/*/locations/*/instances/*}:\x08instance\x12\xce\x01\n\x0e\x44\x65leteInstance\x12\x32.google.cloud.memorystore.v1.DeleteInstanceRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/instances/*}\x12\xdc\x01\n\x17GetCertificateAuthority\x12;.google.cloud.memorystore.v1.GetCertificateAuthorityRequest\x1a\x31.google.cloud.memorystore.v1.CertificateAuthority\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/instances/*}/certificateAuthority\x12\x88\x02\n%GetSharedRegionalCertificateAuthority\x12I.google.cloud.memorystore.v1.GetSharedRegionalCertificateAuthorityRequest\x1a?.google.cloud.memorystore.v1.SharedRegionalCertificateAuthority\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\x12\x44/v1/{name=projects/*/locations/*/sharedRegionalCertificateAuthority}\x12\x87\x02\n\x15RescheduleMaintenance\x12\x39.google.cloud.memorystore.v1.RescheduleMaintenanceRequest\x1a\x1d.google.longrunning.Operation\"\x93\x01\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\"name,reschedule_type,schedule_time\x82\xd3\xe4\x93\x02H\"C/v1/{name=projects/*/locations/*/instances/*}:rescheduleMaintenance:\x01*\x12\xd6\x01\n\x15ListBackupCollections\x12\x39.google.cloud.memorystore.v1.ListBackupCollectionsRequest\x1a:.google.cloud.memorystore.v1.ListBackupCollectionsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/backupCollections\x12\xc3\x01\n\x13GetBackupCollection\x12\x37.google.cloud.memorystore.v1.GetBackupCollectionRequest\x1a-.google.cloud.memorystore.v1.BackupCollection\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/backupCollections/*}\x12\xc2\x01\n\x0bListBackups\x12/.google.cloud.memorystore.v1.ListBackupsRequest\x1a\x30.google.cloud.memorystore.v1.ListBackupsResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/locations/*/backupCollections/*}/backups\x12\xaf\x01\n\tGetBackup\x12-.google.cloud.memorystore.v1.GetBackupRequest\x1a#.google.cloud.memorystore.v1.Backup\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xdc\x01\n\x0c\x44\x65leteBackup\x12\x30.google.cloud.memorystore.v1.DeleteBackupRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xd0\x01\n\x0c\x45xportBackup\x12\x30.google.cloud.memorystore.v1.ExportBackupRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02K\"F/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}:export:\x01*\x12\xcb\x01\n\x0e\x42\x61\x63kupInstance\x12\x32.google.cloud.memorystore.v1.BackupInstanceRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/v1/{name=projects/*/locations/*/instances/*}:backup:\x01*\x1aN\xca\x41\x1amemorystore.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x90\x07\n\x1f\x63om.google.cloud.memorystore.v1B\x0bV1mainProtoP\x01ZAcloud.google.com/go/memorystore/apiv1/memorystorepb;memorystorepb\xaa\x02\x1bGoogle.Cloud.Memorystore.V1\xca\x02\x1bGoogle\\Cloud\\Memorystore\\V1\xea\x02\x1eGoogle::Cloud::Memorystore::V1\xea\x41n\n%compute.googleapis.com/ForwardingRule\x12\x45projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}\xea\x41w\n(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41\xa6\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}\xea\x41\\\n\x1fprivateca.googleapis.com/CaPool\x12\x39projects/{project}/locations/{location}/caPools/{ca_pool}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Memorystore - module V1 - Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance").msgclass - Instance::StateInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.StateInfo").msgclass - Instance::StateInfo::UpdateInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.StateInfo.UpdateInfo").msgclass - Instance::GcsBackupSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.GcsBackupSource").msgclass - Instance::ManagedBackupSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.ManagedBackupSource").msgclass - Instance::InstanceEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.InstanceEndpoint").msgclass - Instance::ConnectionDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.ConnectionDetail").msgclass - Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.State").enummodule - Instance::AuthorizationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.AuthorizationMode").enummodule - Instance::TransitEncryptionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.TransitEncryptionMode").enummodule - Instance::NodeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.NodeType").enummodule - Instance::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.Mode").enummodule - Instance::ServerCaMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Instance.ServerCaMode").enummodule - AutomatedBackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.AutomatedBackupConfig").msgclass - AutomatedBackupConfig::FixedFrequencySchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.AutomatedBackupConfig.FixedFrequencySchedule").msgclass - AutomatedBackupConfig::AutomatedBackupMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.AutomatedBackupConfig.AutomatedBackupMode").enummodule - BackupCollection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.BackupCollection").msgclass - Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Backup").msgclass - Backup::BackupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Backup.BackupType").enummodule - Backup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.Backup.State").enummodule - BackupFile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.BackupFile").msgclass - CrossInstanceReplicationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.CrossInstanceReplicationConfig").msgclass - CrossInstanceReplicationConfig::RemoteInstance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance").msgclass - CrossInstanceReplicationConfig::Membership = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.CrossInstanceReplicationConfig.Membership").msgclass - CrossInstanceReplicationConfig::InstanceRole = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.CrossInstanceReplicationConfig.InstanceRole").enummodule - MaintenancePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.MaintenancePolicy").msgclass - WeeklyMaintenanceWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.WeeklyMaintenanceWindow").msgclass - MaintenanceSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.MaintenanceSchedule").msgclass - PscAttachmentDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PscAttachmentDetail").msgclass - PscAutoConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PscAutoConnection").msgclass - PscConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PscConnection").msgclass - DiscoveryEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.DiscoveryEndpoint").msgclass - PersistenceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PersistenceConfig").msgclass - PersistenceConfig::RDBConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PersistenceConfig.RDBConfig").msgclass - PersistenceConfig::RDBConfig::SnapshotPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PersistenceConfig.RDBConfig.SnapshotPeriod").enummodule - PersistenceConfig::AOFConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PersistenceConfig.AOFConfig").msgclass - PersistenceConfig::AOFConfig::AppendFsync = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PersistenceConfig.AOFConfig.AppendFsync").enummodule - PersistenceConfig::PersistenceMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PersistenceConfig.PersistenceMode").enummodule - NodeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.NodeConfig").msgclass - ZoneDistributionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ZoneDistributionConfig").msgclass - ZoneDistributionConfig::ZoneDistributionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ZoneDistributionConfig.ZoneDistributionMode").enummodule - RescheduleMaintenanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.RescheduleMaintenanceRequest").msgclass - RescheduleMaintenanceRequest::RescheduleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.RescheduleMaintenanceRequest.RescheduleType").enummodule - ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ListInstancesRequest").msgclass - ListInstancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ListInstancesResponse").msgclass - GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.GetInstanceRequest").msgclass - CreateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.CreateInstanceRequest").msgclass - UpdateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.UpdateInstanceRequest").msgclass - DeleteInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.DeleteInstanceRequest").msgclass - ListBackupCollectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ListBackupCollectionsRequest").msgclass - ListBackupCollectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ListBackupCollectionsResponse").msgclass - GetBackupCollectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.GetBackupCollectionRequest").msgclass - ListBackupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ListBackupsRequest").msgclass - ListBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ListBackupsResponse").msgclass - GetBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.GetBackupRequest").msgclass - DeleteBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.DeleteBackupRequest").msgclass - ExportBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ExportBackupRequest").msgclass - BackupInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.BackupInstanceRequest").msgclass - GetCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.GetCertificateAuthorityRequest").msgclass - CertificateAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.CertificateAuthority").msgclass - CertificateAuthority::ManagedCertificateAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority").msgclass - CertificateAuthority::ManagedCertificateAuthority::CertChain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain").msgclass - SharedRegionalCertificateAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.SharedRegionalCertificateAuthority").msgclass - SharedRegionalCertificateAuthority::RegionalManagedCertificateAuthority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority").msgclass - SharedRegionalCertificateAuthority::RegionalManagedCertificateAuthority::RegionalCertChain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain").msgclass - GetSharedRegionalCertificateAuthorityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.GetSharedRegionalCertificateAuthorityRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.OperationMetadata").msgclass - EncryptionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.EncryptionInfo").msgclass - EncryptionInfo::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.EncryptionInfo.Type").enummodule - EncryptionInfo::KmsKeyState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.EncryptionInfo.KmsKeyState").enummodule - PscConnectionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.PscConnectionStatus").enummodule - ConnectionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.memorystore.v1.ConnectionType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_services_pb.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_services_pb.rb deleted file mode 100644 index 62826610afd6..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/memorystore_services_pb.rb +++ /dev/null @@ -1,89 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/memorystore/v1/memorystore.proto for package 'Google.Cloud.Memorystore.V1' -# Original file comments: -# 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. -# 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/memorystore/v1/memorystore_pb' - -module Google - module Cloud - module Memorystore - module V1 - module Memorystore - # Service describing handlers for resources - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.memorystore.v1.Memorystore' - - # Lists Instances in a given project and location. - rpc :ListInstances, ::Google::Cloud::Memorystore::V1::ListInstancesRequest, ::Google::Cloud::Memorystore::V1::ListInstancesResponse - # Gets details of a single Instance. - rpc :GetInstance, ::Google::Cloud::Memorystore::V1::GetInstanceRequest, ::Google::Cloud::Memorystore::V1::Instance - # Creates a new Instance in a given project and location. - rpc :CreateInstance, ::Google::Cloud::Memorystore::V1::CreateInstanceRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single Instance. - rpc :UpdateInstance, ::Google::Cloud::Memorystore::V1::UpdateInstanceRequest, ::Google::Longrunning::Operation - # Deletes a single Instance. - rpc :DeleteInstance, ::Google::Cloud::Memorystore::V1::DeleteInstanceRequest, ::Google::Longrunning::Operation - # Gets details about the certificate authority for an Instance. - rpc :GetCertificateAuthority, ::Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest, ::Google::Cloud::Memorystore::V1::CertificateAuthority - # Gets the details of shared regional certificate authority information for - # Memorystore instance. - rpc :GetSharedRegionalCertificateAuthority, ::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest, ::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority - # Reschedules upcoming maintenance event. - rpc :RescheduleMaintenance, ::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest, ::Google::Longrunning::Operation - # Lists all backup collections owned by a consumer project in either the - # specified location (region) or all locations. - # - # If `location_id` is specified as `-` (wildcard), then all regions - # available to the project are queried, and the results are aggregated. - rpc :ListBackupCollections, ::Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest, ::Google::Cloud::Memorystore::V1::ListBackupCollectionsResponse - # Get a backup collection. - rpc :GetBackupCollection, ::Google::Cloud::Memorystore::V1::GetBackupCollectionRequest, ::Google::Cloud::Memorystore::V1::BackupCollection - # Lists all backups owned by a backup collection. - rpc :ListBackups, ::Google::Cloud::Memorystore::V1::ListBackupsRequest, ::Google::Cloud::Memorystore::V1::ListBackupsResponse - # Gets the details of a specific backup. - rpc :GetBackup, ::Google::Cloud::Memorystore::V1::GetBackupRequest, ::Google::Cloud::Memorystore::V1::Backup - # Deletes a specific backup. - rpc :DeleteBackup, ::Google::Cloud::Memorystore::V1::DeleteBackupRequest, ::Google::Longrunning::Operation - # Exports a specific backup to a customer target Cloud Storage URI. - rpc :ExportBackup, ::Google::Cloud::Memorystore::V1::ExportBackupRequest, ::Google::Longrunning::Operation - # Backup Instance. - # If this is the first time a backup is being created, a backup collection - # will be created at the backend, and this backup belongs to this collection. - # Both collection and backup will have a resource name. Backup will be - # executed for each shard. A replica (primary if nonHA) will be selected to - # perform the execution. Backup call will be rejected if there is an ongoing - # backup or update operation. Be aware that during preview, if the instance's - # internal software version is too old, critical update will be performed - # before actual backup. Once the internal software version is updated to the - # minimum version required by the backup feature, subsequent backups will not - # require critical update. After preview, there will be no critical update - # needed for backup. - rpc :BackupInstance, ::Google::Cloud::Memorystore::V1::BackupInstanceRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/rest.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/rest.rb deleted file mode 100644 index f1e30598150d..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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/memorystore/v1/memorystore/rest" -require "google/cloud/memorystore/v1/bindings_override" -require "google/cloud/memorystore/v1/version" - -module Google - module Cloud - module Memorystore - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/memorystore/v1/rest" - # client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/version.rb b/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/version.rb deleted file mode 100644 index 35e49e45c5c9..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/lib/google/cloud/memorystore/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 Memorystore - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/README.md deleted file mode 100644 index 551567df9897..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Memorystore 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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. - 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. - # @!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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/field_info.rb +++ /dev/null @@ -1,88 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 - # Rich semantic information of an API field beyond basic typing. - # @!attribute [rw] format - # @return [::Google::Api::FieldInfo::Format] - # The standard format of a field value. This does not explicitly configure - # any API consumer, just documents the API's format for the field it is - # applied to. - # @!attribute [rw] referenced_types - # @return [::Array<::Google::Api::TypeReference>] - # The type(s) that the annotated, generic field may represent. - # - # Currently, this must only be used on fields of type `google.protobuf.Any`. - # Supporting other generic types may be considered in the future. - class FieldInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The standard format of a field value. The supported formats are all backed - # by either an RFC defined by the IETF or a Google-defined AIP. - module Format - # Default, unspecified value. - FORMAT_UNSPECIFIED = 0 - - # Universally Unique Identifier, version 4, value as defined by - # https://datatracker.ietf.org/doc/html/rfc4122. The value may be - # normalized to entirely lowercase letters. For example, the value - # `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to - # `f47ac10b-58cc-0372-8567-0e02b2c3d479`. - UUID4 = 1 - - # Internet Protocol v4 value as defined by [RFC - # 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be - # condensed, with leading zeros in each octet stripped. For example, - # `001.022.233.040` would be condensed to `1.22.233.40`. - IPV4 = 2 - - # Internet Protocol v6 value as defined by [RFC - # 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be - # normalized to entirely lowercase letters with zeros compressed, following - # [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, - # the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. - IPV6 = 3 - - # An IP address in either v4 or v6 format as described by the individual - # values defined herein. See the comments on the IPV4 and IPV6 types for - # allowed normalizations of each. - IPV4_OR_IPV6 = 4 - end - end - - # A reference to a message type, for use in {::Google::Api::FieldInfo FieldInfo}. - # @!attribute [rw] type_name - # @return [::String] - # The name of the type that the annotated, generic field may represent. - # If the type is in the same protobuf package, the value can be the simple - # message name e.g., `"MyMessage"`. Otherwise, the value must be the - # fully-qualified message name e.g., `"google.library.v1.Book"`. - # - # If the type(s) are unknown to the service (e.g. the field accepts generic - # user input), use the wildcard `"*"` to denote this behavior. - # - # See [AIP-202](https://google.aip.dev/202#type-references) for more details. - class TypeReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/cloud/memorystore/v1/memorystore.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/cloud/memorystore/v1/memorystore.rb deleted file mode 100644 index 71ed7095cffe..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/cloud/memorystore/v1/memorystore.rb +++ /dev/null @@ -1,1486 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 Memorystore - module V1 - # A Memorystore instance. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::Memorystore::V1::Instance::GcsBackupSource] - # Optional. Immutable. Backups that stored in Cloud Storage buckets. - # The Cloud Storage buckets need to be the same region as the instances. - # Read permission is required to import from the provided Cloud Storage - # Objects. - # - # Note: The following fields are mutually exclusive: `gcs_source`, `managed_backup_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] managed_backup_source - # @return [::Google::Cloud::Memorystore::V1::Instance::ManagedBackupSource] - # Optional. Immutable. Backups that generated and managed by memorystore - # service. - # - # Note: The following fields are mutually exclusive: `managed_backup_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Identifier. Unique name of the instance. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation timestamp of the instance. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Latest update timestamp of the instance. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels to represent user-provided metadata. - # @!attribute [r] state - # @return [::Google::Cloud::Memorystore::V1::Instance::State] - # Output only. Current state of the instance. - # @!attribute [r] state_info - # @return [::Google::Cloud::Memorystore::V1::Instance::StateInfo] - # Output only. Additional information about the state of the instance. - # @!attribute [r] uid - # @return [::String] - # Output only. System assigned, unique identifier for the instance. - # @!attribute [rw] replica_count - # @return [::Integer] - # Optional. Number of replica nodes per shard. If omitted the default is 0 - # replicas. - # @!attribute [rw] authorization_mode - # @return [::Google::Cloud::Memorystore::V1::Instance::AuthorizationMode] - # Optional. Immutable. Authorization mode of the instance. - # @!attribute [rw] transit_encryption_mode - # @return [::Google::Cloud::Memorystore::V1::Instance::TransitEncryptionMode] - # Optional. Immutable. In-transit encryption mode of the instance. - # @!attribute [rw] shard_count - # @return [::Integer] - # Optional. Number of shards for the instance. - # @!attribute [r] discovery_endpoints - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Array<::Google::Cloud::Memorystore::V1::DiscoveryEndpoint>] - # Output only. Deprecated: The discovery_endpoints parameter is deprecated. - # As a result, it will not be populated if the connections are created using - # endpoints parameter. Instead of this parameter, for discovery, use - # endpoints.connections.pscConnection and - # endpoints.connections.pscAutoConnection - # with connectionType CONNECTION_TYPE_DISCOVERY. - # @!attribute [rw] node_type - # @return [::Google::Cloud::Memorystore::V1::Instance::NodeType] - # Optional. Machine type for individual nodes of the instance. - # @!attribute [rw] persistence_config - # @return [::Google::Cloud::Memorystore::V1::PersistenceConfig] - # Optional. Persistence configuration of the instance. - # @!attribute [rw] engine_version - # @return [::String] - # Optional. Engine version of the instance. - # @!attribute [rw] engine_configs - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-provided engine configurations for the instance. - # @!attribute [r] node_config - # @return [::Google::Cloud::Memorystore::V1::NodeConfig] - # Output only. Configuration of individual nodes of the instance. - # @!attribute [rw] zone_distribution_config - # @return [::Google::Cloud::Memorystore::V1::ZoneDistributionConfig] - # Optional. Immutable. Zone distribution configuration of the instance for - # node allocation. - # @!attribute [rw] deletion_protection_enabled - # @return [::Boolean] - # Optional. If set to true deletion of the instance will fail. - # @!attribute [rw] psc_auto_connections - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Array<::Google::Cloud::Memorystore::V1::PscAutoConnection>] - # Optional. Immutable. Deprecated: Use the - # endpoints.connections.psc_auto_connection value instead. - # @!attribute [r] psc_attachment_details - # @return [::Array<::Google::Cloud::Memorystore::V1::PscAttachmentDetail>] - # Output only. Service attachment details to configure PSC connections. - # @!attribute [rw] endpoints - # @return [::Array<::Google::Cloud::Memorystore::V1::Instance::InstanceEndpoint>] - # Optional. Endpoints for the instance. - # @!attribute [rw] mode - # @return [::Google::Cloud::Memorystore::V1::Instance::Mode] - # Optional. The mode config for the instance. - # @!attribute [rw] simulate_maintenance_event - # @return [::Boolean] - # Optional. Input only. Simulate a maintenance event. - # @!attribute [rw] ondemand_maintenance - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Optional. Input only. Ondemand maintenance for the instance. - # @!attribute [r] satisfies_pzs - # @return [::Boolean] - # Optional. Output only. Reserved for future use. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Optional. Output only. Reserved for future use. - # @!attribute [rw] maintenance_policy - # @return [::Google::Cloud::Memorystore::V1::MaintenancePolicy] - # Optional. The maintenance policy for the instance. If not provided, - # the maintenance event will be performed based on Memorystore - # internal rollout schedule. - # @!attribute [r] maintenance_schedule - # @return [::Google::Cloud::Memorystore::V1::MaintenanceSchedule] - # Output only. Published maintenance schedule. - # @!attribute [rw] cross_instance_replication_config - # @return [::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig] - # Optional. The config for cross instance replication. - # @!attribute [rw] async_instance_endpoints_deletion_enabled - # @return [::Boolean] - # Optional. If true, instance endpoints that are created and registered by - # customers can be deleted asynchronously. That is, such an instance endpoint - # can be de-registered before the forwarding rules in the instance endpoint - # are deleted. - # @!attribute [rw] kms_key - # @return [::String] - # Optional. The KMS key used to encrypt the at-rest data of the cluster. - # @!attribute [r] encryption_info - # @return [::Google::Cloud::Memorystore::V1::EncryptionInfo] - # Output only. Encryption information of the data at rest of the cluster. - # @!attribute [r] backup_collection - # @return [::String] - # Output only. The backup collection full resource name. Example: - # projects/\\{project}/locations/\\{location}/backupCollections/\\{collection} - # @!attribute [rw] automated_backup_config - # @return [::Google::Cloud::Memorystore::V1::AutomatedBackupConfig] - # Optional. The automated backup config for the instance. - # @!attribute [rw] maintenance_version - # @return [::String] - # Optional. This field can be used to trigger self service update to indicate - # the desired maintenance version. The input to this field can be determined - # by the available_maintenance_versions field. - # @!attribute [r] effective_maintenance_version - # @return [::String] - # Output only. This field represents the actual maintenance version of the - # instance. - # @!attribute [r] available_maintenance_versions - # @return [::Array<::String>] - # Output only. This field is used to determine the available maintenance - # versions for the self service update. - # @!attribute [rw] allow_fewer_zones_deployment - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Optional. Immutable. Deprecated, do not use. - # @!attribute [rw] server_ca_mode - # @return [::Google::Cloud::Memorystore::V1::Instance::ServerCaMode] - # Optional. Immutable. The Server CA mode for the instance. - # @!attribute [rw] server_ca_pool - # @return [::String] - # Optional. Immutable. The customer-managed CA pool for the instance. Only - # applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format: - # "projects/\\{project}/locations/\\{region}/caPools/\\{ca_pool}". - # @!attribute [rw] rotate_server_certificate - # @return [::Boolean] - # Optional. Input only. Rotate the server certificates. - class Instance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Additional information about the state of the instance. - # @!attribute [r] update_info - # @return [::Google::Cloud::Memorystore::V1::Instance::StateInfo::UpdateInfo] - # Output only. Describes ongoing update when instance state is UPDATING. - class StateInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents information about instance with state UPDATING. - # @!attribute [r] target_shard_count - # @return [::Integer] - # Output only. Target number of shards for the instance. - # @!attribute [r] target_replica_count - # @return [::Integer] - # Output only. Target number of replica nodes per shard for the instance. - # @!attribute [r] target_engine_version - # @return [::String] - # Output only. Target engine version for the instance. - # @!attribute [r] target_node_type - # @return [::Google::Cloud::Memorystore::V1::Instance::NodeType] - # Output only. Target node type for the instance. - class UpdateInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Backups that stored in Cloud Storage buckets. - # The Cloud Storage buckets need to be the same region as the instances. - # @!attribute [rw] uris - # @return [::Array<::String>] - # Optional. Example: gs://bucket1/object1, gs://bucket2/folder2/object2 - class GcsBackupSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Backups that generated and managed by memorystore. - # @!attribute [rw] backup - # @return [::String] - # Optional. Example: - # //memorystore.googleapis.com/projects/\\{project}/locations/\\{location}/backupCollections/\\{collection}/backups/\\{backup} - # A shorter version (without the prefix) of the backup name is also - # supported, like - # projects/\\{project}/locations/\\{location}/backupCollections/\\{collection}/backups/\\{backup_id} - # In this case, it assumes the backup is under memorystore.googleapis.com. - class ManagedBackupSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # InstanceEndpoint consists of PSC connections that are created - # as a group in each VPC network for accessing the instance. In each group, - # there shall be one connection for each service attachment in the cluster. - # @!attribute [rw] connections - # @return [::Array<::Google::Cloud::Memorystore::V1::Instance::ConnectionDetail>] - # Optional. A group of PSC connections. They are created in the same VPC - # network, one for each service attachment in the cluster. - class InstanceEndpoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information of each PSC connection. - # @!attribute [rw] psc_auto_connection - # @return [::Google::Cloud::Memorystore::V1::PscAutoConnection] - # Immutable. Detailed information of a PSC connection that is created - # through service connectivity automation. - # - # Note: The following fields are mutually exclusive: `psc_auto_connection`, `psc_connection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] psc_connection - # @return [::Google::Cloud::Memorystore::V1::PscConnection] - # Detailed information of a PSC connection that is created by the user. - # - # Note: The following fields are mutually exclusive: `psc_connection`, `psc_auto_connection`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ConnectionDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!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 EngineConfigsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Possible states of the instance. - module State - # Not set. - STATE_UNSPECIFIED = 0 - - # Instance is being created. - CREATING = 1 - - # Instance has been created and is usable. - ACTIVE = 2 - - # Instance is being updated. - UPDATING = 3 - - # Instance is being deleted. - DELETING = 4 - end - - # Possible authorization modes of the instance. - module AuthorizationMode - # Not set. - AUTHORIZATION_MODE_UNSPECIFIED = 0 - - # Authorization disabled. - AUTH_DISABLED = 1 - - # IAM basic authorization. - IAM_AUTH = 2 - end - - # Possible in-transit encryption modes of the instance. - module TransitEncryptionMode - # Not set. - TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0 - - # In-transit encryption is disabled. - TRANSIT_ENCRYPTION_DISABLED = 1 - - # Server-managed encryption is used for in-transit encryption. - SERVER_AUTHENTICATION = 2 - end - - # Possible node types of the instance. See - # https://cloud.google.com/memorystore/docs/valkey/instance-node-specification - # for more information. - module NodeType - # Not set. - NODE_TYPE_UNSPECIFIED = 0 - - # Shared core nano. - SHARED_CORE_NANO = 1 - - # High memory medium. - HIGHMEM_MEDIUM = 2 - - # High memory extra large. - HIGHMEM_XLARGE = 3 - - # Standard small. - STANDARD_SMALL = 4 - end - - # The mode config, which is used to enable/disable cluster mode. - module Mode - # Mode is not specified. - MODE_UNSPECIFIED = 0 - - # Deprecated: Use CLUSTER_DISABLED instead. - STANDALONE = 1 - - # Instance is in cluster mode. - CLUSTER = 2 - - # Cluster mode is disabled for the instance. - CLUSTER_DISABLED = 4 - end - - # The Server CA mode for the instance. - module ServerCaMode - # Server CA mode not specified. - SERVER_CA_MODE_UNSPECIFIED = 0 - - # Each instance has its own Google-managed CA. - GOOGLE_MANAGED_PER_INSTANCE_CA = 1 - - # The instance uses a Google-managed shared CA for the instance's region. - GOOGLE_MANAGED_SHARED_CA = 2 - - # The instance uses a customer-managed CA from CAS. - CUSTOMER_MANAGED_CAS_CA = 3 - - # Deprecated: Use GOOGLE_MANAGED_PER_INSTANCE_CA instead. - SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA = 1 - - # Deprecated: Use GOOGLE_MANAGED_SHARED_CA instead. - SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA = 2 - - # Deprecated: Use CUSTOMER_MANAGED_CAS_CA instead. - SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA = 3 - end - end - - # The automated backup config for an instance. - # @!attribute [rw] fixed_frequency_schedule - # @return [::Google::Cloud::Memorystore::V1::AutomatedBackupConfig::FixedFrequencySchedule] - # Optional. Trigger automated backups at a fixed frequency. - # @!attribute [rw] automated_backup_mode - # @return [::Google::Cloud::Memorystore::V1::AutomatedBackupConfig::AutomatedBackupMode] - # Optional. The automated backup mode. If the mode is disabled, the other - # fields will be ignored. - # @!attribute [rw] retention - # @return [::Google::Protobuf::Duration] - # Optional. How long to keep automated backups before the backups are - # deleted. The value should be between 1 day and 365 days. If not specified, - # the default value is 35 days. - class AutomatedBackupConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This schedule allows the backup to be triggered at a fixed frequency - # (currently only daily is supported). - # @!attribute [rw] start_time - # @return [::Google::Type::TimeOfDay] - # Required. The start time of every automated backup in UTC. It must be set - # to the start of an hour. This field is required. - class FixedFrequencySchedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The automated backup mode. - module AutomatedBackupMode - # Default value. Automated backup config is not specified. - AUTOMATED_BACKUP_MODE_UNSPECIFIED = 0 - - # Automated backup config disabled. - DISABLED = 1 - - # Automated backup config enabled. - ENABLED = 2 - end - end - - # BackupCollection of an instance. - # @!attribute [rw] name - # @return [::String] - # Identifier. Full resource path of the backup collection. - # @!attribute [r] instance_uid - # @return [::String] - # Output only. The instance uid of the backup collection. - # @!attribute [r] instance - # @return [::String] - # Output only. The full resource path of the instance the backup collection - # belongs to. Example: - # projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @!attribute [r] kms_key - # @return [::String] - # Output only. The KMS key used to encrypt the backups under this backup - # collection. - # @!attribute [r] uid - # @return [::String] - # Output only. System assigned unique identifier of the backup collection. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the backup collection was created. - # @!attribute [r] total_backup_size_bytes - # @return [::Integer] - # Output only. Total size of all backups in the backup collection. - # @!attribute [r] total_backup_count - # @return [::Integer] - # Output only. Total number of backups in the backup collection. - # @!attribute [r] last_backup_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last time a backup was created in the backup collection. - class BackupCollection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Backup of an instance. - # @!attribute [rw] name - # @return [::String] - # Identifier. Full resource path of the backup. the last part of the name is - # the backup id with the following format: [YYYYMMDDHHMMSS]_[Shorted Instance - # UID] OR customer specified while backup instance. Example: - # 20240515123000_1234 - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the backup was created. - # @!attribute [r] instance - # @return [::String] - # Output only. Instance resource path of this backup. - # @!attribute [r] instance_uid - # @return [::String] - # Output only. Instance uid of this backup. - # @!attribute [r] total_size_bytes - # @return [::Integer] - # Output only. Total size of the backup in bytes. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the backup will expire. - # @!attribute [r] engine_version - # @return [::String] - # Output only. valkey-7.5/valkey-8.0, etc. - # @!attribute [r] backup_files - # @return [::Array<::Google::Cloud::Memorystore::V1::BackupFile>] - # Output only. List of backup files of the backup. - # @!attribute [r] node_type - # @return [::Google::Cloud::Memorystore::V1::Instance::NodeType] - # Output only. Node type of the instance. - # @!attribute [r] replica_count - # @return [::Integer] - # Output only. Number of replicas for the instance. - # @!attribute [r] shard_count - # @return [::Integer] - # Output only. Number of shards for the instance. - # @!attribute [r] backup_type - # @return [::Google::Cloud::Memorystore::V1::Backup::BackupType] - # Output only. Type of the backup. - # @!attribute [r] state - # @return [::Google::Cloud::Memorystore::V1::Backup::State] - # Output only. State of the backup. - # @!attribute [r] encryption_info - # @return [::Google::Cloud::Memorystore::V1::EncryptionInfo] - # Output only. Encryption information of the backup. - # @!attribute [r] uid - # @return [::String] - # Output only. System assigned unique identifier of the backup. - class Backup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of the backup. - module BackupType - # The default value, not set. - BACKUP_TYPE_UNSPECIFIED = 0 - - # On-demand backup. - ON_DEMAND = 1 - - # Automated backup. - AUTOMATED = 2 - end - - # State of the backup. - module State - # The default value, not set. - STATE_UNSPECIFIED = 0 - - # The backup is being created. - CREATING = 1 - - # The backup is active to be used. - ACTIVE = 2 - - # The backup is being deleted. - DELETING = 3 - - # The backup is currently suspended due to reasons like project deletion, - # billing account closure, etc. - SUSPENDED = 4 - end - end - - # Backup is consisted of multiple backup files. - # @!attribute [r] file_name - # @return [::String] - # Output only. e.g: .rdb - # @!attribute [r] size_bytes - # @return [::Integer] - # Output only. Size of the backup file in bytes. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the backup file was created. - class BackupFile - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Cross instance replication config. - # @!attribute [rw] instance_role - # @return [::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::InstanceRole] - # Required. The role of the instance in cross instance replication. - # @!attribute [rw] primary_instance - # @return [::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::RemoteInstance] - # Optional. Details of the primary instance that is used as the replication - # source for this secondary instance. - # - # This field is only set for a secondary instance. - # @!attribute [rw] secondary_instances - # @return [::Array<::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::RemoteInstance>] - # Optional. List of secondary instances that are replicating from this - # primary instance. - # - # This field is only set for a primary instance. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last time cross instance replication config was updated. - # @!attribute [r] membership - # @return [::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::Membership] - # Output only. An output only view of all the member instances participating - # in the cross instance replication. This view will be provided by every - # member instance irrespective of its instance role(primary or secondary). - # - # A primary instance can provide information about all the secondary - # instances replicating from it. However, a secondary instance only knows - # about the primary instance from which it is replicating. However, for - # scenarios, where the primary instance is unavailable(e.g. regional outage), - # a Getinstance request can be sent to any other member instance and this - # field will list all the member instances participating in cross instance - # replication. - class CrossInstanceReplicationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Details of the remote instance associated with this instance in a cross - # instance replication setup. - # @!attribute [rw] instance - # @return [::String] - # Optional. The full resource path of the remote instance in - # the format: projects//locations//instances/ - # @!attribute [r] uid - # @return [::String] - # Output only. The unique identifier of the remote instance. - class RemoteInstance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An output only view of all the member instances participating in the cross - # instance replication. - # @!attribute [r] primary_instance - # @return [::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::RemoteInstance] - # Output only. The primary instance that acts as the source of replication - # for the secondary instances. - # @!attribute [r] secondary_instances - # @return [::Array<::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::RemoteInstance>] - # Output only. The list of secondary instances replicating from the primary - # instance. - class Membership - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The role of the instance in cross instance replication. - module InstanceRole - # instance role is not set. - # The behavior is equivalent to NONE. - INSTANCE_ROLE_UNSPECIFIED = 0 - - # This instance does not participate in cross instance replication. It is - # an independent instance and does not replicate to or from any other - # instances. - NONE = 1 - - # A instance that allows both reads and writes. Any data written to this - # instance is also replicated to the attached secondary instances. - PRIMARY = 2 - - # A instance that allows only reads and replicates data from a primary - # instance. - SECONDARY = 3 - end - end - - # Maintenance policy per instance. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the policy was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the policy was updated. - # @!attribute [rw] weekly_maintenance_window - # @return [::Array<::Google::Cloud::Memorystore::V1::WeeklyMaintenanceWindow>] - # Optional. Maintenance window that is applied to resources covered by this - # policy. Minimum 1. For the current version, the maximum number of - # weekly_window is expected to be one. - class MaintenancePolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Time window specified for weekly operations. - # @!attribute [rw] day - # @return [::Google::Type::DayOfWeek] - # Optional. Allows to define schedule that runs specified day of the week. - # @!attribute [rw] start_time - # @return [::Google::Type::TimeOfDay] - # Optional. Start time of the window in UTC. - class WeeklyMaintenanceWindow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Upcoming maintenance schedule. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The start time of any upcoming scheduled maintenance for this - # instance. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The end time of any upcoming scheduled maintenance for this - # instance. - class MaintenanceSchedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration of a service attachment of the cluster, for creating PSC - # connections. - # @!attribute [r] service_attachment - # @return [::String] - # Output only. Service attachment URI which your self-created PscConnection - # should use as target. - # @!attribute [r] connection_type - # @return [::Google::Cloud::Memorystore::V1::ConnectionType] - # Output only. Type of Psc endpoint. - class PscAttachmentDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of consumer resources in a PSC connection. - # @!attribute [rw] port - # @return [::Integer] - # Optional. port will only be set for Primary/Reader or Discovery endpoint. - # @!attribute [r] psc_connection_id - # @return [::String] - # Output only. The PSC connection id of the forwarding rule connected to the - # service attachment. - # @!attribute [r] ip_address - # @return [::String] - # Output only. The IP allocated on the consumer network for the PSC - # forwarding rule. - # @!attribute [r] forwarding_rule - # @return [::String] - # Output only. The URI of the consumer side forwarding rule. - # Format: - # projects/\\{project}/regions/\\{region}/forwardingRules/\\{forwarding_rule} - # @!attribute [rw] project_id - # @return [::String] - # Required. The consumer project_id where PSC connections are established. - # This should be the same project_id that the instance is being created in. - # @!attribute [rw] network - # @return [::String] - # Required. The network where the PSC endpoints are created, in the form of - # projects/\\{project_id}/global/networks/\\{network_id}. - # @!attribute [r] service_attachment - # @return [::String] - # Output only. The service attachment which is the target of the PSC - # connection, in the form of - # projects/\\{project-id}/regions/\\{region}/serviceAttachments/\\{service-attachment-id}. - # @!attribute [r] psc_connection_status - # @return [::Google::Cloud::Memorystore::V1::PscConnectionStatus] - # Output only. The status of the PSC connection: whether a connection exists - # and ACTIVE or it no longer exists. Please note that this value is updated - # periodically. Please use Private Service Connect APIs for the latest - # status. - # @!attribute [r] connection_type - # @return [::Google::Cloud::Memorystore::V1::ConnectionType] - # Output only. Type of the PSC connection. - class PscAutoConnection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # User created Psc connection configuration. - # @!attribute [rw] port - # @return [::Integer] - # Optional. port will only be set for Primary/Reader or Discovery endpoint. - # @!attribute [rw] psc_connection_id - # @return [::String] - # Required. The PSC connection id of the forwarding rule connected to the - # service attachment. - # @!attribute [rw] ip_address - # @return [::String] - # Required. The IP allocated on the consumer network for the PSC forwarding - # rule. - # @!attribute [rw] forwarding_rule - # @return [::String] - # Required. The URI of the consumer side forwarding rule. - # Format: - # projects/\\{project}/regions/\\{region}/forwardingRules/\\{forwarding_rule} - # @!attribute [r] project_id - # @return [::String] - # Output only. The consumer project_id where the forwarding rule is created - # from. - # @!attribute [rw] network - # @return [::String] - # Required. The consumer network where the IP address resides, in the form of - # projects/\\{project_id}/global/networks/\\{network_id}. - # @!attribute [rw] service_attachment - # @return [::String] - # Required. The service attachment which is the target of the PSC connection, - # in the form of - # projects/\\{project-id}/regions/\\{region}/serviceAttachments/\\{service-attachment-id}. - # @!attribute [r] psc_connection_status - # @return [::Google::Cloud::Memorystore::V1::PscConnectionStatus] - # Output only. The status of the PSC connection: whether a connection exists - # and ACTIVE or it no longer exists. Please note that this value is updated - # periodically. Please use Private Service Connect APIs for the latest - # status. - # @!attribute [r] connection_type - # @return [::Google::Cloud::Memorystore::V1::ConnectionType] - # Output only. Type of the PSC connection. - class PscConnection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents an endpoint for clients to connect to the instance. - # @!attribute [r] address - # @return [::String] - # Output only. IP address of the exposed endpoint clients connect to. - # @!attribute [r] port - # @return [::Integer] - # Output only. The port number of the exposed endpoint. - # @!attribute [r] network - # @return [::String] - # Output only. The network where the IP address of the discovery endpoint - # will be reserved, in the form of - # projects/\\{network_project}/global/networks/\\{network_id}. - class DiscoveryEndpoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents persistence configuration for a instance. - # @!attribute [rw] mode - # @return [::Google::Cloud::Memorystore::V1::PersistenceConfig::PersistenceMode] - # Optional. Current persistence mode. - # @!attribute [rw] rdb_config - # @return [::Google::Cloud::Memorystore::V1::PersistenceConfig::RDBConfig] - # Optional. RDB configuration. This field will be ignored if mode is not RDB. - # @!attribute [rw] aof_config - # @return [::Google::Cloud::Memorystore::V1::PersistenceConfig::AOFConfig] - # Optional. AOF configuration. This field will be ignored if mode is not AOF. - class PersistenceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for RDB based persistence. - # @!attribute [rw] rdb_snapshot_period - # @return [::Google::Cloud::Memorystore::V1::PersistenceConfig::RDBConfig::SnapshotPeriod] - # Optional. Period between RDB snapshots. - # @!attribute [rw] rdb_snapshot_start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Time that the first snapshot was/will be attempted, and to - # which future snapshots will be aligned. If not provided, the current time - # will be used. - class RDBConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible snapshot periods. - module SnapshotPeriod - # Not set. - SNAPSHOT_PERIOD_UNSPECIFIED = 0 - - # One hour. - ONE_HOUR = 1 - - # Six hours. - SIX_HOURS = 2 - - # Twelve hours. - TWELVE_HOURS = 3 - - # Twenty four hours. - TWENTY_FOUR_HOURS = 4 - end - end - - # Configuration for AOF based persistence. - # @!attribute [rw] append_fsync - # @return [::Google::Cloud::Memorystore::V1::PersistenceConfig::AOFConfig::AppendFsync] - # Optional. The fsync mode. - class AOFConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible fsync modes. - module AppendFsync - # Not set. Default: EVERY_SEC - APPEND_FSYNC_UNSPECIFIED = 0 - - # Never fsync. Normally Linux will flush data every 30 seconds with this - # configuration, but it's up to the kernel's exact tuning. - NEVER = 1 - - # Fsync every second. You may lose 1 second of data if there is a - # disaster. - EVERY_SEC = 2 - - # Fsync every time new write commands are appended to the AOF. The best - # data loss protection at the cost of performance. - ALWAYS = 3 - end - end - - # Possible persistence modes. - module PersistenceMode - # Not set. - PERSISTENCE_MODE_UNSPECIFIED = 0 - - # Persistence is disabled, and any snapshot data is deleted. - DISABLED = 1 - - # RDB based persistence is enabled. - RDB = 2 - - # AOF based persistence is enabled. - AOF = 3 - end - end - - # Represents configuration for nodes of the instance. - # @!attribute [r] size_gb - # @return [::Float] - # Output only. Memory size in GB of the node. - class NodeConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Zone distribution configuration for allocation of instance resources. - # @!attribute [rw] zone - # @return [::String] - # Optional. Defines zone where all resources will be allocated with - # SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. - # @!attribute [rw] mode - # @return [::Google::Cloud::Memorystore::V1::ZoneDistributionConfig::ZoneDistributionMode] - # Optional. Current zone distribution mode. Defaults to MULTI_ZONE. - class ZoneDistributionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible zone distribution modes. - module ZoneDistributionMode - # Not Set. Default: MULTI_ZONE - ZONE_DISTRIBUTION_MODE_UNSPECIFIED = 0 - - # Distribute resources across 3 zones picked at random within the - # region. - MULTI_ZONE = 1 - - # Provision resources in a single zone. Zone field must be specified. - SINGLE_ZONE = 2 - end - end - - # Request for rescheduling instance maintenance. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the instance to reschedule maintenance for: - # `projects/{project}/locations/{location_id}/instances/{instance}` - # @!attribute [rw] reschedule_type - # @return [::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest::RescheduleType] - # Required. If reschedule type is SPECIFIC_TIME, schedule_time must be set. - # @!attribute [rw] schedule_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Timestamp when the maintenance shall be rescheduled to if - # reschedule_type=SPECIFIC_TIME, in RFC 3339 format. - # Example: `2012-11-15T16:19:00.094Z`. - class RescheduleMaintenanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reschedule options. - module RescheduleType - # Not set. - RESCHEDULE_TYPE_UNSPECIFIED = 0 - - # If the user wants to schedule the maintenance to happen now. - IMMEDIATE = 1 - - # If the user wants to reschedule the maintenance to a specific time. - SPECIFIC_TIME = 3 - end - end - - # Request message for [ListInstances][]. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent to list instances from. - # Format: projects/\\{project}/locations/\\{location} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Expression for filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Sort results by a defined order. Supported values: "name", - # "create_time". - class ListInstancesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for [ListInstances][]. - # @!attribute [rw] instances - # @return [::Array<::Google::Cloud::Memorystore::V1::Instance>] - # If the \\{location} requested was "-" the response contains a list of - # instances from all locations. Instances in unreachable locations will be - # omitted. - # @!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. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListInstancesResponse - 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/\\{project}/locations/\\{location}/instances/\\{instance} - class GetInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [CreateInstance][]. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this instance will be created. - # Format: projects/\\{project}/locations/\\{location} - # @!attribute [rw] instance_id - # @return [::String] - # Required. The ID to use for the instance, which will become the final - # component of the instance's resource name. - # - # This value is subject to the following restrictions: - # - # * Must be 4-63 characters in length - # * Must begin with a letter or digit - # * Must contain only lowercase letters, digits, and hyphens - # * Must not end with a hyphen - # * Must be unique within a location - # @!attribute [rw] instance - # @return [::Google::Cloud::Memorystore::V1::Instance] - # Required. The instance to create. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [UpdateInstance][]. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to be updated on the instance. At least one - # field must be specified. - # @!attribute [rw] instance - # @return [::Google::Cloud::Memorystore::V1::Instance] - # Required. The instance to update. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateInstanceRequest - 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/\\{project}/locations/\\{location}/instances/\\{instance} - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for [ListBackupCollections] - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the backupCollection location using the - # form: - # `projects/{project_id}/locations/{location_id}` - # where `location_id` refers to a Google Cloud region. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of items to return. - # - # If not specified, a default value of 1000 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # {::Google::Cloud::Memorystore::V1::ListBackupCollectionsResponse#next_page_token `next_page_token`} - # to determine if there are more clusters left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The `next_page_token` value returned from a previous - # [ListBackupCollections] request, if any. - class ListBackupCollectionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for [ListBackupCollections]. - # @!attribute [rw] backup_collections - # @return [::Array<::Google::Cloud::Memorystore::V1::BackupCollection>] - # A list of backupCollections in the project. - # - # If the `location_id` in the parent field of the request is "-", all regions - # available to the project are queried, and the results aggregated. - # If in such an aggregated query a location is unavailable, a placeholder - # backupCollection entry is included in the response with the `name` field - # set to a value of the form - # `projects/{project_id}/locations/{location_id}/backupCollections/`- and the - # `status` field set to ERROR and `status_message` field set to "location not - # available for ListBackupCollections". - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListBackupCollectionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for [GetBackupCollection]. - # @!attribute [rw] name - # @return [::String] - # Required. Instance backupCollection resource name using the form: - # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` - # where `location_id` refers to a Google Cloud region. - class GetBackupCollectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for [ListBackups]. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the backupCollection using the form: - # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of items to return. - # - # If not specified, a default value of 1000 will be used by the service. - # Regardless of the page_size value, the response may include a partial list - # and a caller should only rely on response's - # {::Google::Cloud::Memorystore::V1::ListBackupsResponse#next_page_token `next_page_token`} - # to determine if there are more clusters left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The `next_page_token` value returned from a previous - # [ListBackupCollections] request, if any. - class ListBackupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for [ListBackups]. - # @!attribute [rw] backups - # @return [::Array<::Google::Cloud::Memorystore::V1::Backup>] - # A list of backups in the project. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Backups that could not be reached. - class ListBackupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for [GetBackup]. - # @!attribute [rw] name - # @return [::String] - # Required. Instance backup resource name using the form: - # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - class GetBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for [DeleteBackup]. - # @!attribute [rw] name - # @return [::String] - # Required. Instance backup resource name using the form: - # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - # @!attribute [rw] request_id - # @return [::String] - # Optional. Idempotent request UUID. - class DeleteBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for [ExportBackup]. - # @!attribute [rw] gcs_bucket - # @return [::String] - # Google Cloud Storage bucket, like "my-bucket". - # @!attribute [rw] name - # @return [::String] - # Required. Instance backup resource name using the form: - # `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - class ExportBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for [BackupInstance]. - # @!attribute [rw] name - # @return [::String] - # Required. Instance resource name using the form: - # `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - # where `location_id` refers to a Google Cloud region. - # @!attribute [rw] ttl - # @return [::Google::Protobuf::Duration] - # Optional. TTL for the backup to expire. Value range is 1 day to 100 years. - # If not specified, the default value is 100 years. - # @!attribute [rw] backup_id - # @return [::String] - # Optional. The id of the backup to be created. If not specified, the - # default value ([YYYYMMDDHHMMSS]_[Shortened Instance UID] is used. - class BackupInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [GetCertificateAuthority][]. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the certificate authority. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/certificateAuthority - class GetCertificateAuthorityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A certificate authority for an instance. - # @!attribute [rw] managed_server_ca - # @return [::Google::Cloud::Memorystore::V1::CertificateAuthority::ManagedCertificateAuthority] - # A managed server certificate authority. - # @!attribute [rw] name - # @return [::String] - # Identifier. Unique name of the certificate authority. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance} - class CertificateAuthority - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A managed certificate authority. - # @!attribute [rw] ca_certs - # @return [::Array<::Google::Cloud::Memorystore::V1::CertificateAuthority::ManagedCertificateAuthority::CertChain>] - # PEM encoded CA certificate chains for managed server authentication. - class ManagedCertificateAuthority - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A certificate chain. - # @!attribute [rw] certificates - # @return [::Array<::String>] - # The certificates that form the CA chain in order of leaf to root. - class CertChain - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Shared regional certificate authority for an instance. - # @!attribute [rw] managed_server_ca - # @return [::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority::RegionalManagedCertificateAuthority] - # CA certificate chains for memorystore managed server authentication. - # @!attribute [rw] name - # @return [::String] - # Identifier. Unique name of the resource in this scope including project and - # location using the form: - # `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority` - class SharedRegionalCertificateAuthority - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # CA certificate chains for memorystore managed server authentication. - # @!attribute [rw] ca_certs - # @return [::Array<::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority::RegionalManagedCertificateAuthority::RegionalCertChain>] - # The PEM encoded CA certificate chains for memorystore managed - # server authentication - class RegionalManagedCertificateAuthority - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The certificates that form the CA chain, from leaf to root order. - # @!attribute [rw] certificates - # @return [::Array<::String>] - # The certificates that form the CA chain, from leaf to root order. - class RegionalCertChain - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Request for - # {::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_shared_regional_certificate_authority GetSharedRegionalCertificateAuthority}. - # @!attribute [rw] name - # @return [::String] - # Required. Regional certificate authority resource name using the form: - # `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority` - # where `location_id` refers to a Google Cloud region. - class GetSharedRegionalCertificateAuthorityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of a long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have been cancelled successfully - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # EncryptionInfo describes the encryption information of a cluster. - # @!attribute [r] encryption_type - # @return [::Google::Cloud::Memorystore::V1::EncryptionInfo::Type] - # Output only. Type of encryption. - # @!attribute [r] kms_key_versions - # @return [::Array<::String>] - # Output only. KMS key versions that are being used to protect the data - # at-rest. - # @!attribute [r] kms_key_primary_state - # @return [::Google::Cloud::Memorystore::V1::EncryptionInfo::KmsKeyState] - # Output only. The state of the primary version of the KMS key perceived by - # the system. This field is not populated in backups. - # @!attribute [r] last_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The most recent time when the encryption info was updated. - class EncryptionInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible encryption types. - module Type - # Encryption type not specified. Defaults to GOOGLE_DEFAULT_ENCRYPTION. - TYPE_UNSPECIFIED = 0 - - # The data is encrypted at rest with a key that is fully managed by Google. - # No key version will be populated. This is the default state. - GOOGLE_DEFAULT_ENCRYPTION = 1 - - # The data is encrypted at rest with a key that is managed by the customer. - # KMS key versions will be populated. - CUSTOMER_MANAGED_ENCRYPTION = 2 - end - - # The state of the KMS key perceived by the system. Refer to the public - # documentation for the impact of each state. - module KmsKeyState - # The default value. This value is unused. - KMS_KEY_STATE_UNSPECIFIED = 0 - - # The KMS key is enabled and correctly configured. - ENABLED = 1 - - # Permission denied on the KMS key. - PERMISSION_DENIED = 2 - - # The KMS key is disabled. - DISABLED = 3 - - # The KMS key is destroyed. - DESTROYED = 4 - - # The KMS key is scheduled to be destroyed. - DESTROY_SCHEDULED = 5 - - # The EKM key is unreachable. - EKM_KEY_UNREACHABLE_DETECTED = 6 - - # Billing is disabled for the project. - BILLING_DISABLED = 7 - - # All other unknown failures. - UNKNOWN_FAILURE = 8 - end - end - - # Status of the PSC connection. - module PscConnectionStatus - # PSC connection status is not specified. - PSC_CONNECTION_STATUS_UNSPECIFIED = 0 - - # The connection is active - ACTIVE = 1 - - # Connection not found - NOT_FOUND = 2 - end - - # Type of a PSC connection - module ConnectionType - # Connection Type is not set - CONNECTION_TYPE_UNSPECIFIED = 0 - - # Connection that will be used for topology discovery. - CONNECTION_TYPE_DISCOVERY = 1 - - # Connection that will be used as primary endpoint to access primary. - CONNECTION_TYPE_PRIMARY = 2 - - # Connection that will be used as reader endpoint to access replicas. - CONNECTION_TYPE_READER = 3 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/type/dayofweek.rb deleted file mode 100644 index 973211b9ffe7..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/type/dayofweek.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 day of the week. - module DayOfWeek - # The day of the week is unspecified. - DAY_OF_WEEK_UNSPECIFIED = 0 - - # Monday - MONDAY = 1 - - # Tuesday - TUESDAY = 2 - - # Wednesday - WEDNESDAY = 3 - - # Thursday - THURSDAY = 4 - - # Friday - FRIDAY = 5 - - # Saturday - SATURDAY = 6 - - # Sunday - SUNDAY = 7 - end - end -end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/type/timeofday.rb b/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/type/timeofday.rb deleted file mode 100644 index ae79b2f8dceb..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/proto_docs/google/type/timeofday.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 time of day. The date and time zone are either not significant - # or are specified elsewhere. An API may choose to allow leap seconds. Related - # types are [google.type.Date][google.type.Date] and - # `google.protobuf.Timestamp`. - # @!attribute [rw] hours - # @return [::Integer] - # Hours of a day in 24 hour format. Must be greater than or equal to 0 and - # typically must be less than or equal to 23. An API may choose to allow the - # value "24:00:00" for scenarios like business closing time. - # @!attribute [rw] minutes - # @return [::Integer] - # Minutes of an hour. Must be greater than or equal to 0 and less than or - # equal to 59. - # @!attribute [rw] seconds - # @return [::Integer] - # Seconds of a minute. Must be greater than or equal to 0 and typically must - # be less than or equal to 59. An API may allow the value 60 if it allows - # leap-seconds. - # @!attribute [rw] nanos - # @return [::Integer] - # Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 - # and less than or equal to 999,999,999. - class TimeOfDay - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-memorystore-v1/snippets/Gemfile deleted file mode 100644 index 282b208b7d5d..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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-memorystore-v1", path: "../" -else - gem "google-cloud-memorystore-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/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/backup_instance.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/backup_instance.rb deleted file mode 100644 index 002dcdca0964..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/backup_instance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 memorystore_v1_generated_Memorystore_BackupInstance_sync] -require "google/cloud/memorystore/v1" - -## -# Snippet for the backup_instance call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#backup_instance. -# -def backup_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Memorystore::V1::BackupInstanceRequest.new - - # Call the backup_instance method. - result = client.backup_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 memorystore_v1_generated_Memorystore_BackupInstance_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/create_instance.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/create_instance.rb deleted file mode 100644 index 17b43719c9bf..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/create_instance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 memorystore_v1_generated_Memorystore_CreateInstance_sync] -require "google/cloud/memorystore/v1" - -## -# Snippet for the create_instance call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#create_instance. -# -def create_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Memorystore::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 memorystore_v1_generated_Memorystore_CreateInstance_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/delete_backup.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/delete_backup.rb deleted file mode 100644 index dc03d50e11b1..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/delete_backup.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 memorystore_v1_generated_Memorystore_DeleteBackup_sync] -require "google/cloud/memorystore/v1" - -## -# Snippet for the delete_backup call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#delete_backup. -# -def delete_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Memorystore::V1::DeleteBackupRequest.new - - # Call the delete_backup method. - result = client.delete_backup 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 memorystore_v1_generated_Memorystore_DeleteBackup_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/delete_instance.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/delete_instance.rb deleted file mode 100644 index 1052bdd92304..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/delete_instance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 memorystore_v1_generated_Memorystore_DeleteInstance_sync] -require "google/cloud/memorystore/v1" - -## -# Snippet for the delete_instance call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#delete_instance. -# -def delete_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Memorystore::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 memorystore_v1_generated_Memorystore_DeleteInstance_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/export_backup.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/export_backup.rb deleted file mode 100644 index 3a5c9f06865f..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/export_backup.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 memorystore_v1_generated_Memorystore_ExportBackup_sync] -require "google/cloud/memorystore/v1" - -## -# Snippet for the export_backup call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#export_backup. -# -def export_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Memorystore::V1::ExportBackupRequest.new - - # Call the export_backup method. - result = client.export_backup 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 memorystore_v1_generated_Memorystore_ExportBackup_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_backup.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_backup.rb deleted file mode 100644 index dbda32b2923b..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_backup.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 memorystore_v1_generated_Memorystore_GetBackup_sync] -require "google/cloud/memorystore/v1" - -## -# Snippet for the get_backup call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#get_backup. -# -def get_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Memorystore::V1::GetBackupRequest.new - - # Call the get_backup method. - result = client.get_backup request - - # The returned object is of type Google::Cloud::Memorystore::V1::Backup. - p result -end -# [END memorystore_v1_generated_Memorystore_GetBackup_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_backup_collection.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_backup_collection.rb deleted file mode 100644 index 4812db149495..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_backup_collection.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 memorystore_v1_generated_Memorystore_GetBackupCollection_sync] -require "google/cloud/memorystore/v1" - -## -# Snippet for the get_backup_collection call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#get_backup_collection. -# -def get_backup_collection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Memorystore::V1::GetBackupCollectionRequest.new - - # Call the get_backup_collection method. - result = client.get_backup_collection request - - # The returned object is of type Google::Cloud::Memorystore::V1::BackupCollection. - p result -end -# [END memorystore_v1_generated_Memorystore_GetBackupCollection_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_certificate_authority.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_certificate_authority.rb deleted file mode 100644 index c47aa4b96b27..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_certificate_authority.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 memorystore_v1_generated_Memorystore_GetCertificateAuthority_sync] -require "google/cloud/memorystore/v1" - -## -# Snippet for the get_certificate_authority call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#get_certificate_authority. -# -def get_certificate_authority - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest.new - - # Call the get_certificate_authority method. - result = client.get_certificate_authority request - - # The returned object is of type Google::Cloud::Memorystore::V1::CertificateAuthority. - p result -end -# [END memorystore_v1_generated_Memorystore_GetCertificateAuthority_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_instance.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_instance.rb deleted file mode 100644 index 08fbd9772957..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/get_instance.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 memorystore_v1_generated_Memorystore_GetInstance_sync] -require "google/cloud/memorystore/v1" - -## -# Snippet for the get_instance call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#get_instance. -# -def get_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Memorystore::V1::GetInstanceRequest.new - - # Call the get_instance method. - result = client.get_instance request - - # The returned object is of type Google::Cloud::Memorystore::V1::Instance. - p result -end -# [END memorystore_v1_generated_Memorystore_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_backup_collections.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_backup_collections.rb deleted file mode 100644 index 712abdc1a736..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_backup_collections.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 memorystore_v1_generated_Memorystore_ListBackupCollections_sync] -require "google/cloud/memorystore/v1" - -## -# Snippet for the list_backup_collections call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#list_backup_collections. -# -def list_backup_collections - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest.new - - # Call the list_backup_collections method. - result = client.list_backup_collections 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::Memorystore::V1::BackupCollection. - p item - end -end -# [END memorystore_v1_generated_Memorystore_ListBackupCollections_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_backups.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_backups.rb deleted file mode 100644 index 7ae884d1556d..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_backups.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 memorystore_v1_generated_Memorystore_ListBackups_sync] -require "google/cloud/memorystore/v1" - -## -# Snippet for the list_backups call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#list_backups. -# -def list_backups - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Memorystore::V1::ListBackupsRequest.new - - # Call the list_backups method. - result = client.list_backups 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::Memorystore::V1::Backup. - p item - end -end -# [END memorystore_v1_generated_Memorystore_ListBackups_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_instances.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_instances.rb deleted file mode 100644 index 3a79bca62e22..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/list_instances.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 memorystore_v1_generated_Memorystore_ListInstances_sync] -require "google/cloud/memorystore/v1" - -## -# Snippet for the list_instances call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#list_instances. -# -def list_instances - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Memorystore::V1::ListInstancesRequest.new - - # Call the list_instances method. - result = client.list_instances 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::Memorystore::V1::Instance. - p item - end -end -# [END memorystore_v1_generated_Memorystore_ListInstances_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/reschedule_maintenance.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/reschedule_maintenance.rb deleted file mode 100644 index 37b016462398..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/reschedule_maintenance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 memorystore_v1_generated_Memorystore_RescheduleMaintenance_sync] -require "google/cloud/memorystore/v1" - -## -# Snippet for the reschedule_maintenance call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#reschedule_maintenance. -# -def reschedule_maintenance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest.new - - # Call the reschedule_maintenance method. - result = client.reschedule_maintenance 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 memorystore_v1_generated_Memorystore_RescheduleMaintenance_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/update_instance.rb b/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/update_instance.rb deleted file mode 100644 index a99c67ac08ca..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/snippets/memorystore/update_instance.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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 memorystore_v1_generated_Memorystore_UpdateInstance_sync] -require "google/cloud/memorystore/v1" - -## -# Snippet for the update_instance call in the Memorystore 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::Memorystore::V1::Memorystore::Rest::Client#update_instance. -# -def update_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Memorystore::V1::UpdateInstanceRequest.new - - # Call the update_instance method. - result = client.update_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 memorystore_v1_generated_Memorystore_UpdateInstance_sync] diff --git a/owl-bot-staging/google-cloud-memorystore-v1/snippets/snippet_metadata_google.cloud.memorystore.v1.json b/owl-bot-staging/google-cloud-memorystore-v1/snippets/snippet_metadata_google.cloud.memorystore.v1.json deleted file mode 100644 index fdc5f1c5a627..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/snippets/snippet_metadata_google.cloud.memorystore.v1.json +++ /dev/null @@ -1,615 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-memorystore-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.memorystore.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "memorystore_v1_generated_Memorystore_ListInstances_sync", - "title": "Snippet for the list_instances call in the Memorystore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#list_instances.", - "file": "memorystore/list_instances.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_instances", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#list_instances", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Memorystore::V1::ListInstancesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Memorystore::V1::ListInstancesResponse", - "client": { - "short_name": "Memorystore::Rest::Client", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" - }, - "method": { - "short_name": "ListInstances", - "full_name": "google.cloud.memorystore.v1.Memorystore.ListInstances", - "service": { - "short_name": "Memorystore", - "full_name": "google.cloud.memorystore.v1.Memorystore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "memorystore_v1_generated_Memorystore_GetInstance_sync", - "title": "Snippet for the get_instance call in the Memorystore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_instance.", - "file": "memorystore/get_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_instance", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Memorystore::V1::GetInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Memorystore::V1::Instance", - "client": { - "short_name": "Memorystore::Rest::Client", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" - }, - "method": { - "short_name": "GetInstance", - "full_name": "google.cloud.memorystore.v1.Memorystore.GetInstance", - "service": { - "short_name": "Memorystore", - "full_name": "google.cloud.memorystore.v1.Memorystore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "memorystore_v1_generated_Memorystore_CreateInstance_sync", - "title": "Snippet for the create_instance call in the Memorystore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#create_instance.", - "file": "memorystore/create_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_instance", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#create_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Memorystore::V1::CreateInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Memorystore::Rest::Client", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" - }, - "method": { - "short_name": "CreateInstance", - "full_name": "google.cloud.memorystore.v1.Memorystore.CreateInstance", - "service": { - "short_name": "Memorystore", - "full_name": "google.cloud.memorystore.v1.Memorystore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "memorystore_v1_generated_Memorystore_UpdateInstance_sync", - "title": "Snippet for the update_instance call in the Memorystore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#update_instance.", - "file": "memorystore/update_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_instance", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#update_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Memorystore::V1::UpdateInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Memorystore::Rest::Client", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" - }, - "method": { - "short_name": "UpdateInstance", - "full_name": "google.cloud.memorystore.v1.Memorystore.UpdateInstance", - "service": { - "short_name": "Memorystore", - "full_name": "google.cloud.memorystore.v1.Memorystore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "memorystore_v1_generated_Memorystore_DeleteInstance_sync", - "title": "Snippet for the delete_instance call in the Memorystore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#delete_instance.", - "file": "memorystore/delete_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_instance", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#delete_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Memorystore::V1::DeleteInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Memorystore::Rest::Client", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" - }, - "method": { - "short_name": "DeleteInstance", - "full_name": "google.cloud.memorystore.v1.Memorystore.DeleteInstance", - "service": { - "short_name": "Memorystore", - "full_name": "google.cloud.memorystore.v1.Memorystore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "memorystore_v1_generated_Memorystore_GetCertificateAuthority_sync", - "title": "Snippet for the get_certificate_authority call in the Memorystore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_certificate_authority.", - "file": "memorystore/get_certificate_authority.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_certificate_authority", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_certificate_authority", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Memorystore::V1::CertificateAuthority", - "client": { - "short_name": "Memorystore::Rest::Client", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" - }, - "method": { - "short_name": "GetCertificateAuthority", - "full_name": "google.cloud.memorystore.v1.Memorystore.GetCertificateAuthority", - "service": { - "short_name": "Memorystore", - "full_name": "google.cloud.memorystore.v1.Memorystore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "memorystore_v1_generated_Memorystore_GetSharedRegionalCertificateAuthority_sync", - "title": "Snippet for the get_shared_regional_certificate_authority call in the Memorystore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_shared_regional_certificate_authority.", - "file": "memorystore/get_shared_regional_certificate_authority.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_shared_regional_certificate_authority", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_shared_regional_certificate_authority", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority", - "client": { - "short_name": "Memorystore::Rest::Client", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" - }, - "method": { - "short_name": "GetSharedRegionalCertificateAuthority", - "full_name": "google.cloud.memorystore.v1.Memorystore.GetSharedRegionalCertificateAuthority", - "service": { - "short_name": "Memorystore", - "full_name": "google.cloud.memorystore.v1.Memorystore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "memorystore_v1_generated_Memorystore_RescheduleMaintenance_sync", - "title": "Snippet for the reschedule_maintenance call in the Memorystore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#reschedule_maintenance.", - "file": "memorystore/reschedule_maintenance.rb", - "language": "RUBY", - "client_method": { - "short_name": "reschedule_maintenance", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#reschedule_maintenance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Memorystore::Rest::Client", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" - }, - "method": { - "short_name": "RescheduleMaintenance", - "full_name": "google.cloud.memorystore.v1.Memorystore.RescheduleMaintenance", - "service": { - "short_name": "Memorystore", - "full_name": "google.cloud.memorystore.v1.Memorystore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "memorystore_v1_generated_Memorystore_ListBackupCollections_sync", - "title": "Snippet for the list_backup_collections call in the Memorystore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#list_backup_collections.", - "file": "memorystore/list_backup_collections.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backup_collections", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#list_backup_collections", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Memorystore::V1::ListBackupCollectionsResponse", - "client": { - "short_name": "Memorystore::Rest::Client", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" - }, - "method": { - "short_name": "ListBackupCollections", - "full_name": "google.cloud.memorystore.v1.Memorystore.ListBackupCollections", - "service": { - "short_name": "Memorystore", - "full_name": "google.cloud.memorystore.v1.Memorystore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "memorystore_v1_generated_Memorystore_GetBackupCollection_sync", - "title": "Snippet for the get_backup_collection call in the Memorystore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_backup_collection.", - "file": "memorystore/get_backup_collection.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup_collection", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_backup_collection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Memorystore::V1::GetBackupCollectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Memorystore::V1::BackupCollection", - "client": { - "short_name": "Memorystore::Rest::Client", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" - }, - "method": { - "short_name": "GetBackupCollection", - "full_name": "google.cloud.memorystore.v1.Memorystore.GetBackupCollection", - "service": { - "short_name": "Memorystore", - "full_name": "google.cloud.memorystore.v1.Memorystore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "memorystore_v1_generated_Memorystore_ListBackups_sync", - "title": "Snippet for the list_backups call in the Memorystore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#list_backups.", - "file": "memorystore/list_backups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backups", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#list_backups", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Memorystore::V1::ListBackupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Memorystore::V1::ListBackupsResponse", - "client": { - "short_name": "Memorystore::Rest::Client", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" - }, - "method": { - "short_name": "ListBackups", - "full_name": "google.cloud.memorystore.v1.Memorystore.ListBackups", - "service": { - "short_name": "Memorystore", - "full_name": "google.cloud.memorystore.v1.Memorystore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "memorystore_v1_generated_Memorystore_GetBackup_sync", - "title": "Snippet for the get_backup call in the Memorystore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_backup.", - "file": "memorystore/get_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#get_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Memorystore::V1::GetBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Memorystore::V1::Backup", - "client": { - "short_name": "Memorystore::Rest::Client", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" - }, - "method": { - "short_name": "GetBackup", - "full_name": "google.cloud.memorystore.v1.Memorystore.GetBackup", - "service": { - "short_name": "Memorystore", - "full_name": "google.cloud.memorystore.v1.Memorystore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "memorystore_v1_generated_Memorystore_DeleteBackup_sync", - "title": "Snippet for the delete_backup call in the Memorystore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#delete_backup.", - "file": "memorystore/delete_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#delete_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Memorystore::V1::DeleteBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Memorystore::Rest::Client", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" - }, - "method": { - "short_name": "DeleteBackup", - "full_name": "google.cloud.memorystore.v1.Memorystore.DeleteBackup", - "service": { - "short_name": "Memorystore", - "full_name": "google.cloud.memorystore.v1.Memorystore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "memorystore_v1_generated_Memorystore_ExportBackup_sync", - "title": "Snippet for the export_backup call in the Memorystore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#export_backup.", - "file": "memorystore/export_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_backup", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#export_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Memorystore::V1::ExportBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Memorystore::Rest::Client", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" - }, - "method": { - "short_name": "ExportBackup", - "full_name": "google.cloud.memorystore.v1.Memorystore.ExportBackup", - "service": { - "short_name": "Memorystore", - "full_name": "google.cloud.memorystore.v1.Memorystore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "memorystore_v1_generated_Memorystore_BackupInstance_sync", - "title": "Snippet for the backup_instance call in the Memorystore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#backup_instance.", - "file": "memorystore/backup_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "backup_instance", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client#backup_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Memorystore::V1::BackupInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Memorystore::Rest::Client", - "full_name": "::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client" - }, - "method": { - "short_name": "BackupInstance", - "full_name": "google.cloud.memorystore.v1.Memorystore.BackupInstance", - "service": { - "short_name": "Memorystore", - "full_name": "google.cloud.memorystore.v1.Memorystore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-memorystore-v1/test/google/cloud/memorystore/v1/memorystore_rest_test.rb b/owl-bot-staging/google-cloud-memorystore-v1/test/google/cloud/memorystore/v1/memorystore_rest_test.rb deleted file mode 100644 index b8c427935b67..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/test/google/cloud/memorystore/v1/memorystore_rest_test.rb +++ /dev/null @@ -1,929 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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/memorystore/v1/memorystore_pb" -require "google/cloud/memorystore/v1/memorystore/rest" - - -class ::Google::Cloud::Memorystore::V1::Memorystore::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_instances - # Create test objects. - client_result = ::Google::Cloud::Memorystore::V1::ListInstancesResponse.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" - order_by = "hello world" - - list_instances_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_list_instances_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_instances_client_stub do - # Create client - client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_instances parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_instances ::Google::Cloud::Memorystore::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_instances(::Google::Cloud::Memorystore::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_instances_client_stub.call_count - end - end - end - - def test_get_instance - # Create test objects. - client_result = ::Google::Cloud::Memorystore::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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do - # Create client - client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_instance ::Google::Cloud::Memorystore::V1::GetInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_instance(::Google::Cloud::Memorystore::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_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 = {} - request_id = "hello world" - - 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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_create_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_instance_client_stub do - # Create client - client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_instance parent: parent, instance_id: instance_id, instance: instance, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_instance ::Google::Cloud::Memorystore::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_instance(::Google::Cloud::Memorystore::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id), 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_update_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. - update_mask = {} - instance = {} - request_id = "hello world" - - update_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_update_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_instance_client_stub do - # Create client - client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_instance({ update_mask: update_mask, instance: instance, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_instance update_mask: update_mask, instance: instance, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_instance ::Google::Cloud::Memorystore::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_instance({ update_mask: update_mask, instance: instance, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_instance(::Google::Cloud::Memorystore::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_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" - request_id = "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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_delete_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_instance_client_stub do - # Create client - client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_instance({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_instance name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_instance ::Google::Cloud::Memorystore::V1::DeleteInstanceRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_instance({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_instance(::Google::Cloud::Memorystore::V1::DeleteInstanceRequest.new(name: name, request_id: request_id), 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_certificate_authority - # Create test objects. - client_result = ::Google::Cloud::Memorystore::V1::CertificateAuthority.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_certificate_authority_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_get_certificate_authority_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_certificate_authority_client_stub do - # Create client - client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_certificate_authority({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_certificate_authority name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_certificate_authority ::Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_certificate_authority({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_certificate_authority(::Google::Cloud::Memorystore::V1::GetCertificateAuthorityRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_certificate_authority_client_stub.call_count - end - end - end - - def test_get_shared_regional_certificate_authority - # Create test objects. - client_result = ::Google::Cloud::Memorystore::V1::SharedRegionalCertificateAuthority.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_shared_regional_certificate_authority_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_get_shared_regional_certificate_authority_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_shared_regional_certificate_authority_client_stub do - # Create client - client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_shared_regional_certificate_authority({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_shared_regional_certificate_authority name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_shared_regional_certificate_authority ::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_shared_regional_certificate_authority({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_shared_regional_certificate_authority(::Google::Cloud::Memorystore::V1::GetSharedRegionalCertificateAuthorityRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_shared_regional_certificate_authority_client_stub.call_count - end - end - end - - def test_reschedule_maintenance - # 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" - reschedule_type = :RESCHEDULE_TYPE_UNSPECIFIED - schedule_time = {} - - reschedule_maintenance_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_reschedule_maintenance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, reschedule_maintenance_client_stub do - # Create client - client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.reschedule_maintenance({ name: name, reschedule_type: reschedule_type, schedule_time: schedule_time }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.reschedule_maintenance name: name, reschedule_type: reschedule_type, schedule_time: schedule_time do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.reschedule_maintenance ::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest.new(name: name, reschedule_type: reschedule_type, schedule_time: schedule_time) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.reschedule_maintenance({ name: name, reschedule_type: reschedule_type, schedule_time: schedule_time }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.reschedule_maintenance(::Google::Cloud::Memorystore::V1::RescheduleMaintenanceRequest.new(name: name, reschedule_type: reschedule_type, schedule_time: schedule_time), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, reschedule_maintenance_client_stub.call_count - end - end - end - - def test_list_backup_collections - # Create test objects. - client_result = ::Google::Cloud::Memorystore::V1::ListBackupCollectionsResponse.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" - - list_backup_collections_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_list_backup_collections_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backup_collections_client_stub do - # Create client - client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backup_collections({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_backup_collections parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_backup_collections ::Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_backup_collections({ parent: parent, 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 - client.list_backup_collections(::Google::Cloud::Memorystore::V1::ListBackupCollectionsRequest.new(parent: parent, 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_backup_collections_client_stub.call_count - end - end - end - - def test_get_backup_collection - # Create test objects. - client_result = ::Google::Cloud::Memorystore::V1::BackupCollection.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_collection_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_get_backup_collection_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_collection_client_stub do - # Create client - client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup_collection({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup_collection name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup_collection ::Google::Cloud::Memorystore::V1::GetBackupCollectionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup_collection({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup_collection(::Google::Cloud::Memorystore::V1::GetBackupCollectionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_collection_client_stub.call_count - end - end - end - - def test_list_backups - # Create test objects. - client_result = ::Google::Cloud::Memorystore::V1::ListBackupsResponse.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" - - list_backups_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_list_backups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backups_client_stub do - # Create client - client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backups({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_backups parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_backups ::Google::Cloud::Memorystore::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_backups({ parent: parent, 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 - client.list_backups(::Google::Cloud::Memorystore::V1::ListBackupsRequest.new(parent: parent, 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_backups_client_stub.call_count - end - end - end - - def test_get_backup - # Create test objects. - client_result = ::Google::Cloud::Memorystore::V1::Backup.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_get_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_client_stub do - # Create client - client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup ::Google::Cloud::Memorystore::V1::GetBackupRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup(::Google::Cloud::Memorystore::V1::GetBackupRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_client_stub.call_count - end - end - end - - def test_delete_backup - # 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" - request_id = "hello world" - - delete_backup_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_delete_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_client_stub do - # Create client - client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_backup({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_backup name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_backup ::Google::Cloud::Memorystore::V1::DeleteBackupRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_backup({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_backup(::Google::Cloud::Memorystore::V1::DeleteBackupRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_backup_client_stub.call_count - end - end - end - - def test_export_backup - # 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. - gcs_bucket = "hello world" - name = "hello world" - - export_backup_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_export_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_backup_client_stub do - # Create client - client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_backup({ gcs_bucket: gcs_bucket, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_backup gcs_bucket: gcs_bucket, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_backup ::Google::Cloud::Memorystore::V1::ExportBackupRequest.new(gcs_bucket: gcs_bucket, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_backup({ gcs_bucket: gcs_bucket, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_backup(::Google::Cloud::Memorystore::V1::ExportBackupRequest.new(gcs_bucket: gcs_bucket, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_backup_client_stub.call_count - end - end - end - - def test_backup_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" - ttl = {} - backup_id = "hello world" - - backup_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::Memorystore::V1::Memorystore::Rest::ServiceStub.stub :transcode_backup_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, backup_instance_client_stub do - # Create client - client = ::Google::Cloud::Memorystore::V1::Memorystore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.backup_instance({ name: name, ttl: ttl, backup_id: backup_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.backup_instance name: name, ttl: ttl, backup_id: backup_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.backup_instance ::Google::Cloud::Memorystore::V1::BackupInstanceRequest.new(name: name, ttl: ttl, backup_id: backup_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.backup_instance({ name: name, ttl: ttl, backup_id: backup_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.backup_instance(::Google::Cloud::Memorystore::V1::BackupInstanceRequest.new(name: name, ttl: ttl, backup_id: backup_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, backup_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::Memorystore::V1::Memorystore::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::Memorystore::V1::Memorystore::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-memorystore-v1/test/helper.rb b/owl-bot-staging/google-cloud-memorystore-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-memorystore-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# 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. -# 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"