Data Analytics API with Gemini V1BETA API - Class Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client (v0.1.0)

Reference documentation and code samples for the Data Analytics API with Gemini V1BETA API class Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.

Client for the DataAgentService service.

Service describing handlers for resources.

Inherits

  • Object

Methods

.configure

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

Configure the DataAgentService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all DataAgentService clients
::Google::Cloud::GeminiDataAnalytics::V1beta::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.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#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 or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GeminiDataAnalytics::V1beta::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::V1beta::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

require "google/cloud/gemini_data_analytics/v1beta"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GeminiDataAnalytics::V1beta::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

#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::V1beta::DeleteDataAgentRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GeminiDataAnalytics::V1beta::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

require "google/cloud/gemini_data_analytics/v1beta"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GeminiDataAnalytics::V1beta::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

#get_data_agent

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

Gets details of a single DataAgent.

Overloads
def get_data_agent(request, options = nil) -> ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent
Pass arguments to get_data_agent via a request object, either of type GetDataAgentRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GeminiDataAnalytics::V1beta::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::V1beta::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
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gemini_data_analytics/v1beta"

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

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

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

# The returned object is of type Google::Cloud::GeminiDataAnalytics::V1beta::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 or an equivalent Hash.
Parameters
  • request (::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, ::Hash) — OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gemini_data_analytics/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GeminiDataAnalytics::V1beta::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
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::GeminiDataAnalytics::V1beta::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::V1beta::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::V1beta::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::V1beta::DataAgent>
Pass arguments to list_accessible_data_agents via a request object, either of type ListAccessibleDataAgentsRequest or an equivalent Hash.
Parameters
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::V1beta::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 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::V1beta::ListAccessibleDataAgentsRequest::CreatorFilter) — Optional. Filter for the creator of the agent.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gemini_data_analytics/v1beta"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GeminiDataAnalytics::V1beta::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::V1beta::DataAgent.
  p item
end

#list_data_agents

def list_data_agents(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::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::V1beta::DataAgent>

Lists DataAgents in a given project and location.

Overloads
def list_data_agents(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgent>
Pass arguments to list_data_agents via a request object, either of type ListDataAgentsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GeminiDataAnalytics::V1beta::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::V1beta::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 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
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gemini_data_analytics/v1beta"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GeminiDataAnalytics::V1beta::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::V1beta::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::V1beta::DataAgentService::Operations

Get the associated client for long-running 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 or an equivalent Hash.
Parameters
  • request (::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, ::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, ::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
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gemini_data_analytics/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GeminiDataAnalytics::V1beta::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 or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GeminiDataAnalytics::V1beta::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, ::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::V1beta::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

require "google/cloud/gemini_data_analytics/v1beta"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GeminiDataAnalytics::V1beta::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