# frozen_string_literal: true

# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Auto-generated by gapic-generator-ruby. DO NOT EDIT!

require "google/cloud/errors"
require "google/cloud/oracledatabase/v1/oracledatabase_pb"
require "google/cloud/oracle_database/v1/oracle_database/rest/service_stub"
require "google/cloud/location/rest"

module Google
  module Cloud
    module OracleDatabase
      module V1
        module OracleDatabase
          module Rest
            ##
            # REST client for the OracleDatabase service.
            #
            # Service describing handlers for resources
            #
            class Client
              # @private
              API_VERSION = ""

              # @private
              DEFAULT_ENDPOINT_TEMPLATE = "oracledatabase.$UNIVERSE_DOMAIN$"

              include Paths

              # @private
              attr_reader :oracle_database_stub

              ##
              # Configure the OracleDatabase Client class.
              #
              # See {::Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client::Configuration}
              # for a description of the configuration fields.
              #
              # @example
              #
              #   # Modify the configuration for all OracleDatabase clients
              #   ::Google::Cloud::OracleDatabase::V1::OracleDatabase::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", "OracleDatabase", "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.timeout = 60.0

                  default_config.rpcs.list_cloud_exadata_infrastructures.timeout = 60.0
                  default_config.rpcs.list_cloud_exadata_infrastructures.retry_policy = {
                    initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
                  }

                  default_config.rpcs.get_cloud_exadata_infrastructure.timeout = 60.0
                  default_config.rpcs.get_cloud_exadata_infrastructure.retry_policy = {
                    initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
                  }

                  default_config.rpcs.list_cloud_vm_clusters.timeout = 60.0
                  default_config.rpcs.list_cloud_vm_clusters.retry_policy = {
                    initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
                  }

                  default_config.rpcs.get_cloud_vm_cluster.timeout = 60.0
                  default_config.rpcs.get_cloud_vm_cluster.retry_policy = {
                    initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
                  }

                  default_config.rpcs.list_entitlements.timeout = 60.0
                  default_config.rpcs.list_entitlements.retry_policy = {
                    initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
                  }

                  default_config.rpcs.list_db_servers.timeout = 60.0
                  default_config.rpcs.list_db_servers.retry_policy = {
                    initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
                  }

                  default_config.rpcs.list_db_nodes.timeout = 60.0
                  default_config.rpcs.list_db_nodes.retry_policy = {
                    initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
                  }

                  default_config.rpcs.list_gi_versions.timeout = 60.0
                  default_config.rpcs.list_gi_versions.retry_policy = {
                    initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
                  }

                  default_config.rpcs.list_db_system_shapes.timeout = 60.0
                  default_config.rpcs.list_db_system_shapes.retry_policy = {
                    initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
                  }

                  default_config.rpcs.list_autonomous_databases.timeout = 60.0
                  default_config.rpcs.list_autonomous_databases.retry_policy = {
                    initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
                  }

                  default_config.rpcs.get_autonomous_database.timeout = 60.0
                  default_config.rpcs.get_autonomous_database.retry_policy = {
                    initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
                  }

                  default_config.rpcs.list_autonomous_db_versions.timeout = 60.0
                  default_config.rpcs.list_autonomous_db_versions.retry_policy = {
                    initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
                  }

                  default_config.rpcs.list_autonomous_database_character_sets.timeout = 60.0
                  default_config.rpcs.list_autonomous_database_character_sets.retry_policy = {
                    initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
                  }

                  default_config.rpcs.list_autonomous_database_backups.timeout = 60.0
                  default_config.rpcs.list_autonomous_database_backups.retry_policy = {
                    initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4]
                  }

                  default_config
                end
                yield @configure if block_given?
                @configure
              end

              ##
              # Configure the OracleDatabase 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::OracleDatabase::V1::OracleDatabase::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
                @oracle_database_stub.universe_domain
              end

              ##
              # Create a new OracleDatabase REST client object.
              #
              # @example
              #
              #   # Create a client using the default configuration
              #   client = ::Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a client using a custom configuration
              #   client = ::Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new do |config|
              #     config.timeout = 10.0
              #   end
              #
              # @yield [config] Configure the OracleDatabase 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::OracleDatabase::V1::OracleDatabase::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

                @oracle_database_stub = ::Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::ServiceStub.new(
                  endpoint: @config.endpoint,
                  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
                  universe_domain: @config.universe_domain,
                  credentials: credentials,
                  logger: @config.logger
                )

                @oracle_database_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 = @oracle_database_stub.endpoint
                  config.universe_domain = @oracle_database_stub.universe_domain
                  config.bindings_override = @config.bindings_override
                  config.logger = @oracle_database_stub.logger if config.respond_to? :logger=
                end
              end

              ##
              # Get the associated client for long-running operations.
              #
              # @return [::Google::Cloud::OracleDatabase::V1::OracleDatabase::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
                @oracle_database_stub.logger
              end

              # Service calls

              ##
              # Lists Exadata Infrastructures in a given project and location.
              #
              # @overload list_cloud_exadata_infrastructures(request, options = nil)
              #   Pass arguments to `list_cloud_exadata_infrastructures` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::ListCloudExadataInfrastructuresRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::ListCloudExadataInfrastructuresRequest, ::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_cloud_exadata_infrastructures(parent: nil, page_size: nil, page_token: nil)
              #   Pass arguments to `list_cloud_exadata_infrastructures` 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 value for CloudExadataInfrastructure in the following
              #     format: projects/\\{project}/locations/\\{location}.
              #   @param page_size [::Integer]
              #     Optional. The maximum number of items to return.
              #     If unspecified, at most 50 Exadata infrastructures will be returned.
              #     The maximum value is 1000; values above 1000 will be coerced to 1000.
              #   @param page_token [::String]
              #     Optional. A token identifying a page of results the server should return.
              # @yield [result, operation] Access the result along with the TransportOperation object
              # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::CloudExadataInfrastructure>]
              # @yieldparam operation [::Gapic::Rest::TransportOperation]
              #
              # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::CloudExadataInfrastructure>]
              #
              # @raise [::Google::Cloud::Error] if the REST call is aborted.
              #
              # @example Basic example
              #   require "google/cloud/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::ListCloudExadataInfrastructuresRequest.new
              #
              #   # Call the list_cloud_exadata_infrastructures method.
              #   result = client.list_cloud_exadata_infrastructures 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::OracleDatabase::V1::CloudExadataInfrastructure.
              #     p item
              #   end
              #
              def list_cloud_exadata_infrastructures request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::ListCloudExadataInfrastructuresRequest

                # 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_cloud_exadata_infrastructures.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::OracleDatabase::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_cloud_exadata_infrastructures.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.list_cloud_exadata_infrastructures.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.list_cloud_exadata_infrastructures request, options do |result, operation|
                  result = ::Gapic::Rest::PagedEnumerable.new @oracle_database_stub, :list_cloud_exadata_infrastructures, "cloud_exadata_infrastructures", 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 Exadata Infrastructure.
              #
              # @overload get_cloud_exadata_infrastructure(request, options = nil)
              #   Pass arguments to `get_cloud_exadata_infrastructure` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::GetCloudExadataInfrastructureRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::GetCloudExadataInfrastructureRequest, ::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_cloud_exadata_infrastructure(name: nil)
              #   Pass arguments to `get_cloud_exadata_infrastructure` 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 Cloud Exadata Infrastructure in the following
              #     format:
              #     projects/\\{project}/locations/\\{location}/cloudExadataInfrastructures/\\{cloud_exadata_infrastructure}.
              # @yield [result, operation] Access the result along with the TransportOperation object
              # @yieldparam result [::Google::Cloud::OracleDatabase::V1::CloudExadataInfrastructure]
              # @yieldparam operation [::Gapic::Rest::TransportOperation]
              #
              # @return [::Google::Cloud::OracleDatabase::V1::CloudExadataInfrastructure]
              #
              # @raise [::Google::Cloud::Error] if the REST call is aborted.
              #
              # @example Basic example
              #   require "google/cloud/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::GetCloudExadataInfrastructureRequest.new
              #
              #   # Call the get_cloud_exadata_infrastructure method.
              #   result = client.get_cloud_exadata_infrastructure request
              #
              #   # The returned object is of type Google::Cloud::OracleDatabase::V1::CloudExadataInfrastructure.
              #   p result
              #
              def get_cloud_exadata_infrastructure request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::GetCloudExadataInfrastructureRequest

                # 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_cloud_exadata_infrastructure.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::OracleDatabase::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_cloud_exadata_infrastructure.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.get_cloud_exadata_infrastructure.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.get_cloud_exadata_infrastructure 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 Exadata Infrastructure in a given project and location.
              #
              # @overload create_cloud_exadata_infrastructure(request, options = nil)
              #   Pass arguments to `create_cloud_exadata_infrastructure` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::CreateCloudExadataInfrastructureRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::CreateCloudExadataInfrastructureRequest, ::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_cloud_exadata_infrastructure(parent: nil, cloud_exadata_infrastructure_id: nil, cloud_exadata_infrastructure: nil, request_id: nil)
              #   Pass arguments to `create_cloud_exadata_infrastructure` 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 value for CloudExadataInfrastructure in the following
              #     format: projects/\\{project}/locations/\\{location}.
              #   @param cloud_exadata_infrastructure_id [::String]
              #     Required. The ID of the Exadata Infrastructure to create. This value is
              #     restricted to (^[a-z]([a-z0-9-]\\{0,61}[a-z0-9])?$) and must be a maximum of
              #     63 characters in length. The value must start with a letter and end with a
              #     letter or a number.
              #   @param cloud_exadata_infrastructure [::Google::Cloud::OracleDatabase::V1::CloudExadataInfrastructure, ::Hash]
              #     Required. Details of the Exadata Infrastructure instance to create.
              #   @param request_id [::String]
              #     Optional. An optional ID to identify the request. This value is used to
              #     identify duplicate requests. If you make a request with the same request ID
              #     and the original request is still in progress or completed, the server
              #     ignores 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/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::CreateCloudExadataInfrastructureRequest.new
              #
              #   # Call the create_cloud_exadata_infrastructure method.
              #   result = client.create_cloud_exadata_infrastructure 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_cloud_exadata_infrastructure request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::CreateCloudExadataInfrastructureRequest

                # 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_cloud_exadata_infrastructure.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::OracleDatabase::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_cloud_exadata_infrastructure.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.create_cloud_exadata_infrastructure.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.create_cloud_exadata_infrastructure 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 Exadata Infrastructure.
              #
              # @overload delete_cloud_exadata_infrastructure(request, options = nil)
              #   Pass arguments to `delete_cloud_exadata_infrastructure` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::DeleteCloudExadataInfrastructureRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::DeleteCloudExadataInfrastructureRequest, ::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_cloud_exadata_infrastructure(name: nil, request_id: nil, force: nil)
              #   Pass arguments to `delete_cloud_exadata_infrastructure` 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 Cloud Exadata Infrastructure in the following
              #     format:
              #     projects/\\{project}/locations/\\{location}/cloudExadataInfrastructures/\\{cloud_exadata_infrastructure}.
              #   @param request_id [::String]
              #     Optional. An optional ID to identify the request. This value is used to
              #     identify duplicate requests. If you make a request with the same request ID
              #     and the original request is still in progress or completed, the server
              #     ignores 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).
              #   @param force [::Boolean]
              #     Optional. If set to true, all VM clusters for this Exadata Infrastructure
              #     will be deleted. An Exadata Infrastructure can only be deleted once all its
              #     VM clusters have been deleted.
              # @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/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::DeleteCloudExadataInfrastructureRequest.new
              #
              #   # Call the delete_cloud_exadata_infrastructure method.
              #   result = client.delete_cloud_exadata_infrastructure 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_cloud_exadata_infrastructure request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::DeleteCloudExadataInfrastructureRequest

                # 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_cloud_exadata_infrastructure.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::OracleDatabase::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_cloud_exadata_infrastructure.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.delete_cloud_exadata_infrastructure.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.delete_cloud_exadata_infrastructure 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 the VM Clusters in a given project and location.
              #
              # @overload list_cloud_vm_clusters(request, options = nil)
              #   Pass arguments to `list_cloud_vm_clusters` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::ListCloudVmClustersRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::ListCloudVmClustersRequest, ::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_cloud_vm_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil)
              #   Pass arguments to `list_cloud_vm_clusters` 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 name of the parent in the following format:
              #     projects/\\{project}/locations/\\{location}.
              #   @param page_size [::Integer]
              #     Optional. The number of VM clusters to return.
              #     If unspecified, at most 50 VM clusters will be returned.
              #     The maximum value is 1,000.
              #   @param page_token [::String]
              #     Optional. A token identifying the page of results the server returns.
              #   @param filter [::String]
              #     Optional. An expression for filtering the results of the request.
              # @yield [result, operation] Access the result along with the TransportOperation object
              # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::CloudVmCluster>]
              # @yieldparam operation [::Gapic::Rest::TransportOperation]
              #
              # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::CloudVmCluster>]
              #
              # @raise [::Google::Cloud::Error] if the REST call is aborted.
              #
              # @example Basic example
              #   require "google/cloud/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::ListCloudVmClustersRequest.new
              #
              #   # Call the list_cloud_vm_clusters method.
              #   result = client.list_cloud_vm_clusters 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::OracleDatabase::V1::CloudVmCluster.
              #     p item
              #   end
              #
              def list_cloud_vm_clusters request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::ListCloudVmClustersRequest

                # 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_cloud_vm_clusters.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::OracleDatabase::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_cloud_vm_clusters.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.list_cloud_vm_clusters.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.list_cloud_vm_clusters request, options do |result, operation|
                  result = ::Gapic::Rest::PagedEnumerable.new @oracle_database_stub, :list_cloud_vm_clusters, "cloud_vm_clusters", 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 VM Cluster.
              #
              # @overload get_cloud_vm_cluster(request, options = nil)
              #   Pass arguments to `get_cloud_vm_cluster` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::GetCloudVmClusterRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::GetCloudVmClusterRequest, ::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_cloud_vm_cluster(name: nil)
              #   Pass arguments to `get_cloud_vm_cluster` 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 Cloud VM Cluster in the following format:
              #     projects/\\{project}/locations/\\{location}/cloudVmClusters/\\{cloud_vm_cluster}.
              # @yield [result, operation] Access the result along with the TransportOperation object
              # @yieldparam result [::Google::Cloud::OracleDatabase::V1::CloudVmCluster]
              # @yieldparam operation [::Gapic::Rest::TransportOperation]
              #
              # @return [::Google::Cloud::OracleDatabase::V1::CloudVmCluster]
              #
              # @raise [::Google::Cloud::Error] if the REST call is aborted.
              #
              # @example Basic example
              #   require "google/cloud/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::GetCloudVmClusterRequest.new
              #
              #   # Call the get_cloud_vm_cluster method.
              #   result = client.get_cloud_vm_cluster request
              #
              #   # The returned object is of type Google::Cloud::OracleDatabase::V1::CloudVmCluster.
              #   p result
              #
              def get_cloud_vm_cluster request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::GetCloudVmClusterRequest

                # 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_cloud_vm_cluster.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::OracleDatabase::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_cloud_vm_cluster.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.get_cloud_vm_cluster.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.get_cloud_vm_cluster 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 VM Cluster in a given project and location.
              #
              # @overload create_cloud_vm_cluster(request, options = nil)
              #   Pass arguments to `create_cloud_vm_cluster` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::CreateCloudVmClusterRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::CreateCloudVmClusterRequest, ::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_cloud_vm_cluster(parent: nil, cloud_vm_cluster_id: nil, cloud_vm_cluster: nil, request_id: nil)
              #   Pass arguments to `create_cloud_vm_cluster` 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 name of the parent in the following format:
              #     projects/\\{project}/locations/\\{location}.
              #   @param cloud_vm_cluster_id [::String]
              #     Required. The ID of the VM Cluster to create. This value is restricted
              #     to (^[a-z]([a-z0-9-]\\{0,61}[a-z0-9])?$) and must be a maximum of 63
              #     characters in length. The value must start with a letter and end with
              #     a letter or a number.
              #   @param cloud_vm_cluster [::Google::Cloud::OracleDatabase::V1::CloudVmCluster, ::Hash]
              #     Required. The resource being created
              #   @param request_id [::String]
              #     Optional. An optional ID to identify the request. This value is used to
              #     identify duplicate requests. If you make a request with the same request ID
              #     and the original request is still in progress or completed, the server
              #     ignores 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/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::CreateCloudVmClusterRequest.new
              #
              #   # Call the create_cloud_vm_cluster method.
              #   result = client.create_cloud_vm_cluster 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_cloud_vm_cluster request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::CreateCloudVmClusterRequest

                # 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_cloud_vm_cluster.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::OracleDatabase::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_cloud_vm_cluster.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.create_cloud_vm_cluster.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.create_cloud_vm_cluster 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 VM Cluster.
              #
              # @overload delete_cloud_vm_cluster(request, options = nil)
              #   Pass arguments to `delete_cloud_vm_cluster` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::DeleteCloudVmClusterRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::DeleteCloudVmClusterRequest, ::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_cloud_vm_cluster(name: nil, request_id: nil, force: nil)
              #   Pass arguments to `delete_cloud_vm_cluster` 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 Cloud VM Cluster in the following format:
              #     projects/\\{project}/locations/\\{location}/cloudVmClusters/\\{cloud_vm_cluster}.
              #   @param request_id [::String]
              #     Optional. An optional ID to identify the request. This value is used to
              #     identify duplicate requests. If you make a request with the same request ID
              #     and the original request is still in progress or completed, the server
              #     ignores 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).
              #   @param force [::Boolean]
              #     Optional. If set to true, all child resources for the VM Cluster will be
              #     deleted. A VM Cluster can only be deleted once all its child resources have
              #     been deleted.
              # @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/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::DeleteCloudVmClusterRequest.new
              #
              #   # Call the delete_cloud_vm_cluster method.
              #   result = client.delete_cloud_vm_cluster 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_cloud_vm_cluster request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::DeleteCloudVmClusterRequest

                # 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_cloud_vm_cluster.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::OracleDatabase::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_cloud_vm_cluster.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.delete_cloud_vm_cluster.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.delete_cloud_vm_cluster 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 the entitlements in a given project.
              #
              # @overload list_entitlements(request, options = nil)
              #   Pass arguments to `list_entitlements` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::ListEntitlementsRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::ListEntitlementsRequest, ::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_entitlements(parent: nil, page_size: nil, page_token: nil)
              #   Pass arguments to `list_entitlements` 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 value for the entitlement in the following format:
              #     projects/\\{project}/locations/\\{location}.
              #   @param page_size [::Integer]
              #     Optional. The maximum number of items to return.
              #     If unspecified, a maximum of 50 entitlements will be returned.
              #     The maximum value is 1000.
              #   @param page_token [::String]
              #     Optional. A token identifying a page of results the server should return.
              # @yield [result, operation] Access the result along with the TransportOperation object
              # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::Entitlement>]
              # @yieldparam operation [::Gapic::Rest::TransportOperation]
              #
              # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::Entitlement>]
              #
              # @raise [::Google::Cloud::Error] if the REST call is aborted.
              #
              # @example Basic example
              #   require "google/cloud/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::ListEntitlementsRequest.new
              #
              #   # Call the list_entitlements method.
              #   result = client.list_entitlements 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::OracleDatabase::V1::Entitlement.
              #     p item
              #   end
              #
              def list_entitlements request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::ListEntitlementsRequest

                # 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_entitlements.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::OracleDatabase::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_entitlements.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.list_entitlements.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.list_entitlements request, options do |result, operation|
                  result = ::Gapic::Rest::PagedEnumerable.new @oracle_database_stub, :list_entitlements, "entitlements", 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

              ##
              # Lists the database servers of an Exadata Infrastructure instance.
              #
              # @overload list_db_servers(request, options = nil)
              #   Pass arguments to `list_db_servers` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::ListDbServersRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::ListDbServersRequest, ::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_db_servers(parent: nil, page_size: nil, page_token: nil)
              #   Pass arguments to `list_db_servers` 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 value for database server in the following format:
              #     projects/\\{project}/locations/\\{location}/cloudExadataInfrastructures/\\{cloudExadataInfrastructure}.
              #   @param page_size [::Integer]
              #     Optional. The maximum number of items to return.
              #     If unspecified, a maximum of 50 db servers will be returned.
              #     The maximum value is 1000; values above 1000 will be reset to 1000.
              #   @param page_token [::String]
              #     Optional. A token identifying a page of results the server should return.
              # @yield [result, operation] Access the result along with the TransportOperation object
              # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::DbServer>]
              # @yieldparam operation [::Gapic::Rest::TransportOperation]
              #
              # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::DbServer>]
              #
              # @raise [::Google::Cloud::Error] if the REST call is aborted.
              #
              # @example Basic example
              #   require "google/cloud/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::ListDbServersRequest.new
              #
              #   # Call the list_db_servers method.
              #   result = client.list_db_servers 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::OracleDatabase::V1::DbServer.
              #     p item
              #   end
              #
              def list_db_servers request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::ListDbServersRequest

                # 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_db_servers.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::OracleDatabase::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_db_servers.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.list_db_servers.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.list_db_servers request, options do |result, operation|
                  result = ::Gapic::Rest::PagedEnumerable.new @oracle_database_stub, :list_db_servers, "db_servers", 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

              ##
              # Lists the database nodes of a VM Cluster.
              #
              # @overload list_db_nodes(request, options = nil)
              #   Pass arguments to `list_db_nodes` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::ListDbNodesRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::ListDbNodesRequest, ::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_db_nodes(parent: nil, page_size: nil, page_token: nil)
              #   Pass arguments to `list_db_nodes` 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 value for database node in the following format:
              #     projects/\\{project}/locations/\\{location}/cloudVmClusters/\\{cloudVmCluster}.
              #   @param page_size [::Integer]
              #     Optional. The maximum number of items to return.
              #     If unspecified, at most 50 db nodes will be returned.
              #     The maximum value is 1000; values above 1000 will be coerced to 1000.
              #   @param page_token [::String]
              #     Optional. A token identifying a page of results the node should return.
              # @yield [result, operation] Access the result along with the TransportOperation object
              # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::DbNode>]
              # @yieldparam operation [::Gapic::Rest::TransportOperation]
              #
              # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::DbNode>]
              #
              # @raise [::Google::Cloud::Error] if the REST call is aborted.
              #
              # @example Basic example
              #   require "google/cloud/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::ListDbNodesRequest.new
              #
              #   # Call the list_db_nodes method.
              #   result = client.list_db_nodes 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::OracleDatabase::V1::DbNode.
              #     p item
              #   end
              #
              def list_db_nodes request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::ListDbNodesRequest

                # 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_db_nodes.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::OracleDatabase::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_db_nodes.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.list_db_nodes.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.list_db_nodes request, options do |result, operation|
                  result = ::Gapic::Rest::PagedEnumerable.new @oracle_database_stub, :list_db_nodes, "db_nodes", 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

              ##
              # Lists all the valid Oracle Grid Infrastructure (GI) versions for the given
              # project and location.
              #
              # @overload list_gi_versions(request, options = nil)
              #   Pass arguments to `list_gi_versions` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::ListGiVersionsRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::ListGiVersionsRequest, ::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_gi_versions(parent: nil, page_size: nil, page_token: nil)
              #   Pass arguments to `list_gi_versions` via keyword arguments. Note that at
              #   least one keyword argument is required. To specify no parameters, or to keep all
              #   the default parameter values, pass an empty Hash as a request object (see above).
              #
              #   @param parent [::String]
              #     Required. The parent value for Grid Infrastructure Version in the following
              #     format: Format: projects/\\{project}/locations/\\{location}.
              #   @param page_size [::Integer]
              #     Optional. The maximum number of items to return.
              #     If unspecified, a maximum of 50 Oracle Grid Infrastructure (GI) versions
              #     will be returned. The maximum value is 1000; values above 1000 will be
              #     reset to 1000.
              #   @param page_token [::String]
              #     Optional. A token identifying a page of results the server should return.
              # @yield [result, operation] Access the result along with the TransportOperation object
              # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::GiVersion>]
              # @yieldparam operation [::Gapic::Rest::TransportOperation]
              #
              # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::GiVersion>]
              #
              # @raise [::Google::Cloud::Error] if the REST call is aborted.
              #
              # @example Basic example
              #   require "google/cloud/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::ListGiVersionsRequest.new
              #
              #   # Call the list_gi_versions method.
              #   result = client.list_gi_versions request
              #
              #   # The returned object is of type Gapic::PagedEnumerable. You can iterate
              #   # over elements, and API calls will be issued to fetch pages as needed.
              #   result.each do |item|
              #     # Each element is of type ::Google::Cloud::OracleDatabase::V1::GiVersion.
              #     p item
              #   end
              #
              def list_gi_versions request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::ListGiVersionsRequest

                # 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_gi_versions.metadata.to_h

                # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
                call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
                  lib_name: @config.lib_name, lib_version: @config.lib_version,
                  gapic_version: ::Google::Cloud::OracleDatabase::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_gi_versions.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.list_gi_versions.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.list_gi_versions request, options do |result, operation|
                  result = ::Gapic::Rest::PagedEnumerable.new @oracle_database_stub, :list_gi_versions, "gi_versions", request, result, options
                  yield result, operation if block_given?
                  throw :response, result
                end
              rescue ::Gapic::Rest::Error => e
                raise ::Google::Cloud::Error.from_error(e)
              end

              ##
              # Lists the database system shapes available for the project and location.
              #
              # @overload list_db_system_shapes(request, options = nil)
              #   Pass arguments to `list_db_system_shapes` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::ListDbSystemShapesRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::ListDbSystemShapesRequest, ::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_db_system_shapes(parent: nil, page_size: nil, page_token: nil)
              #   Pass arguments to `list_db_system_shapes` 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 value for Database System Shapes in the following
              #     format: projects/\\{project}/locations/\\{location}.
              #   @param page_size [::Integer]
              #     Optional. The maximum number of items to return.
              #     If unspecified, at most 50 database system shapes will be returned.
              #     The maximum value is 1000; values above 1000 will be coerced to 1000.
              #   @param page_token [::String]
              #     Optional. A token identifying a page of results the server should return.
              # @yield [result, operation] Access the result along with the TransportOperation object
              # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::DbSystemShape>]
              # @yieldparam operation [::Gapic::Rest::TransportOperation]
              #
              # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::DbSystemShape>]
              #
              # @raise [::Google::Cloud::Error] if the REST call is aborted.
              #
              # @example Basic example
              #   require "google/cloud/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::ListDbSystemShapesRequest.new
              #
              #   # Call the list_db_system_shapes method.
              #   result = client.list_db_system_shapes 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::OracleDatabase::V1::DbSystemShape.
              #     p item
              #   end
              #
              def list_db_system_shapes request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::ListDbSystemShapesRequest

                # 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_db_system_shapes.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::OracleDatabase::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_db_system_shapes.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.list_db_system_shapes.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.list_db_system_shapes request, options do |result, operation|
                  result = ::Gapic::Rest::PagedEnumerable.new @oracle_database_stub, :list_db_system_shapes, "db_system_shapes", 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

              ##
              # Lists the Autonomous Databases in a given project and location.
              #
              # @overload list_autonomous_databases(request, options = nil)
              #   Pass arguments to `list_autonomous_databases` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::ListAutonomousDatabasesRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::ListAutonomousDatabasesRequest, ::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_autonomous_databases(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
              #   Pass arguments to `list_autonomous_databases` 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 value for the Autonomous Database in the following
              #     format: projects/\\{project}/locations/\\{location}.
              #   @param page_size [::Integer]
              #     Optional. The maximum number of items to return.
              #     If unspecified, at most 50 Autonomous Database will be returned.
              #     The maximum value is 1000; values above 1000 will be coerced to 1000.
              #   @param page_token [::String]
              #     Optional. A token identifying a page of results the server should return.
              #   @param filter [::String]
              #     Optional. An expression for filtering the results of the request.
              #   @param order_by [::String]
              #     Optional. An expression for ordering the results of the request.
              # @yield [result, operation] Access the result along with the TransportOperation object
              # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::AutonomousDatabase>]
              # @yieldparam operation [::Gapic::Rest::TransportOperation]
              #
              # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::AutonomousDatabase>]
              #
              # @raise [::Google::Cloud::Error] if the REST call is aborted.
              #
              # @example Basic example
              #   require "google/cloud/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::ListAutonomousDatabasesRequest.new
              #
              #   # Call the list_autonomous_databases method.
              #   result = client.list_autonomous_databases 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::OracleDatabase::V1::AutonomousDatabase.
              #     p item
              #   end
              #
              def list_autonomous_databases request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::ListAutonomousDatabasesRequest

                # 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_autonomous_databases.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::OracleDatabase::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_autonomous_databases.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.list_autonomous_databases.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.list_autonomous_databases request, options do |result, operation|
                  result = ::Gapic::Rest::PagedEnumerable.new @oracle_database_stub, :list_autonomous_databases, "autonomous_databases", 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 single Autonomous Database.
              #
              # @overload get_autonomous_database(request, options = nil)
              #   Pass arguments to `get_autonomous_database` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::GetAutonomousDatabaseRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::GetAutonomousDatabaseRequest, ::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_autonomous_database(name: nil)
              #   Pass arguments to `get_autonomous_database` 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 Autonomous Database in the following format:
              #     projects/\\{project}/locations/\\{location}/autonomousDatabases/\\{autonomous_database}.
              # @yield [result, operation] Access the result along with the TransportOperation object
              # @yieldparam result [::Google::Cloud::OracleDatabase::V1::AutonomousDatabase]
              # @yieldparam operation [::Gapic::Rest::TransportOperation]
              #
              # @return [::Google::Cloud::OracleDatabase::V1::AutonomousDatabase]
              #
              # @raise [::Google::Cloud::Error] if the REST call is aborted.
              #
              # @example Basic example
              #   require "google/cloud/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::GetAutonomousDatabaseRequest.new
              #
              #   # Call the get_autonomous_database method.
              #   result = client.get_autonomous_database request
              #
              #   # The returned object is of type Google::Cloud::OracleDatabase::V1::AutonomousDatabase.
              #   p result
              #
              def get_autonomous_database request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::GetAutonomousDatabaseRequest

                # 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_autonomous_database.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::OracleDatabase::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_autonomous_database.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.get_autonomous_database.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.get_autonomous_database 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 Autonomous Database in a given project and location.
              #
              # @overload create_autonomous_database(request, options = nil)
              #   Pass arguments to `create_autonomous_database` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::CreateAutonomousDatabaseRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::CreateAutonomousDatabaseRequest, ::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_autonomous_database(parent: nil, autonomous_database_id: nil, autonomous_database: nil, request_id: nil)
              #   Pass arguments to `create_autonomous_database` 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 name of the parent in the following format:
              #     projects/\\{project}/locations/\\{location}.
              #   @param autonomous_database_id [::String]
              #     Required. The ID of the Autonomous Database to create. This value is
              #     restricted to (^[a-z]([a-z0-9-]\\{0,61}[a-z0-9])?$) and must be a maximum of
              #     63 characters in length. The value must start with a letter and end with a
              #     letter or a number.
              #   @param autonomous_database [::Google::Cloud::OracleDatabase::V1::AutonomousDatabase, ::Hash]
              #     Required. The Autonomous Database being created.
              #   @param request_id [::String]
              #     Optional. An optional ID to identify the request. This value is used to
              #     identify duplicate requests. If you make a request with the same request ID
              #     and the original request is still in progress or completed, the server
              #     ignores 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/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::CreateAutonomousDatabaseRequest.new
              #
              #   # Call the create_autonomous_database method.
              #   result = client.create_autonomous_database 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_autonomous_database request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::CreateAutonomousDatabaseRequest

                # 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_autonomous_database.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::OracleDatabase::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_autonomous_database.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.create_autonomous_database.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.create_autonomous_database 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 Autonomous Database.
              #
              # @overload delete_autonomous_database(request, options = nil)
              #   Pass arguments to `delete_autonomous_database` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::DeleteAutonomousDatabaseRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::DeleteAutonomousDatabaseRequest, ::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_autonomous_database(name: nil, request_id: nil)
              #   Pass arguments to `delete_autonomous_database` 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 resource in the following format:
              #     projects/\\{project}/locations/\\{location}/autonomousDatabases/\\{autonomous_database}.
              #   @param request_id [::String]
              #     Optional. An optional ID to identify the request. This value is used to
              #     identify duplicate requests. If you make a request with the same request ID
              #     and the original request is still in progress or completed, the server
              #     ignores 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/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::DeleteAutonomousDatabaseRequest.new
              #
              #   # Call the delete_autonomous_database method.
              #   result = client.delete_autonomous_database 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_autonomous_database request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::DeleteAutonomousDatabaseRequest

                # 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_autonomous_database.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::OracleDatabase::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_autonomous_database.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.delete_autonomous_database.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.delete_autonomous_database 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

              ##
              # Restores a single Autonomous Database.
              #
              # @overload restore_autonomous_database(request, options = nil)
              #   Pass arguments to `restore_autonomous_database` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::RestoreAutonomousDatabaseRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::RestoreAutonomousDatabaseRequest, ::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 restore_autonomous_database(name: nil, restore_time: nil)
              #   Pass arguments to `restore_autonomous_database` 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 Autonomous Database in the following format:
              #     projects/\\{project}/locations/\\{location}/autonomousDatabases/\\{autonomous_database}.
              #   @param restore_time [::Google::Protobuf::Timestamp, ::Hash]
              #     Required. The time and date to restore the database to.
              # @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/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::RestoreAutonomousDatabaseRequest.new
              #
              #   # Call the restore_autonomous_database method.
              #   result = client.restore_autonomous_database 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 restore_autonomous_database request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::RestoreAutonomousDatabaseRequest

                # 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.restore_autonomous_database.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::OracleDatabase::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.restore_autonomous_database.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.restore_autonomous_database.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.restore_autonomous_database 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

              ##
              # Generates a wallet for an Autonomous Database.
              #
              # @overload generate_autonomous_database_wallet(request, options = nil)
              #   Pass arguments to `generate_autonomous_database_wallet` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::GenerateAutonomousDatabaseWalletRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::GenerateAutonomousDatabaseWalletRequest, ::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 generate_autonomous_database_wallet(name: nil, type: nil, is_regional: nil, password: nil)
              #   Pass arguments to `generate_autonomous_database_wallet` 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 Autonomous Database in the following format:
              #     projects/\\{project}/locations/\\{location}/autonomousDatabases/\\{autonomous_database}.
              #   @param type [::Google::Cloud::OracleDatabase::V1::GenerateType]
              #     Optional. The type of wallet generation for the Autonomous Database. The
              #     default value is SINGLE.
              #   @param is_regional [::Boolean]
              #     Optional. True when requesting regional connection strings in PDB connect
              #     info, applicable to cross-region Data Guard only.
              #   @param password [::String]
              #     Required. The password used to encrypt the keys inside the wallet. The
              #     password must be a minimum of 8 characters.
              # @yield [result, operation] Access the result along with the TransportOperation object
              # @yieldparam result [::Google::Cloud::OracleDatabase::V1::GenerateAutonomousDatabaseWalletResponse]
              # @yieldparam operation [::Gapic::Rest::TransportOperation]
              #
              # @return [::Google::Cloud::OracleDatabase::V1::GenerateAutonomousDatabaseWalletResponse]
              #
              # @raise [::Google::Cloud::Error] if the REST call is aborted.
              #
              # @example Basic example
              #   require "google/cloud/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::GenerateAutonomousDatabaseWalletRequest.new
              #
              #   # Call the generate_autonomous_database_wallet method.
              #   result = client.generate_autonomous_database_wallet request
              #
              #   # The returned object is of type Google::Cloud::OracleDatabase::V1::GenerateAutonomousDatabaseWalletResponse.
              #   p result
              #
              def generate_autonomous_database_wallet request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::GenerateAutonomousDatabaseWalletRequest

                # 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.generate_autonomous_database_wallet.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::OracleDatabase::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.generate_autonomous_database_wallet.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.generate_autonomous_database_wallet.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.generate_autonomous_database_wallet 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 the available Autonomous Database versions for a project and
              # location.
              #
              # @overload list_autonomous_db_versions(request, options = nil)
              #   Pass arguments to `list_autonomous_db_versions` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::ListAutonomousDbVersionsRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::ListAutonomousDbVersionsRequest, ::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_autonomous_db_versions(parent: nil, page_size: nil, page_token: nil)
              #   Pass arguments to `list_autonomous_db_versions` via keyword arguments. Note that at
              #   least one keyword argument is required. To specify no parameters, or to keep all
              #   the default parameter values, pass an empty Hash as a request object (see above).
              #
              #   @param parent [::String]
              #     Required. The parent value for the Autonomous Database in the following
              #     format: projects/\\{project}/locations/\\{location}.
              #   @param page_size [::Integer]
              #     Optional. The maximum number of items to return.
              #     If unspecified, at most 50 Autonomous DB Versions will be returned.
              #     The maximum value is 1000; values above 1000 will be coerced to 1000.
              #   @param page_token [::String]
              #     Optional. A token identifying a page of results the server should return.
              # @yield [result, operation] Access the result along with the TransportOperation object
              # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::AutonomousDbVersion>]
              # @yieldparam operation [::Gapic::Rest::TransportOperation]
              #
              # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::AutonomousDbVersion>]
              #
              # @raise [::Google::Cloud::Error] if the REST call is aborted.
              #
              # @example Basic example
              #   require "google/cloud/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::ListAutonomousDbVersionsRequest.new
              #
              #   # Call the list_autonomous_db_versions method.
              #   result = client.list_autonomous_db_versions request
              #
              #   # The returned object is of type Gapic::PagedEnumerable. You can iterate
              #   # over elements, and API calls will be issued to fetch pages as needed.
              #   result.each do |item|
              #     # Each element is of type ::Google::Cloud::OracleDatabase::V1::AutonomousDbVersion.
              #     p item
              #   end
              #
              def list_autonomous_db_versions request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::ListAutonomousDbVersionsRequest

                # 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_autonomous_db_versions.metadata.to_h

                # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
                call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
                  lib_name: @config.lib_name, lib_version: @config.lib_version,
                  gapic_version: ::Google::Cloud::OracleDatabase::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_autonomous_db_versions.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.list_autonomous_db_versions.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.list_autonomous_db_versions request, options do |result, operation|
                  result = ::Gapic::Rest::PagedEnumerable.new @oracle_database_stub, :list_autonomous_db_versions, "autonomous_db_versions", request, result, options
                  yield result, operation if block_given?
                  throw :response, result
                end
              rescue ::Gapic::Rest::Error => e
                raise ::Google::Cloud::Error.from_error(e)
              end

              ##
              # Lists Autonomous Database Character Sets in a given project and location.
              #
              # @overload list_autonomous_database_character_sets(request, options = nil)
              #   Pass arguments to `list_autonomous_database_character_sets` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::ListAutonomousDatabaseCharacterSetsRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::ListAutonomousDatabaseCharacterSetsRequest, ::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_autonomous_database_character_sets(parent: nil, page_size: nil, page_token: nil, filter: nil)
              #   Pass arguments to `list_autonomous_database_character_sets` 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 value for the Autonomous Database in the following
              #     format: projects/\\{project}/locations/\\{location}.
              #   @param page_size [::Integer]
              #     Optional. The maximum number of items to return.
              #     If unspecified, at most 50 Autonomous DB Character Sets will be returned.
              #     The maximum value is 1000; values above 1000 will be coerced to 1000.
              #   @param page_token [::String]
              #     Optional. A token identifying a page of results the server should return.
              #   @param filter [::String]
              #     Optional. An expression for filtering the results of the request. Only the
              #     **character_set_type** field is supported in the following format:
              #     `character_set_type="{characterSetType}"`. Accepted values include
              #     `DATABASE` and `NATIONAL`.
              # @yield [result, operation] Access the result along with the TransportOperation object
              # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::AutonomousDatabaseCharacterSet>]
              # @yieldparam operation [::Gapic::Rest::TransportOperation]
              #
              # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::AutonomousDatabaseCharacterSet>]
              #
              # @raise [::Google::Cloud::Error] if the REST call is aborted.
              #
              # @example Basic example
              #   require "google/cloud/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::ListAutonomousDatabaseCharacterSetsRequest.new
              #
              #   # Call the list_autonomous_database_character_sets method.
              #   result = client.list_autonomous_database_character_sets 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::OracleDatabase::V1::AutonomousDatabaseCharacterSet.
              #     p item
              #   end
              #
              def list_autonomous_database_character_sets request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::ListAutonomousDatabaseCharacterSetsRequest

                # 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_autonomous_database_character_sets.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::OracleDatabase::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_autonomous_database_character_sets.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.list_autonomous_database_character_sets.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.list_autonomous_database_character_sets request, options do |result, operation|
                  result = ::Gapic::Rest::PagedEnumerable.new @oracle_database_stub, :list_autonomous_database_character_sets, "autonomous_database_character_sets", 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

              ##
              # Lists the long-term and automatic backups of an Autonomous Database.
              #
              # @overload list_autonomous_database_backups(request, options = nil)
              #   Pass arguments to `list_autonomous_database_backups` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::ListAutonomousDatabaseBackupsRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::ListAutonomousDatabaseBackupsRequest, ::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_autonomous_database_backups(parent: nil, filter: nil, page_size: nil, page_token: nil)
              #   Pass arguments to `list_autonomous_database_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 parent value for ListAutonomousDatabaseBackups in the
              #     following format: projects/\\{project}/locations/\\{location}.
              #   @param filter [::String]
              #     Optional. An expression for filtering the results of the request. Only the
              #     **autonomous_database_id** field is supported in the following format:
              #     `autonomous_database_id="{autonomous_database_id}"`. The accepted values
              #     must be a valid Autonomous Database ID, limited to the naming
              #     restrictions of the ID: ^[a-z]([a-z0-9-]\\{0,61}[a-z0-9])?$).
              #     The ID must start with a letter, end with a letter or a number, and be
              #     a maximum of 63 characters.
              #   @param page_size [::Integer]
              #     Optional. The maximum number of items to return.
              #     If unspecified, at most 50 Autonomous DB Backups will be returned.
              #     The maximum value is 1000; values above 1000 will be coerced to 1000.
              #   @param page_token [::String]
              #     Optional. A token identifying a page of results the server should return.
              # @yield [result, operation] Access the result along with the TransportOperation object
              # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::AutonomousDatabaseBackup>]
              # @yieldparam operation [::Gapic::Rest::TransportOperation]
              #
              # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::OracleDatabase::V1::AutonomousDatabaseBackup>]
              #
              # @raise [::Google::Cloud::Error] if the REST call is aborted.
              #
              # @example Basic example
              #   require "google/cloud/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::ListAutonomousDatabaseBackupsRequest.new
              #
              #   # Call the list_autonomous_database_backups method.
              #   result = client.list_autonomous_database_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::OracleDatabase::V1::AutonomousDatabaseBackup.
              #     p item
              #   end
              #
              def list_autonomous_database_backups request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::ListAutonomousDatabaseBackupsRequest

                # 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_autonomous_database_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::OracleDatabase::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_autonomous_database_backups.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.list_autonomous_database_backups.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.list_autonomous_database_backups request, options do |result, operation|
                  result = ::Gapic::Rest::PagedEnumerable.new @oracle_database_stub, :list_autonomous_database_backups, "autonomous_database_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

              ##
              # Stops an Autonomous Database.
              #
              # @overload stop_autonomous_database(request, options = nil)
              #   Pass arguments to `stop_autonomous_database` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::StopAutonomousDatabaseRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::StopAutonomousDatabaseRequest, ::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 stop_autonomous_database(name: nil)
              #   Pass arguments to `stop_autonomous_database` 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 Autonomous Database in the following format:
              #     projects/\\{project}/locations/\\{location}/autonomousDatabases/\\{autonomous_database}.
              # @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/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::StopAutonomousDatabaseRequest.new
              #
              #   # Call the stop_autonomous_database method.
              #   result = client.stop_autonomous_database 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 stop_autonomous_database request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::StopAutonomousDatabaseRequest

                # 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.stop_autonomous_database.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::OracleDatabase::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.stop_autonomous_database.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.stop_autonomous_database.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.stop_autonomous_database 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

              ##
              # Starts an Autonomous Database.
              #
              # @overload start_autonomous_database(request, options = nil)
              #   Pass arguments to `start_autonomous_database` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::StartAutonomousDatabaseRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::StartAutonomousDatabaseRequest, ::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 start_autonomous_database(name: nil)
              #   Pass arguments to `start_autonomous_database` 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 Autonomous Database in the following format:
              #     projects/\\{project}/locations/\\{location}/autonomousDatabases/\\{autonomous_database}.
              # @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/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::StartAutonomousDatabaseRequest.new
              #
              #   # Call the start_autonomous_database method.
              #   result = client.start_autonomous_database 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 start_autonomous_database request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::StartAutonomousDatabaseRequest

                # 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.start_autonomous_database.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::OracleDatabase::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.start_autonomous_database.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.start_autonomous_database.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.start_autonomous_database 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

              ##
              # Restarts an Autonomous Database.
              #
              # @overload restart_autonomous_database(request, options = nil)
              #   Pass arguments to `restart_autonomous_database` via a request object, either of type
              #   {::Google::Cloud::OracleDatabase::V1::RestartAutonomousDatabaseRequest} or an equivalent Hash.
              #
              #   @param request [::Google::Cloud::OracleDatabase::V1::RestartAutonomousDatabaseRequest, ::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 restart_autonomous_database(name: nil)
              #   Pass arguments to `restart_autonomous_database` 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 Autonomous Database in the following format:
              #     projects/\\{project}/locations/\\{location}/autonomousDatabases/\\{autonomous_database}.
              # @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/oracle_database/v1"
              #
              #   # Create a client object. The client can be reused for multiple calls.
              #   client = Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new
              #
              #   # Create a request. To set request fields, pass in keyword arguments.
              #   request = Google::Cloud::OracleDatabase::V1::RestartAutonomousDatabaseRequest.new
              #
              #   # Call the restart_autonomous_database method.
              #   result = client.restart_autonomous_database 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 restart_autonomous_database request, options = nil
                raise ::ArgumentError, "request must be provided" if request.nil?

                request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OracleDatabase::V1::RestartAutonomousDatabaseRequest

                # 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.restart_autonomous_database.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::OracleDatabase::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.restart_autonomous_database.timeout,
                                       metadata:     call_metadata,
                                       retry_policy: @config.rpcs.restart_autonomous_database.retry_policy

                options.apply_defaults timeout:      @config.timeout,
                                       metadata:     @config.metadata,
                                       retry_policy: @config.retry_policy

                @oracle_database_stub.restart_autonomous_database 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 OracleDatabase REST API.
              #
              # This class represents the configuration for OracleDatabase 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::OracleDatabase::V1::OracleDatabase::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_cloud_exadata_infrastructures to 20 seconds,
              #   # and all remaining timeouts to 10 seconds.
              #   ::Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.configure do |config|
              #     config.timeout = 10.0
              #     config.rpcs.list_cloud_exadata_infrastructures.timeout = 20.0
              #   end
              #
              #   # Apply the above configuration only to a new client.
              #   client = ::Google::Cloud::OracleDatabase::V1::OracleDatabase::Rest::Client.new do |config|
              #     config.timeout = 10.0
              #     config.rpcs.list_cloud_exadata_infrastructures.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<String>`) - 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 = "oracledatabase.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 OracleDatabase 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<String>`) - The error codes that should
                #         trigger a retry.
                #
                class Rpcs
                  ##
                  # RPC-specific configuration for `list_cloud_exadata_infrastructures`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :list_cloud_exadata_infrastructures
                  ##
                  # RPC-specific configuration for `get_cloud_exadata_infrastructure`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :get_cloud_exadata_infrastructure
                  ##
                  # RPC-specific configuration for `create_cloud_exadata_infrastructure`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :create_cloud_exadata_infrastructure
                  ##
                  # RPC-specific configuration for `delete_cloud_exadata_infrastructure`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :delete_cloud_exadata_infrastructure
                  ##
                  # RPC-specific configuration for `list_cloud_vm_clusters`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :list_cloud_vm_clusters
                  ##
                  # RPC-specific configuration for `get_cloud_vm_cluster`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :get_cloud_vm_cluster
                  ##
                  # RPC-specific configuration for `create_cloud_vm_cluster`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :create_cloud_vm_cluster
                  ##
                  # RPC-specific configuration for `delete_cloud_vm_cluster`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :delete_cloud_vm_cluster
                  ##
                  # RPC-specific configuration for `list_entitlements`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :list_entitlements
                  ##
                  # RPC-specific configuration for `list_db_servers`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :list_db_servers
                  ##
                  # RPC-specific configuration for `list_db_nodes`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :list_db_nodes
                  ##
                  # RPC-specific configuration for `list_gi_versions`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :list_gi_versions
                  ##
                  # RPC-specific configuration for `list_db_system_shapes`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :list_db_system_shapes
                  ##
                  # RPC-specific configuration for `list_autonomous_databases`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :list_autonomous_databases
                  ##
                  # RPC-specific configuration for `get_autonomous_database`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :get_autonomous_database
                  ##
                  # RPC-specific configuration for `create_autonomous_database`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :create_autonomous_database
                  ##
                  # RPC-specific configuration for `delete_autonomous_database`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :delete_autonomous_database
                  ##
                  # RPC-specific configuration for `restore_autonomous_database`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :restore_autonomous_database
                  ##
                  # RPC-specific configuration for `generate_autonomous_database_wallet`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :generate_autonomous_database_wallet
                  ##
                  # RPC-specific configuration for `list_autonomous_db_versions`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :list_autonomous_db_versions
                  ##
                  # RPC-specific configuration for `list_autonomous_database_character_sets`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :list_autonomous_database_character_sets
                  ##
                  # RPC-specific configuration for `list_autonomous_database_backups`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :list_autonomous_database_backups
                  ##
                  # RPC-specific configuration for `stop_autonomous_database`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :stop_autonomous_database
                  ##
                  # RPC-specific configuration for `start_autonomous_database`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :start_autonomous_database
                  ##
                  # RPC-specific configuration for `restart_autonomous_database`
                  # @return [::Gapic::Config::Method]
                  #
                  attr_reader :restart_autonomous_database

                  # @private
                  def initialize parent_rpcs = nil
                    list_cloud_exadata_infrastructures_config = parent_rpcs.list_cloud_exadata_infrastructures if parent_rpcs.respond_to? :list_cloud_exadata_infrastructures
                    @list_cloud_exadata_infrastructures = ::Gapic::Config::Method.new list_cloud_exadata_infrastructures_config
                    get_cloud_exadata_infrastructure_config = parent_rpcs.get_cloud_exadata_infrastructure if parent_rpcs.respond_to? :get_cloud_exadata_infrastructure
                    @get_cloud_exadata_infrastructure = ::Gapic::Config::Method.new get_cloud_exadata_infrastructure_config
                    create_cloud_exadata_infrastructure_config = parent_rpcs.create_cloud_exadata_infrastructure if parent_rpcs.respond_to? :create_cloud_exadata_infrastructure
                    @create_cloud_exadata_infrastructure = ::Gapic::Config::Method.new create_cloud_exadata_infrastructure_config
                    delete_cloud_exadata_infrastructure_config = parent_rpcs.delete_cloud_exadata_infrastructure if parent_rpcs.respond_to? :delete_cloud_exadata_infrastructure
                    @delete_cloud_exadata_infrastructure = ::Gapic::Config::Method.new delete_cloud_exadata_infrastructure_config
                    list_cloud_vm_clusters_config = parent_rpcs.list_cloud_vm_clusters if parent_rpcs.respond_to? :list_cloud_vm_clusters
                    @list_cloud_vm_clusters = ::Gapic::Config::Method.new list_cloud_vm_clusters_config
                    get_cloud_vm_cluster_config = parent_rpcs.get_cloud_vm_cluster if parent_rpcs.respond_to? :get_cloud_vm_cluster
                    @get_cloud_vm_cluster = ::Gapic::Config::Method.new get_cloud_vm_cluster_config
                    create_cloud_vm_cluster_config = parent_rpcs.create_cloud_vm_cluster if parent_rpcs.respond_to? :create_cloud_vm_cluster
                    @create_cloud_vm_cluster = ::Gapic::Config::Method.new create_cloud_vm_cluster_config
                    delete_cloud_vm_cluster_config = parent_rpcs.delete_cloud_vm_cluster if parent_rpcs.respond_to? :delete_cloud_vm_cluster
                    @delete_cloud_vm_cluster = ::Gapic::Config::Method.new delete_cloud_vm_cluster_config
                    list_entitlements_config = parent_rpcs.list_entitlements if parent_rpcs.respond_to? :list_entitlements
                    @list_entitlements = ::Gapic::Config::Method.new list_entitlements_config
                    list_db_servers_config = parent_rpcs.list_db_servers if parent_rpcs.respond_to? :list_db_servers
                    @list_db_servers = ::Gapic::Config::Method.new list_db_servers_config
                    list_db_nodes_config = parent_rpcs.list_db_nodes if parent_rpcs.respond_to? :list_db_nodes
                    @list_db_nodes = ::Gapic::Config::Method.new list_db_nodes_config
                    list_gi_versions_config = parent_rpcs.list_gi_versions if parent_rpcs.respond_to? :list_gi_versions
                    @list_gi_versions = ::Gapic::Config::Method.new list_gi_versions_config
                    list_db_system_shapes_config = parent_rpcs.list_db_system_shapes if parent_rpcs.respond_to? :list_db_system_shapes
                    @list_db_system_shapes = ::Gapic::Config::Method.new list_db_system_shapes_config
                    list_autonomous_databases_config = parent_rpcs.list_autonomous_databases if parent_rpcs.respond_to? :list_autonomous_databases
                    @list_autonomous_databases = ::Gapic::Config::Method.new list_autonomous_databases_config
                    get_autonomous_database_config = parent_rpcs.get_autonomous_database if parent_rpcs.respond_to? :get_autonomous_database
                    @get_autonomous_database = ::Gapic::Config::Method.new get_autonomous_database_config
                    create_autonomous_database_config = parent_rpcs.create_autonomous_database if parent_rpcs.respond_to? :create_autonomous_database
                    @create_autonomous_database = ::Gapic::Config::Method.new create_autonomous_database_config
                    delete_autonomous_database_config = parent_rpcs.delete_autonomous_database if parent_rpcs.respond_to? :delete_autonomous_database
                    @delete_autonomous_database = ::Gapic::Config::Method.new delete_autonomous_database_config
                    restore_autonomous_database_config = parent_rpcs.restore_autonomous_database if parent_rpcs.respond_to? :restore_autonomous_database
                    @restore_autonomous_database = ::Gapic::Config::Method.new restore_autonomous_database_config
                    generate_autonomous_database_wallet_config = parent_rpcs.generate_autonomous_database_wallet if parent_rpcs.respond_to? :generate_autonomous_database_wallet
                    @generate_autonomous_database_wallet = ::Gapic::Config::Method.new generate_autonomous_database_wallet_config
                    list_autonomous_db_versions_config = parent_rpcs.list_autonomous_db_versions if parent_rpcs.respond_to? :list_autonomous_db_versions
                    @list_autonomous_db_versions = ::Gapic::Config::Method.new list_autonomous_db_versions_config
                    list_autonomous_database_character_sets_config = parent_rpcs.list_autonomous_database_character_sets if parent_rpcs.respond_to? :list_autonomous_database_character_sets
                    @list_autonomous_database_character_sets = ::Gapic::Config::Method.new list_autonomous_database_character_sets_config
                    list_autonomous_database_backups_config = parent_rpcs.list_autonomous_database_backups if parent_rpcs.respond_to? :list_autonomous_database_backups
                    @list_autonomous_database_backups = ::Gapic::Config::Method.new list_autonomous_database_backups_config
                    stop_autonomous_database_config = parent_rpcs.stop_autonomous_database if parent_rpcs.respond_to? :stop_autonomous_database
                    @stop_autonomous_database = ::Gapic::Config::Method.new stop_autonomous_database_config
                    start_autonomous_database_config = parent_rpcs.start_autonomous_database if parent_rpcs.respond_to? :start_autonomous_database
                    @start_autonomous_database = ::Gapic::Config::Method.new start_autonomous_database_config
                    restart_autonomous_database_config = parent_rpcs.restart_autonomous_database if parent_rpcs.respond_to? :restart_autonomous_database
                    @restart_autonomous_database = ::Gapic::Config::Method.new restart_autonomous_database_config

                    yield self if block_given?
                  end
                end
              end
            end
          end
        end
      end
    end
  end
end
