# Dataproc Metastore V1 API - Class Google::Cloud::Metastore::V1::DataprocMetastore::Client (v2.5.0)

2.5.0 (latest) 2.4.0 2.3.1 2.2.0 2.1.0 2.0.1 1.2.0 1.1.0 1.0.1 0.13.0 0.12.2 0.11.0 0.10.0 0.9.0 0.8.1 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.2 Reference documentation and code samples for the Dataproc Metastore V1 API class Google::Cloud::Metastore::V1::DataprocMetastore::Client.

Client for the DataprocMetastore service.


Configures and manages metastore services.
Metastore services are fully managed, highly available, autoscaled,
autohealing, OSS-native deployments of technical metadata management
software. Each metastore service exposes a network endpoint through which
metadata queries are served. Metadata queries can originate from a variety
of sources, including Apache Hive, Apache Presto, and Apache Spark.

The Dataproc Metastore API defines the following resource model:

- The service works with a collection of Google Cloud projects, named: `/projects/`
- Each project has a collection of available locations, named: `/locations/` (a location must refer to a Google Cloud `region`)
- Each location has a collection of services, named: `/services/*`
- Dataproc Metastore services are resources with names of the form:

<br />

`/projects/{project_number}/locations/{location_id}/services/{service_id}`.

## Inherits

- Object

## Includes

- [Google::Cloud::Metastore::V1::DataprocMetastore::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DataprocMetastore-Paths)

## Methods

### .configure

    def self.configure() { |config| ... } -> Client::Configuration

Configure the DataprocMetastore Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DataprocMetastore-Client-Configuration "Google::Cloud::Metastore::V1::DataprocMetastore::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DataprocMetastore-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DataprocMetastore-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all DataprocMetastore clients
::Google::Cloud::Metastore::V1::DataprocMetastore::Client.configure do |config|
  config.timeout = 10.0
end
```

### #alter_metadata_resource_location

    def alter_metadata_resource_location(request, options = nil) -> ::Gapic::Operation
    def alter_metadata_resource_location(service: nil, resource_name: nil, location_uri: nil) -> ::Gapic::Operation

Alter metadata resource location. The metadata resource can be a database,
table, or partition. This functionality only updates the parent directory
for the respective metadata resource and does not transfer any existing
data to the new location.
**Overloads**

    def alter_metadata_resource_location(request, options = nil) -> ::Gapic::Operation

Pass arguments to `alter_metadata_resource_location` via a request object, either of type [AlterMetadataResourceLocationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-AlterMetadataResourceLocationRequest "Google::Cloud::Metastore::V1::AlterMetadataResourceLocationRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Metastore::V1::AlterMetadataResourceLocationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-AlterMetadataResourceLocationRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def alter_metadata_resource_location(service: nil, resource_name: nil, location_uri: nil) -> ::Gapic::Operation

Pass arguments to `alter_metadata_resource_location` 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). **Parameters**

- **service** (::String) --- Required. The relative resource name of the metastore service to mutate metadata, in the following format:


  `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- **resource_name** (::String) --- Required. The relative metadata resource name in the following format.


  `databases/{database_id}`
  or
  `databases/{database_id}/tables/{table_id}`
  or
  `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
- **location_uri** (::String) --- Required. The new location URI for the metadata resource.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/metastore/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Metastore::V1::AlterMetadataResourceLocationRequest.new

# Call the alter_metadata_resource_location method.
result = client.alter_metadata_resource_location 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
```

### #configure

    def configure() { |config| ... } -> Client::Configuration

Configure the DataprocMetastore 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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DataprocMetastore-Client#Google__Cloud__Metastore__V1__DataprocMetastore__Client_configure_class_ "Google::Cloud::Metastore::V1::DataprocMetastore::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DataprocMetastore-Client-Configuration "Google::Cloud::Metastore::V1::DataprocMetastore::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DataprocMetastore-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DataprocMetastore-Client-Configuration))

### #create_backup

    def create_backup(request, options = nil) -> ::Gapic::Operation
    def create_backup(parent: nil, backup_id: nil, backup: nil, request_id: nil) -> ::Gapic::Operation

Creates a new backup in a given project and location.
**Overloads**

    def create_backup(request, options = nil) -> ::Gapic::Operation

Pass arguments to `create_backup` via a request object, either of type [CreateBackupRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-CreateBackupRequest "Google::Cloud::Metastore::V1::CreateBackupRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Metastore::V1::CreateBackupRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-CreateBackupRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def create_backup(parent: nil, backup_id: nil, backup: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `create_backup` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The relative resource name of the service in which to create a backup of the following form:


  `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- **backup_id** (::String) --- Required. The ID of the backup, which is used as the final component of the backup's name.


  This value must be between 1 and 64 characters long, begin with a letter,
  end with a letter or number, and consist of alpha-numeric ASCII characters
  or hyphens.
- **backup** ([::Google::Cloud::Metastore::V1::Backup](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-Backup), ::Hash) --- Required. The backup to create. The `name` field is ignored. The ID of the created backup must be provided in the request's `backup_id` field.
- **request_id** (::String) --- Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.


  For example, if an initial request times out, followed by another request
  with the same request ID, the server ignores the second request to prevent
  the creation of duplicate commitments.

  The request ID must be a valid
  [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/metastore/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Metastore::V1::CreateBackupRequest.new

# Call the create_backup method.
result = client.create_backup request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```

### #create_metadata_import

    def create_metadata_import(request, options = nil) -> ::Gapic::Operation
    def create_metadata_import(parent: nil, metadata_import_id: nil, metadata_import: nil, request_id: nil) -> ::Gapic::Operation

Creates a new MetadataImport in a given project and location.
**Overloads**

    def create_metadata_import(request, options = nil) -> ::Gapic::Operation

Pass arguments to `create_metadata_import` via a request object, either of type [CreateMetadataImportRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-CreateMetadataImportRequest "Google::Cloud::Metastore::V1::CreateMetadataImportRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Metastore::V1::CreateMetadataImportRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-CreateMetadataImportRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def create_metadata_import(parent: nil, metadata_import_id: nil, metadata_import: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `create_metadata_import` 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). **Parameters**

- **parent** (::String) --- Required. The relative resource name of the service in which to create a metastore import, in the following form:


  `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- **metadata_import_id** (::String) --- Required. The ID of the metadata import, which is used as the final component of the metadata import's name.


  This value must be between 1 and 64 characters long, begin with a letter,
  end with a letter or number, and consist of alpha-numeric ASCII characters
  or hyphens.
- **metadata_import** ([::Google::Cloud::Metastore::V1::MetadataImport](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-MetadataImport), ::Hash) --- Required. The metadata import to create. The `name` field is ignored. The ID of the created metadata import must be provided in the request's `metadata_import_id` field.
- **request_id** (::String) --- Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.


  For example, if an initial request times out, followed by another request
  with the same request ID, the server ignores the second request to prevent
  the creation of duplicate commitments.

  The request ID must be a valid
  [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/metastore/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Metastore::V1::CreateMetadataImportRequest.new

# Call the create_metadata_import method.
result = client.create_metadata_import 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
```

### #create_service

    def create_service(request, options = nil) -> ::Gapic::Operation
    def create_service(parent: nil, service_id: nil, service: nil, request_id: nil) -> ::Gapic::Operation

Creates a metastore service in a project and location.
**Overloads**

    def create_service(request, options = nil) -> ::Gapic::Operation

Pass arguments to `create_service` via a request object, either of type [CreateServiceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-CreateServiceRequest "Google::Cloud::Metastore::V1::CreateServiceRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Metastore::V1::CreateServiceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-CreateServiceRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def create_service(parent: nil, service_id: nil, service: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `create_service` 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). **Parameters**

- **parent** (::String) --- Required. The relative resource name of the location in which to create a metastore service, in the following form:


  `projects/{project_number}/locations/{location_id}`.
- **service_id** (::String) --- Required. The ID of the metastore service, which is used as the final component of the metastore service's name.


  This value must be between 2 and 63 characters long inclusive, begin with a
  letter, end with a letter or number, and consist of alpha-numeric
  ASCII characters or hyphens.
- **service** ([::Google::Cloud::Metastore::V1::Service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-Service), ::Hash) --- Required. The Metastore service to create. The `name` field is ignored. The ID of the created metastore service must be provided in the request's `service_id` field.
- **request_id** (::String) --- Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.


  For example, if an initial request times out, followed by another request
  with the same request ID, the server ignores the second request to prevent
  the creation of duplicate commitments.

  The request ID must be a valid
  [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/metastore/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Metastore::V1::CreateServiceRequest.new

# Call the create_service method.
result = client.create_service 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
```

### #delete_backup

    def delete_backup(request, options = nil) -> ::Gapic::Operation
    def delete_backup(name: nil, request_id: nil) -> ::Gapic::Operation

Deletes a single backup.
**Overloads**

    def delete_backup(request, options = nil) -> ::Gapic::Operation

Pass arguments to `delete_backup` via a request object, either of type [Google::Cloud::Metastore::V1::DeleteBackupRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DeleteBackupRequest "Google::Cloud::Metastore::V1::DeleteBackupRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Metastore::V1::DeleteBackupRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DeleteBackupRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def delete_backup(name: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `delete_backup` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **name** (::String) --- Required. The relative resource name of the backup to delete, in the following form:


  `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- **request_id** (::String) --- Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.


  For example, if an initial request times out, followed by another request
  with the same request ID, the server ignores the second request to prevent
  the creation of duplicate commitments.

  The request ID must be a valid
  [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/metastore/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Metastore::V1::DeleteBackupRequest.new

# Call the delete_backup method.
result = client.delete_backup request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```

### #delete_service

    def delete_service(request, options = nil) -> ::Gapic::Operation
    def delete_service(name: nil, request_id: nil) -> ::Gapic::Operation

Deletes a single service.
**Overloads**

    def delete_service(request, options = nil) -> ::Gapic::Operation

Pass arguments to `delete_service` via a request object, either of type [Google::Cloud::Metastore::V1::DeleteServiceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DeleteServiceRequest "Google::Cloud::Metastore::V1::DeleteServiceRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Metastore::V1::DeleteServiceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DeleteServiceRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def delete_service(name: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `delete_service` 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). **Parameters**

- **name** (::String) --- Required. The relative resource name of the metastore service to delete, in the following form:


  `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- **request_id** (::String) --- Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.


  For example, if an initial request times out, followed by another request
  with the same request ID, the server ignores the second request to prevent
  the creation of duplicate commitments.

  The request ID must be a valid
  [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/metastore/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Metastore::V1::DeleteServiceRequest.new

# Call the delete_service method.
result = client.delete_service 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
```

### #export_metadata

    def export_metadata(request, options = nil) -> ::Gapic::Operation
    def export_metadata(destination_gcs_folder: nil, service: nil, request_id: nil, database_dump_type: nil) -> ::Gapic::Operation

Exports metadata from a service.
**Overloads**

    def export_metadata(request, options = nil) -> ::Gapic::Operation

Pass arguments to `export_metadata` via a request object, either of type [ExportMetadataRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-ExportMetadataRequest "Google::Cloud::Metastore::V1::ExportMetadataRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Metastore::V1::ExportMetadataRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-ExportMetadataRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def export_metadata(destination_gcs_folder: nil, service: nil, request_id: nil, database_dump_type: nil) -> ::Gapic::Operation

Pass arguments to `export_metadata` 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). **Parameters**

- **destination_gcs_folder** (::String) --- A Cloud Storage URI of a folder, in the format `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder `<export_folder>` containing exported files will be created below it.
- **service** (::String) --- Required. The relative resource name of the metastore service to run export, in the following form:


  `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- **request_id** (::String) --- Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.


  For example, if an initial request times out, followed by another request
  with the same request ID, the server ignores the second request to prevent
  the creation of duplicate commitments.

  The request ID must be a valid
  [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
- **database_dump_type** ([::Google::Cloud::Metastore::V1::DatabaseDumpSpec::Type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DatabaseDumpSpec-Type)) --- Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/metastore/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Metastore::V1::ExportMetadataRequest.new

# Call the export_metadata method.
result = client.export_metadata 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
```

### #get_backup

    def get_backup(request, options = nil) -> ::Google::Cloud::Metastore::V1::Backup
    def get_backup(name: nil) -> ::Google::Cloud::Metastore::V1::Backup

Gets details of a single backup.
**Overloads**

    def get_backup(request, options = nil) -> ::Google::Cloud::Metastore::V1::Backup

Pass arguments to `get_backup` via a request object, either of type [GetBackupRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-GetBackupRequest "Google::Cloud::Metastore::V1::GetBackupRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Metastore::V1::GetBackupRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-GetBackupRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def get_backup(name: nil) -> ::Google::Cloud::Metastore::V1::Backup

Pass arguments to `get_backup` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameter**

- **name** (::String) --- Required. The relative resource name of the backup to retrieve, in the following form:


  `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::Metastore::V1::Backup](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-Backup))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::Metastore::V1::Backup](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-Backup))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/metastore/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Metastore::V1::GetBackupRequest.new

# Call the get_backup method.
result = client.get_backup request

# The returned object is of type Google::Cloud::Metastore::V1::Backup.
p result
```

### #get_metadata_import

    def get_metadata_import(request, options = nil) -> ::Google::Cloud::Metastore::V1::MetadataImport
    def get_metadata_import(name: nil) -> ::Google::Cloud::Metastore::V1::MetadataImport

Gets details of a single import.
**Overloads**

    def get_metadata_import(request, options = nil) -> ::Google::Cloud::Metastore::V1::MetadataImport

Pass arguments to `get_metadata_import` via a request object, either of type [GetMetadataImportRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-GetMetadataImportRequest "Google::Cloud::Metastore::V1::GetMetadataImportRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Metastore::V1::GetMetadataImportRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-GetMetadataImportRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def get_metadata_import(name: nil) -> ::Google::Cloud::Metastore::V1::MetadataImport

Pass arguments to `get_metadata_import` 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). **Parameter**

- **name** (::String) --- Required. The relative resource name of the metadata import to retrieve, in the following form:


  `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::Metastore::V1::MetadataImport](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-MetadataImport))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::Metastore::V1::MetadataImport](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-MetadataImport))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/metastore/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Metastore::V1::GetMetadataImportRequest.new

# Call the get_metadata_import method.
result = client.get_metadata_import request

# The returned object is of type Google::Cloud::Metastore::V1::MetadataImport.
p result
```

### #get_service

    def get_service(request, options = nil) -> ::Google::Cloud::Metastore::V1::Service
    def get_service(name: nil) -> ::Google::Cloud::Metastore::V1::Service

Gets the details of a single service.
**Overloads**

    def get_service(request, options = nil) -> ::Google::Cloud::Metastore::V1::Service

Pass arguments to `get_service` via a request object, either of type [GetServiceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-GetServiceRequest "Google::Cloud::Metastore::V1::GetServiceRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Metastore::V1::GetServiceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-GetServiceRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def get_service(name: nil) -> ::Google::Cloud::Metastore::V1::Service

Pass arguments to `get_service` 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). **Parameter**

- **name** (::String) --- Required. The relative resource name of the metastore service to retrieve, in the following form:


  `projects/{project_number}/locations/{location_id}/services/{service_id}`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::Metastore::V1::Service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-Service))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::Metastore::V1::Service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-Service))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/metastore/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Metastore::V1::GetServiceRequest.new

# Call the get_service method.
result = client.get_service request

# The returned object is of type Google::Cloud::Metastore::V1::Service.
p result
```

### #iam_policy_client

    def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client

Get the associated client for mix-in of the IAMPolicy.
**Returns**

- (Google::Iam::V1::IAMPolicy::Client)

### #initialize

    def initialize() { |config| ... } -> Client

Create a new DataprocMetastore client object.
**Yields**

- (config) --- Configure the DataprocMetastore client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DataprocMetastore-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DataprocMetastore-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::Metastore::V1::DataprocMetastore::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Metastore::V1::DataprocMetastore::Client.new do |config|
  config.timeout = 10.0
end
```

### #list_backups

    def list_backups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1::Backup>
    def list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1::Backup>

Lists backups in a service.
**Overloads**

    def list_backups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1::Backup>

Pass arguments to `list_backups` via a request object, either of type [ListBackupsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-ListBackupsRequest "Google::Cloud::Metastore::V1::ListBackupsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Metastore::V1::ListBackupsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-ListBackupsRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1::Backup>

Pass arguments to `list_backups` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The relative resource name of the service whose backups to list, in the following form:


  `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
- **page_size** (::Integer) --- Optional. The maximum number of backups to return. The response may contain less than the maximum number. If unspecified, no more than 500 backups are returned. The maximum value is 1000; values above 1000 are changed to 1000.
- **page_token** (::String) --- Optional. A page token, received from a previous [DataprocMetastore.ListBackups](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DataprocMetastore-Client#Google__Cloud__Metastore__V1__DataprocMetastore__Client_list_backups_instance_ "Google::Cloud::Metastore::V1::DataprocMetastore::Client#list_backups (method)") call. Provide this token to retrieve the subsequent page.


  To retrieve the first page, supply an empty page token.

  When paginating, other parameters provided to
  [DataprocMetastore.ListBackups](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DataprocMetastore-Client#Google__Cloud__Metastore__V1__DataprocMetastore__Client_list_backups_instance_ "Google::Cloud::Metastore::V1::DataprocMetastore::Client#list_backups (method)")
  must match the call that provided the page token.
- **filter** (::String) --- Optional. The filter to apply to list results.
- **order_by** (::String) --- Optional. Specify the ordering of results as described in [Sorting
  Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::Metastore::V1::Backup](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-Backup)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::Metastore::V1::Backup](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-Backup)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/metastore/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Metastore::V1::ListBackupsRequest.new

# Call the list_backups method.
result = client.list_backups request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Metastore::V1::Backup.
  p item
end
```

### #list_metadata_imports

    def list_metadata_imports(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1::MetadataImport>
    def list_metadata_imports(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1::MetadataImport>

Lists imports in a service.
**Overloads**

    def list_metadata_imports(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1::MetadataImport>

Pass arguments to `list_metadata_imports` via a request object, either of type [ListMetadataImportsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-ListMetadataImportsRequest "Google::Cloud::Metastore::V1::ListMetadataImportsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Metastore::V1::ListMetadataImportsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-ListMetadataImportsRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_metadata_imports(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1::MetadataImport>

Pass arguments to `list_metadata_imports` 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). **Parameters**

- **parent** (::String) --- Required. The relative resource name of the service whose metadata imports to list, in the following form:


  `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
- **page_size** (::Integer) --- Optional. The maximum number of imports to return. The response may contain less than the maximum number. If unspecified, no more than 500 imports are returned. The maximum value is 1000; values above 1000 are changed to 1000.
- **page_token** (::String) --- Optional. A page token, received from a previous [DataprocMetastore.ListServices](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DataprocMetastore-Client#Google__Cloud__Metastore__V1__DataprocMetastore__Client_list_services_instance_ "Google::Cloud::Metastore::V1::DataprocMetastore::Client#list_services (method)") call. Provide this token to retrieve the subsequent page.


  To retrieve the first page, supply an empty page token.

  When paginating, other parameters provided to
  [DataprocMetastore.ListServices](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DataprocMetastore-Client#Google__Cloud__Metastore__V1__DataprocMetastore__Client_list_services_instance_ "Google::Cloud::Metastore::V1::DataprocMetastore::Client#list_services (method)")
  must match the call that provided the page token.
- **filter** (::String) --- Optional. The filter to apply to list results.
- **order_by** (::String) --- Optional. Specify the ordering of results as described in [Sorting
  Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::Metastore::V1::MetadataImport](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-MetadataImport)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::Metastore::V1::MetadataImport](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-MetadataImport)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/metastore/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Metastore::V1::ListMetadataImportsRequest.new

# Call the list_metadata_imports method.
result = client.list_metadata_imports 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::Metastore::V1::MetadataImport.
  p item
end
```

### #list_services

    def list_services(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1::Service>
    def list_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1::Service>

Lists services in a project and location.
**Overloads**

    def list_services(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1::Service>

Pass arguments to `list_services` via a request object, either of type [ListServicesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-ListServicesRequest "Google::Cloud::Metastore::V1::ListServicesRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Metastore::V1::ListServicesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-ListServicesRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def list_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1::Service>

Pass arguments to `list_services` 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). **Parameters**

- **parent** (::String) --- Required. The relative resource name of the location of metastore services to list, in the following form:


  `projects/{project_number}/locations/{location_id}`.
- **page_size** (::Integer) --- Optional. The maximum number of services to return. The response may contain less than the maximum number. If unspecified, no more than 500 services are returned. The maximum value is 1000; values above 1000 are changed to 1000.
- **page_token** (::String) --- Optional. A page token, received from a previous [DataprocMetastore.ListServices](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DataprocMetastore-Client#Google__Cloud__Metastore__V1__DataprocMetastore__Client_list_services_instance_ "Google::Cloud::Metastore::V1::DataprocMetastore::Client#list_services (method)") call. Provide this token to retrieve the subsequent page.


  To retrieve the first page, supply an empty page token.

  When paginating, other parameters provided to
  [DataprocMetastore.ListServices](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DataprocMetastore-Client#Google__Cloud__Metastore__V1__DataprocMetastore__Client_list_services_instance_ "Google::Cloud::Metastore::V1::DataprocMetastore::Client#list_services (method)")
  must match the call that provided the page token.
- **filter** (::String) --- Optional. The filter to apply to list results.
- **order_by** (::String) --- Optional. Specify the ordering of results as described in [Sorting
  Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::Metastore::V1::Service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-Service)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::Metastore::V1::Service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-Service)\>)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/metastore/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Metastore::V1::ListServicesRequest.new

# Call the list_services method.
result = client.list_services 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::Metastore::V1::Service.
  p item
end
```

### #location_client

    def location_client() -> Google::Cloud::Location::Locations::Client

Get the associated client for mix-in of the Locations.
**Returns**

- (Google::Cloud::Location::Locations::Client)

### #logger

    def logger() -> Logger

The logger used for request/response debug logging.
**Returns**

- (Logger)

### #move_table_to_database

    def move_table_to_database(request, options = nil) -> ::Gapic::Operation
    def move_table_to_database(service: nil, table_name: nil, db_name: nil, destination_db_name: nil) -> ::Gapic::Operation

Move a table to another database.
**Overloads**

    def move_table_to_database(request, options = nil) -> ::Gapic::Operation

Pass arguments to `move_table_to_database` via a request object, either of type [MoveTableToDatabaseRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-MoveTableToDatabaseRequest "Google::Cloud::Metastore::V1::MoveTableToDatabaseRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Metastore::V1::MoveTableToDatabaseRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-MoveTableToDatabaseRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def move_table_to_database(service: nil, table_name: nil, db_name: nil, destination_db_name: nil) -> ::Gapic::Operation

Pass arguments to `move_table_to_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). **Parameters**

- **service** (::String) --- Required. The relative resource name of the metastore service to mutate metadata, in the following format:


  `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- **table_name** (::String) --- Required. The name of the table to be moved.
- **db_name** (::String) --- Required. The name of the database where the table resides.
- **destination_db_name** (::String) --- Required. The name of the database where the table should be moved.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/metastore/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Metastore::V1::MoveTableToDatabaseRequest.new

# Call the move_table_to_database method.
result = client.move_table_to_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
```

### #operations_client

    def operations_client() -> ::Google::Cloud::Metastore::V1::DataprocMetastore::Operations

Get the associated client for long-running operations.
**Returns**

- ([::Google::Cloud::Metastore::V1::DataprocMetastore::Operations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-DataprocMetastore-Operations))

### #query_metadata

    def query_metadata(request, options = nil) -> ::Gapic::Operation
    def query_metadata(service: nil, query: nil) -> ::Gapic::Operation

Query DPMS metadata.
**Overloads**

    def query_metadata(request, options = nil) -> ::Gapic::Operation

Pass arguments to `query_metadata` via a request object, either of type [QueryMetadataRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-QueryMetadataRequest "Google::Cloud::Metastore::V1::QueryMetadataRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Metastore::V1::QueryMetadataRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-QueryMetadataRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def query_metadata(service: nil, query: nil) -> ::Gapic::Operation

Pass arguments to `query_metadata` 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). **Parameters**

- **service** (::String) --- Required. The relative resource name of the metastore service to query metadata, in the following format:


  `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- **query** (::String) --- Required. A read-only SQL query to execute against the metadata database. The query cannot change or mutate the data.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/metastore/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Metastore::V1::QueryMetadataRequest.new

# Call the query_metadata method.
result = client.query_metadata 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
```

### #restore_service

    def restore_service(request, options = nil) -> ::Gapic::Operation
    def restore_service(service: nil, backup: nil, restore_type: nil, request_id: nil) -> ::Gapic::Operation

Restores a service from a backup.
**Overloads**

    def restore_service(request, options = nil) -> ::Gapic::Operation

Pass arguments to `restore_service` via a request object, either of type [RestoreServiceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-RestoreServiceRequest "Google::Cloud::Metastore::V1::RestoreServiceRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Metastore::V1::RestoreServiceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-RestoreServiceRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def restore_service(service: nil, backup: nil, restore_type: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `restore_service` 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). **Parameters**

- **service** (::String) --- Required. The relative resource name of the metastore service to run restore, in the following form:


  `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- **backup** (::String) --- Required. The relative resource name of the metastore service backup to restore from, in the following form:


  `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- **restore_type** ([::Google::Cloud::Metastore::V1::Restore::RestoreType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-Restore-RestoreType)) --- Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
- **request_id** (::String) --- Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.


  For example, if an initial request times out, followed by another request
  with the same request ID, the server ignores the second request to prevent
  the creation of duplicate commitments.

  The request ID must be a valid
  [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/metastore/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Metastore::V1::RestoreServiceRequest.new

# Call the restore_service method.
result = client.restore_service 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
```

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)

### #update_metadata_import

    def update_metadata_import(request, options = nil) -> ::Gapic::Operation
    def update_metadata_import(update_mask: nil, metadata_import: nil, request_id: nil) -> ::Gapic::Operation

Updates a single import.
Only the description field of MetadataImport is supported to be updated.
**Overloads**

    def update_metadata_import(request, options = nil) -> ::Gapic::Operation

Pass arguments to `update_metadata_import` via a request object, either of type [UpdateMetadataImportRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-UpdateMetadataImportRequest "Google::Cloud::Metastore::V1::UpdateMetadataImportRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Metastore::V1::UpdateMetadataImportRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-UpdateMetadataImportRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def update_metadata_import(update_mask: nil, metadata_import: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `update_metadata_import` 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). **Parameters**

- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Required. A field mask used to specify the fields to be overwritten in the metadata import resource by the update. Fields specified in the `update_mask` are relative to the resource (not to the full request). A field is overwritten if it is in the mask.
- **metadata_import** ([::Google::Cloud::Metastore::V1::MetadataImport](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-MetadataImport), ::Hash) --- Required. The metadata import to update. The server only merges fields in the import if they are specified in `update_mask`.


  The metadata import's `name` field is used to identify the metastore
  import to be updated.
- **request_id** (::String) --- Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.


  For example, if an initial request times out, followed by another request
  with the same request ID, the server ignores the second request to prevent
  the creation of duplicate commitments.

  The request ID must be a valid
  [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/metastore/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Metastore::V1::UpdateMetadataImportRequest.new

# Call the update_metadata_import method.
result = client.update_metadata_import 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
```

### #update_service

    def update_service(request, options = nil) -> ::Gapic::Operation
    def update_service(update_mask: nil, service: nil, request_id: nil) -> ::Gapic::Operation

Updates the parameters of a single service.
**Overloads**

    def update_service(request, options = nil) -> ::Gapic::Operation

Pass arguments to `update_service` via a request object, either of type [UpdateServiceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-UpdateServiceRequest "Google::Cloud::Metastore::V1::UpdateServiceRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Metastore::V1::UpdateServiceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-UpdateServiceRequest), ::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.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def update_service(update_mask: nil, service: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `update_service` 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). **Parameters**

- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Required. A field mask used to specify the fields to be overwritten in the metastore service resource by the update. Fields specified in the `update_mask` are relative to the resource (not to the full request). A field is overwritten if it is in the mask.
- **service** ([::Google::Cloud::Metastore::V1::Service](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-metastore-v1/latest/Google-Cloud-Metastore-V1-Service), ::Hash) --- Required. The metastore service to update. The server only merges fields in the service if they are specified in `update_mask`.


  The metastore service's `name` field is used to identify the metastore
  service to be updated.
- **request_id** (::String) --- Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.


  For example, if an initial request times out, followed by another request
  with the same request ID, the server ignores the second request to prevent
  the creation of duplicate commitments.

  The request ID must be a valid
  [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
  A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::Operation)
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/metastore/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Metastore::V1::DataprocMetastore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Metastore::V1::UpdateServiceRequest.new

# Call the update_service method.
result = client.update_service 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
```