# Data Analytics API with Gemini V1 API - Class Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Client (v0.2.0)

0.2.0 (latest) 0.1.0 Reference documentation and code samples for the Data Analytics API with Gemini V1 API class Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Client.

Client for the DataAgentService service.


<br />

Service describing handlers for resources.

## Inherits

- Object

## Includes

- [Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-DataAgentService-Paths)

## Methods

### .configure

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

Configure the DataAgentService Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-DataAgentService-Client-Configuration "Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::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-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-DataAgentService-Client-Configuration))
**Returns**

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

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

### #configure

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

Configure the DataAgentService 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-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-DataAgentService-Client#Google__Cloud__GeminiDataAnalytics__V1__DataAgentService__Client_configure_class_ "Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-DataAgentService-Client-Configuration "Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::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-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-DataAgentService-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-DataAgentService-Client-Configuration))

### #create_data_agent

    def create_data_agent(request, options = nil) -> ::Gapic::Operation
    def create_data_agent(parent: nil, data_agent_id: nil, data_agent: nil, request_id: nil) -> ::Gapic::Operation

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

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

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

- **request** ([::Google::Cloud::GeminiDataAnalytics::V1::CreateDataAgentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-CreateDataAgentRequest), ::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_data_agent(parent: nil, data_agent_id: nil, data_agent: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `create_data_agent` 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. Value for parent.
- **data_agent_id** (::String) --- Optional. Id of the requesting object. Must be unique within the parent. The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. If not provided, the server will auto-generate a value for the id.
- **data_agent** ([::Google::Cloud::GeminiDataAnalytics::V1::DataAgent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-DataAgent), ::Hash) --- Required. The resource being created.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**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/gemini_data_analytics/v1"

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

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

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

    def create_data_agent_sync(request, options = nil) -> ::Google::Cloud::GeminiDataAnalytics::V1::DataAgent
    def create_data_agent_sync(parent: nil, data_agent_id: nil, data_agent: nil, request_id: nil) -> ::Google::Cloud::GeminiDataAnalytics::V1::DataAgent

Creates a new DataAgent in a given project and location synchronously.
**Overloads**

    def create_data_agent_sync(request, options = nil) -> ::Google::Cloud::GeminiDataAnalytics::V1::DataAgent

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

- **request** ([::Google::Cloud::GeminiDataAnalytics::V1::CreateDataAgentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-CreateDataAgentRequest), ::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_data_agent_sync(parent: nil, data_agent_id: nil, data_agent: nil, request_id: nil) -> ::Google::Cloud::GeminiDataAnalytics::V1::DataAgent

Pass arguments to `create_data_agent_sync` 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. Value for parent.
- **data_agent_id** (::String) --- Optional. Id of the requesting object. Must be unique within the parent. The allowed format is: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. If not provided, the server will auto-generate a value for the id.
- **data_agent** ([::Google::Cloud::GeminiDataAnalytics::V1::DataAgent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-DataAgent), ::Hash) --- Required. The resource being created.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**Yields**

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

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

- ([::Google::Cloud::GeminiDataAnalytics::V1::DataAgent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-DataAgent))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::GeminiDataAnalytics::V1::DataAgent.
p result
```

### #delete_data_agent

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

Deletes a single DataAgent.
**Overloads**

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

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

- **request** ([::Google::Cloud::GeminiDataAnalytics::V1::DeleteDataAgentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-DeleteDataAgentRequest), ::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_data_agent(name: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `delete_data_agent` 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. Name of the resource.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**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/gemini_data_analytics/v1"

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

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

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

    def delete_data_agent_sync(request, options = nil) -> ::Google::Protobuf::Empty
    def delete_data_agent_sync(name: nil, request_id: nil) -> ::Google::Protobuf::Empty

Deletes a single DataAgent synchronously.
**Overloads**

    def delete_data_agent_sync(request, options = nil) -> ::Google::Protobuf::Empty

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

- **request** ([::Google::Cloud::GeminiDataAnalytics::V1::DeleteDataAgentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-DeleteDataAgentRequest), ::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_data_agent_sync(name: nil, request_id: nil) -> ::Google::Protobuf::Empty

Pass arguments to `delete_data_agent_sync` 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. Name of the resource.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**Yields**

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

- **response** ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Protobuf-Empty))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Protobuf-Empty))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Protobuf::Empty.
p result
```

### #get_data_agent

    def get_data_agent(request, options = nil) -> ::Google::Cloud::GeminiDataAnalytics::V1::DataAgent
    def get_data_agent(name: nil) -> ::Google::Cloud::GeminiDataAnalytics::V1::DataAgent

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

    def get_data_agent(request, options = nil) -> ::Google::Cloud::GeminiDataAnalytics::V1::DataAgent

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

- **request** ([::Google::Cloud::GeminiDataAnalytics::V1::GetDataAgentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-GetDataAgentRequest), ::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_data_agent(name: nil) -> ::Google::Cloud::GeminiDataAnalytics::V1::DataAgent

Pass arguments to `get_data_agent` 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. Name of the resource.
**Yields**

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

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

- ([::Google::Cloud::GeminiDataAnalytics::V1::DataAgent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-DataAgent))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::GeminiDataAnalytics::V1::DataAgent.
p result
```

### #get_iam_policy

    def get_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policy
    def get_iam_policy(resource: nil, options: nil) -> ::Google::Iam::V1::Policy

Gets the IAM policy for DataAgent
**Overloads**

    def get_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policy

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

- **request** ([::Google::Iam::V1::GetIamPolicyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Iam-V1-GetIamPolicyRequest), ::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_iam_policy(resource: nil, options: nil) -> ::Google::Iam::V1::Policy

Pass arguments to `get_iam_policy` 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**

- **resource** (::String) --- REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
- **options** ([::Google::Iam::V1::GetPolicyOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Iam-V1-GetPolicyOptions), ::Hash) --- OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`.
**Yields**

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

- **response** ([::Google::Iam::V1::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Iam-V1-Policy))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Iam::V1::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Iam-V1-Policy))
**Raises**

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

Basic example

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

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Iam::V1::GetIamPolicyRequest.new

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

# The returned object is of type Google::Iam::V1::Policy.
p result
```

### #initialize

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

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

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

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

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

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

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

### #list_accessible_data_agents

    def list_accessible_data_agents(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1::DataAgent>
    def list_accessible_data_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil, creator_filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1::DataAgent>

Lists DataAgents that are accessible to the caller in a given project and
location.
**Overloads**

    def list_accessible_data_agents(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1::DataAgent>

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

- **request** ([::Google::Cloud::GeminiDataAnalytics::V1::ListAccessibleDataAgentsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-ListAccessibleDataAgentsRequest), ::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_accessible_data_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil, creator_filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1::DataAgent>

Pass arguments to `list_accessible_data_agents` 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. Parent value for ListAccessibleDataAgentsRequest.
- **page_size** (::Integer) --- Optional. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- **page_token** (::String) --- Optional. A page token, received from a previous `ListAccessibleDataAgents` call. Provide this to retrieve the subsequent page.


  When paginating, all other parameters provided to
  `ListAccessibleDataAgents` must match the call that provided the page
  token. The service may return fewer than this value.
- **filter** (::String) --- Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for syntax.
- **order_by** (::String) --- Optional. User specification for how to order the results.
- **show_deleted** (::Boolean) --- Optional. If true, the list results will include soft-deleted DataAgents. Defaults to false.
- **creator_filter** ([::Google::Cloud::GeminiDataAnalytics::V1::ListAccessibleDataAgentsRequest::CreatorFilter](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-ListAccessibleDataAgentsRequest-CreatorFilter)) --- Optional. Filter for the creator of the agent.
**Yields**

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

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

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

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

Basic example

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

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

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

# Call the list_accessible_data_agents method.
result = client.list_accessible_data_agents 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::GeminiDataAnalytics::V1::DataAgent.
  p item
end
```

### #list_data_agents

    def list_data_agents(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1::DataAgent>
    def list_data_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1::DataAgent>

Lists DataAgents in a given project and location.
**Overloads**

    def list_data_agents(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1::DataAgent>

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

- **request** ([::Google::Cloud::GeminiDataAnalytics::V1::ListDataAgentsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-ListDataAgentsRequest), ::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_data_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, show_deleted: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1::DataAgent>

Pass arguments to `list_data_agents` 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. Parent value for ListDataAgentsRequest.
- **page_size** (::Integer) --- Optional. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- **page_token** (::String) --- Optional. A page token, received from a previous `ListDataAgents` call. Provide this to retrieve the subsequent page.


  When paginating, all other parameters provided to `ListDataAgents` must
  match the call that provided the page token. The service may return fewer
  than this value.
- **filter** (::String) --- Optional. Filtering results. See [AIP-160](https://google.aip.dev/160) for syntax.
- **order_by** (::String) --- Optional. User specification for how to order the results.
- **show_deleted** (::Boolean) --- Optional. If true, the list results will include soft-deleted DataAgents. Defaults to false.
**Yields**

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

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

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

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

Basic example

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

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

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

# Call the list_data_agents method.
result = client.list_data_agents 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::GeminiDataAnalytics::V1::DataAgent.
  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)

### #operations_client

    def operations_client() -> ::Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Operations

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

- ([::Google::Cloud::GeminiDataAnalytics::V1::DataAgentService::Operations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-DataAgentService-Operations))

### #set_iam_policy

    def set_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policy
    def set_iam_policy(resource: nil, policy: nil, update_mask: nil) -> ::Google::Iam::V1::Policy

Sets the IAM policy for a DataAgent.
**Overloads**

    def set_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policy

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

- **request** ([::Google::Iam::V1::SetIamPolicyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Iam-V1-SetIamPolicyRequest), ::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 set_iam_policy(resource: nil, policy: nil, update_mask: nil) -> ::Google::Iam::V1::Policy

Pass arguments to `set_iam_policy` 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**

- **resource** (::String) --- REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
- **policy** ([::Google::Iam::V1::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Iam-V1-Policy), ::Hash) --- REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.
- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used:


  `paths: "bindings, etag"`
**Yields**

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

- **response** ([::Google::Iam::V1::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Iam-V1-Policy))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Iam::V1::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Iam-V1-Policy))
**Raises**

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

Basic example

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

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Iam::V1::SetIamPolicyRequest.new

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

# The returned object is of type Google::Iam::V1::Policy.
p result
```

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)

### #update_data_agent

    def update_data_agent(request, options = nil) -> ::Gapic::Operation
    def update_data_agent(update_mask: nil, data_agent: nil, request_id: nil) -> ::Gapic::Operation

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

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

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

- **request** ([::Google::Cloud::GeminiDataAnalytics::V1::UpdateDataAgentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-UpdateDataAgentRequest), ::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_data_agent(update_mask: nil, data_agent: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `update_data_agent` 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-gemini_data_analytics-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Optional. Field mask is used to specify the fields to be overwritten in the DataAgent resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields with non-default values present in the request will be overwritten. If a wildcard mask is provided, all fields will be overwritten.
- **data_agent** ([::Google::Cloud::GeminiDataAnalytics::V1::DataAgent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-DataAgent), ::Hash) --- Required. The resource being updated.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**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/gemini_data_analytics/v1"

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

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

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

    def update_data_agent_sync(request, options = nil) -> ::Google::Cloud::GeminiDataAnalytics::V1::DataAgent
    def update_data_agent_sync(update_mask: nil, data_agent: nil, request_id: nil) -> ::Google::Cloud::GeminiDataAnalytics::V1::DataAgent

Updates the parameters of a single DataAgent synchronously.
**Overloads**

    def update_data_agent_sync(request, options = nil) -> ::Google::Cloud::GeminiDataAnalytics::V1::DataAgent

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

- **request** ([::Google::Cloud::GeminiDataAnalytics::V1::UpdateDataAgentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-UpdateDataAgentRequest), ::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_data_agent_sync(update_mask: nil, data_agent: nil, request_id: nil) -> ::Google::Cloud::GeminiDataAnalytics::V1::DataAgent

Pass arguments to `update_data_agent_sync` 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-gemini_data_analytics-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Optional. Field mask is used to specify the fields to be overwritten in the DataAgent resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields with non-default values present in the request will be overwritten. If a wildcard mask is provided, all fields will be overwritten.
- **data_agent** ([::Google::Cloud::GeminiDataAnalytics::V1::DataAgent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-DataAgent), ::Hash) --- Required. The resource being updated.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


  For example, consider a situation where you make an initial request and the
  request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**Yields**

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

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

- ([::Google::Cloud::GeminiDataAnalytics::V1::DataAgent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1/latest/Google-Cloud-GeminiDataAnalytics-V1-DataAgent))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::GeminiDataAnalytics::V1::DataAgent.
p result
```