Class: Google::Cloud::Ces::V1::AgentService::Rest::Client

Inherits:
Object
  • Object
show all
Includes:
Paths
Defined in:
lib/google/cloud/ces/v1/agent_service/rest/client.rb

Overview

REST client for the AgentService service.

The service that manages agent-related resources in Gemini Enterprise for Customer Engagement (CES).

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#agent_path, #app_path, #app_version_path, #changelog_path, #conversation_path, #deidentify_template_path, #deployment_path, #dialogflow_agent_path, #engine_path, #example_path, #guardrail_path, #inspect_template_path, #location_path, #secret_version_path, #service_path, #tool_path, #toolset_path

Constructor Details

#initialize {|config| ... } ⇒ Client

Create a new AgentService REST client object.

Examples:


# Create a client using the default configuration
client = ::Google::Cloud::Ces::V1::AgentService::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Ces::V1::AgentService::Rest::Client.new do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the AgentService client.

Yield Parameters:



133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 133

def initialize
  # Create the configuration object
  @config = Configuration.new Client.configure

  # Yield the configuration if needed
  yield @config if block_given?

  # Create credentials
  credentials = @config.credentials
  # Use self-signed JWT if the endpoint is unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.endpoint.nil? ||
                           (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
                           !@config.endpoint.split(".").first.include?("-"))
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end

  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @operations_client = ::Google::Cloud::Ces::V1::AgentService::Rest::Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.universe_domain = @config.universe_domain
  end

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

  @agent_service_stub.logger(stub: true)&.info do |entry|
    entry.set_system_name
    entry.set_service
    entry.message = "Created client for #{entry.service}"
    entry.set_credentials_fields credentials
    entry.set "customEndpoint", @config.endpoint if @config.endpoint
    entry.set "defaultTimeout", @config.timeout if @config.timeout
    entry.set "quotaProject", @quota_project_id if @quota_project_id
  end

  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @agent_service_stub.endpoint
    config.universe_domain = @agent_service_stub.universe_domain
    config.bindings_override = @config.bindings_override
    config.logger = @agent_service_stub.logger if config.respond_to? :logger=
  end
end

Instance Attribute Details

#location_clientGoogle::Cloud::Location::Locations::Rest::Client (readonly)

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

Returns:

  • (Google::Cloud::Location::Locations::Rest::Client)


203
204
205
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 203

def location_client
  @location_client
end

#operations_client::Google::Cloud::Ces::V1::AgentService::Rest::Operations (readonly)

Get the associated client for long-running operations.



196
197
198
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 196

def operations_client
  @operations_client
end

Class Method Details

.configure {|config| ... } ⇒ Client::Configuration

Configure the AgentService Client class.

See Configuration for a description of the configuration fields.

Examples:


# Modify the configuration for all AgentService clients
::Google::Cloud::Ces::V1::AgentService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 66

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "Ces", "V1"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config.timeout = 60.0
    default_config.retry_policy = {
      initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
    }

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

#batch_delete_conversations(request, options = nil) ⇒ ::Gapic::Operation #batch_delete_conversations(parent: nil, conversations: nil) ⇒ ::Gapic::Operation

Batch deletes the specified conversations.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

Overloads:

  • #batch_delete_conversations(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to batch_delete_conversations via a request object, either of type BatchDeleteConversationsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::BatchDeleteConversationsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #batch_delete_conversations(parent: nil, conversations: nil) ⇒ ::Gapic::Operation

    Pass arguments to batch_delete_conversations 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) (defaults to: nil)

      Required. The resource name of the app to delete conversations from. Format: projects/{project}/locations/{location}/apps/{app}

    • conversations (::Array<::String>) (defaults to: nil)

      Required. The resource names of the conversations to delete.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 2228

def batch_delete_conversations request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::BatchDeleteConversationsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.batch_delete_conversations..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.batch_delete_conversations request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#configure {|config| ... } ⇒ Client::Configuration

Configure the AgentService 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 configure.

See Configuration for a description of the configuration fields.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



103
104
105
106
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 103

def configure
  yield @config if block_given?
  @config
end

#create_agent(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Agent #create_agent(parent: nil, agent_id: nil, agent: nil) ⇒ ::Google::Cloud::Ces::V1::Agent

Creates a new agent in the given app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Agent.
p result

Overloads:

  • #create_agent(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Agent

    Pass arguments to create_agent via a request object, either of type CreateAgentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::CreateAgentRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_agent(parent: nil, agent_id: nil, agent: nil) ⇒ ::Google::Cloud::Ces::V1::Agent

    Pass arguments to create_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) (defaults to: nil)

      Required. The resource name of the app to create an agent in.

    • agent_id (::String) (defaults to: nil)

      Optional. The ID to use for the agent, which will become the final component of the agent's resource name. If not provided, a unique ID will be automatically assigned for the agent.

    • agent (::Google::Cloud::Ces::V1::Agent, ::Hash) (defaults to: nil)

      Required. The agent to create.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 1101

def create_agent request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::CreateAgentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_agent..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.create_agent request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_app(request, options = nil) ⇒ ::Gapic::Operation #create_app(parent: nil, app_id: nil, app: nil) ⇒ ::Gapic::Operation

Creates a new app in the given project and location.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

Overloads:

  • #create_app(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_app via a request object, either of type CreateAppRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::CreateAppRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_app(parent: nil, app_id: nil, app: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_app 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) (defaults to: nil)

      Required. The resource name of the location to create an app in.

    • app_id (::String) (defaults to: nil)

      Optional. The ID to use for the app, which will become the final component of the app's resource name. If not provided, a unique ID will be automatically assigned for the app.

    • app (::Google::Cloud::Ces::V1::App, ::Hash) (defaults to: nil)

      Required. The app to create.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 448

def create_app request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::CreateAppRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_app..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.create_app request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_app_version(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::AppVersion #create_app_version(parent: nil, app_version_id: nil, app_version: nil) ⇒ ::Google::Cloud::Ces::V1::AppVersion

Creates a new app version in the given app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::AppVersion.
p result

Overloads:

  • #create_app_version(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::AppVersion

    Pass arguments to create_app_version via a request object, either of type CreateAppVersionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::CreateAppVersionRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_app_version(parent: nil, app_version_id: nil, app_version: nil) ⇒ ::Google::Cloud::Ces::V1::AppVersion

    Pass arguments to create_app_version 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) (defaults to: nil)

      Required. The resource name of the app to create an app version in.

    • app_version_id (::String) (defaults to: nil)

      Optional. The ID to use for the app version, which will become the final component of the app version's resource name. If not provided, a unique ID will be automatically assigned for the app version.

    • app_version (::Google::Cloud::Ces::V1::AppVersion, ::Hash) (defaults to: nil)

      Required. The app version to create.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 4043

def create_app_version request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::CreateAppVersionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_app_version..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.create_app_version request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_deployment(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Deployment #create_deployment(parent: nil, deployment_id: nil, deployment: nil) ⇒ ::Google::Cloud::Ces::V1::Deployment

Creates a new deployment in the given app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Deployment.
p result

Overloads:

  • #create_deployment(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Deployment

    Pass arguments to create_deployment via a request object, either of type CreateDeploymentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::CreateDeploymentRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_deployment(parent: nil, deployment_id: nil, deployment: nil) ⇒ ::Google::Cloud::Ces::V1::Deployment

    Pass arguments to create_deployment 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) (defaults to: nil)

      Required. The parent app. Format: projects/{project}/locations/{location}/apps/{app}

    • deployment_id (::String) (defaults to: nil)

      Optional. The ID to use for the deployment, which will become the final component of the deployment's resource name. If not provided, a unique ID will be automatically assigned for the deployment.

    • deployment (::Google::Cloud::Ces::V1::Deployment, ::Hash) (defaults to: nil)

      Required. The deployment to create.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 3185

def create_deployment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::CreateDeploymentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_deployment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.create_deployment request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_example(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Example #create_example(parent: nil, example_id: nil, example: nil) ⇒ ::Google::Cloud::Ces::V1::Example

Creates a new example in the given app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Example.
p result

Overloads:

  • #create_example(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Example

    Pass arguments to create_example via a request object, either of type CreateExampleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::CreateExampleRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_example(parent: nil, example_id: nil, example: nil) ⇒ ::Google::Cloud::Ces::V1::Example

    Pass arguments to create_example 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) (defaults to: nil)

      Required. The resource name of the app to create an example in.

    • example_id (::String) (defaults to: nil)

      Optional. The ID to use for the example, which will become the final component of the example's resource name. If not provided, a unique ID will be automatically assigned for the example.

    • example (::Google::Cloud::Ces::V1::Example, ::Hash) (defaults to: nil)

      Required. The example to create.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 1534

def create_example request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::CreateExampleRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_example..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.create_example request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_guardrail(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Guardrail #create_guardrail(parent: nil, guardrail_id: nil, guardrail: nil) ⇒ ::Google::Cloud::Ces::V1::Guardrail

Creates a new guardrail in the given app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Guardrail.
p result

Overloads:

  • #create_guardrail(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Guardrail

    Pass arguments to create_guardrail via a request object, either of type CreateGuardrailRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::CreateGuardrailRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_guardrail(parent: nil, guardrail_id: nil, guardrail: nil) ⇒ ::Google::Cloud::Ces::V1::Guardrail

    Pass arguments to create_guardrail 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) (defaults to: nil)

      Required. The resource name of the app to create a guardrail in.

    • guardrail_id (::String) (defaults to: nil)

      Optional. The ID to use for the guardrail, which will become the final component of the guardrail's resource name. If not provided, a unique ID will be automatically assigned for the guardrail.

    • guardrail (::Google::Cloud::Ces::V1::Guardrail, ::Hash) (defaults to: nil)

      Required. The guardrail to create.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 2747

def create_guardrail request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::CreateGuardrailRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_guardrail..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.create_guardrail request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_tool(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Tool #create_tool(parent: nil, tool_id: nil, tool: nil) ⇒ ::Google::Cloud::Ces::V1::Tool

Creates a new tool in the given app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Tool.
p result

Overloads:

  • #create_tool(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Tool

    Pass arguments to create_tool via a request object, either of type CreateToolRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::CreateToolRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_tool(parent: nil, tool_id: nil, tool: nil) ⇒ ::Google::Cloud::Ces::V1::Tool

    Pass arguments to create_tool 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) (defaults to: nil)

      Required. The resource name of the app to create a tool in.

    • tool_id (::String) (defaults to: nil)

      Optional. The ID to use for the tool, which will become the final component of the tool's resource name. If not provided, a unique ID will be automatically assigned for the tool.

    • tool (::Google::Cloud::Ces::V1::Tool, ::Hash) (defaults to: nil)

      Required. The tool to create.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 2314

def create_tool request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::CreateToolRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_tool..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.create_tool request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_toolset(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Toolset #create_toolset(parent: nil, toolset_id: nil, toolset: nil) ⇒ ::Google::Cloud::Ces::V1::Toolset

Creates a new toolset in the given app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Toolset.
p result

Overloads:

  • #create_toolset(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Toolset

    Pass arguments to create_toolset via a request object, either of type CreateToolsetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::CreateToolsetRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_toolset(parent: nil, toolset_id: nil, toolset: nil) ⇒ ::Google::Cloud::Ces::V1::Toolset

    Pass arguments to create_toolset 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) (defaults to: nil)

      Required. The resource name of the app to create a toolset in.

    • toolset_id (::String) (defaults to: nil)

      Optional. The ID to use for the toolset, which will become the final component of the toolset's resource name. If not provided, a unique ID will be automatically assigned for the toolset.

    • toolset (::Google::Cloud::Ces::V1::Toolset, ::Hash) (defaults to: nil)

      Required. The toolset to create.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 3610

def create_toolset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::CreateToolsetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_toolset..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.create_toolset request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_agent(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_agent(name: nil, force: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

Deletes the specified agent.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

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

Overloads:

  • #delete_agent(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_agent via a request object, either of type DeleteAgentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::DeleteAgentRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_agent(name: nil, force: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_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) (defaults to: nil)

      Required. The resource name of the agent to delete.

    • force (::Boolean) (defaults to: nil)

      Optional. Indicates whether to forcefully delete the agent, even if it is still referenced by other app/agents/examples.

      • If force = false, the deletion fails if other agents/examples reference it.
      • If force = true, delete the agent and remove it from all referencing apps/agents/examples.
    • etag (::String) (defaults to: nil)

      Optional. The current etag of the agent. If an etag is not provided, the deletion will overwrite any concurrent changes. If an etag is provided and does not match the current etag of the agent, deletion will be blocked and an ABORTED error will be returned.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 1273

def delete_agent request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::DeleteAgentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_agent..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.delete_agent request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_app(request, options = nil) ⇒ ::Gapic::Operation #delete_app(name: nil, etag: nil) ⇒ ::Gapic::Operation

Deletes the specified app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

Overloads:

  • #delete_app(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_app via a request object, either of type DeleteAppRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::DeleteAppRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_app(name: nil, etag: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_app 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) (defaults to: nil)

      Required. The resource name of the app to delete.

    • etag (::String) (defaults to: nil)

      Optional. The current etag of the app. If an etag is not provided, the deletion will overwrite any concurrent changes. If an etag is provided and does not match the current etag of the app, deletion will be blocked and an ABORTED error will be returned.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 621

def delete_app request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::DeleteAppRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_app..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.delete_app request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_app_version(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_app_version(name: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

Deletes the specified app version.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

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

Overloads:

  • #delete_app_version(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_app_version via a request object, either of type DeleteAppVersionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::DeleteAppVersionRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_app_version(name: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_app_version 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) (defaults to: nil)

      Required. The resource name of the app version to delete.

    • etag (::String) (defaults to: nil)

      Optional. The current etag of the app version. If an etag is not provided, the deletion will overwrite any concurrent changes. If an etag is provided and does not match the current etag of the app version, deletion will be blocked and an ABORTED error will be returned.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 4126

def delete_app_version request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::DeleteAppVersionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_app_version..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.delete_app_version request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_conversation(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_conversation(name: nil, source: nil) ⇒ ::Google::Protobuf::Empty

Deletes the specified conversation.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

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

Overloads:

  • #delete_conversation(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_conversation via a request object, either of type DeleteConversationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::DeleteConversationRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_conversation(name: nil, source: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_conversation 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) (defaults to: nil)

      Required. The resource name of the conversation to delete.

    • source (::Google::Cloud::Ces::V1::Conversation::Source) (defaults to: nil)

      Optional. Indicate the source of the conversation. If not set, Source.Live will be applied by default.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 2139

def delete_conversation request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::DeleteConversationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_conversation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.delete_conversation request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_deployment(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_deployment(name: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

Deletes the specified deployment.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

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

Overloads:

  • #delete_deployment(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_deployment via a request object, either of type DeleteDeploymentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::DeleteDeploymentRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_deployment(name: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_deployment 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) (defaults to: nil)

      Required. The name of the deployment to delete. Format: projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}

    • etag (::String) (defaults to: nil)

      Optional. The etag of the deployment. If an etag is provided and does not match the current etag of the deployment, deletion will be blocked and an ABORTED error will be returned.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 3349

def delete_deployment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::DeleteDeploymentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_deployment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.delete_deployment request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_example(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_example(name: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

Deletes the specified example.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

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

Overloads:

  • #delete_example(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_example via a request object, either of type DeleteExampleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::DeleteExampleRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_example(name: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_example 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) (defaults to: nil)

      Required. The resource name of the example to delete.

    • etag (::String) (defaults to: nil)

      Optional. The current etag of the example. If an etag is not provided, the deletion will overwrite any concurrent changes. If an etag is provided and does not match the current etag of the example, deletion will be blocked and an ABORTED error will be returned.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 1698

def delete_example request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::DeleteExampleRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_example..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.delete_example request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_guardrail(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_guardrail(name: nil, force: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

Deletes the specified guardrail.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

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

Overloads:

  • #delete_guardrail(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_guardrail via a request object, either of type DeleteGuardrailRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::DeleteGuardrailRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_guardrail(name: nil, force: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_guardrail 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) (defaults to: nil)

      Required. The resource name of the guardrail to delete.

    • force (::Boolean) (defaults to: nil)

      Optional. Indicates whether to forcefully delete the guardrail, even if it is still referenced by app/agents.

      • If force = false, the deletion fails if any apps/agents still reference the guardrail.
      • If force = true, all existing references from apps/agents will be removed and the guardrail will be deleted.
    • etag (::String) (defaults to: nil)

      Optional. The current etag of the guardrail. If an etag is not provided, the deletion will overwrite any concurrent changes. If an etag is provided and does not match the current etag of the guardrail, deletion will be blocked and an ABORTED error will be returned.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 2919

def delete_guardrail request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::DeleteGuardrailRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_guardrail..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.delete_guardrail request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_tool(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_tool(name: nil, force: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

Deletes the specified tool.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

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

Overloads:

  • #delete_tool(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_tool via a request object, either of type DeleteToolRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::DeleteToolRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_tool(name: nil, force: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_tool 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) (defaults to: nil)

      Required. The resource name of the tool to delete.

    • force (::Boolean) (defaults to: nil)

      Optional. Indicates whether to forcefully delete the tool, even if it is still referenced by agents/examples.

      • If force = false, the deletion will fail if any agents still reference the tool.
      • If force = true, all existing references from agents will be removed and the tool will be deleted.
    • etag (::String) (defaults to: nil)

      Optional. The current etag of the tool. If an etag is not provided, the deletion will overwrite any concurrent changes. If an etag is provided and does not match the current etag of the tool, deletion will be blocked and an ABORTED error will be returned.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 2486

def delete_tool request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::DeleteToolRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_tool..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.delete_tool request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_toolset(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_toolset(name: nil, force: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

Deletes the specified toolset.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

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

Overloads:

  • #delete_toolset(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_toolset via a request object, either of type DeleteToolsetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::DeleteToolsetRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_toolset(name: nil, force: nil, etag: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_toolset 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) (defaults to: nil)

      Required. The resource name of the toolset to delete.

    • force (::Boolean) (defaults to: nil)

      Optional. Indicates whether to forcefully delete the toolset, even if it is still referenced by app/agents.

      • If force = false, the deletion fails if any agents still reference the toolset.
      • If force = true, all existing references from agents will be removed and the toolset will be deleted.
    • etag (::String) (defaults to: nil)

      Optional. The current etag of the toolset. If an etag is not provided, the deletion will overwrite any concurrent changes. If an etag is provided and does not match the current etag of the toolset, deletion will be blocked and an ABORTED error will be returned.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 3782

def delete_toolset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::DeleteToolsetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_toolset..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.delete_toolset request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#export_app(request, options = nil) ⇒ ::Gapic::Operation #export_app(name: nil, export_format: nil, gcs_uri: nil, app_version: nil) ⇒ ::Gapic::Operation

Exports the specified app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

Overloads:

  • #export_app(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to export_app via a request object, either of type ExportAppRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::ExportAppRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #export_app(name: nil, export_format: nil, gcs_uri: nil, app_version: nil) ⇒ ::Gapic::Operation

    Pass arguments to export_app 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) (defaults to: nil)

      Required. The resource name of the app to export.

    • export_format (::Google::Cloud::Ces::V1::ExportAppRequest::ExportFormat) (defaults to: nil)

      Required. The format to export the app in.

    • gcs_uri (::String) (defaults to: nil)

      Optional. The Google Cloud Storage URI to which to export the app. The format of this URI must be gs://<bucket-name>/<object-name>. The exported app archive will be written directly to the specified GCS object.

    • app_version (::String) (defaults to: nil)

      Optional. The resource name of the app version to export. Format: projects/{project}/locations/{location}/apps/{app}/versions/{version}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 719

def export_app request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::ExportAppRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.export_app..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.export_app request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_agent(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Agent #get_agent(name: nil) ⇒ ::Google::Cloud::Ces::V1::Agent

Gets details of the specified agent.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Agent.
p result

Overloads:

  • #get_agent(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Agent

    Pass arguments to get_agent via a request object, either of type GetAgentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::GetAgentRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_agent(name: nil) ⇒ ::Google::Cloud::Ces::V1::Agent

    Pass arguments to get_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) (defaults to: nil)

      Required. The resource name of the agent to retrieve.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 1017

def get_agent request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::GetAgentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_agent..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.get_agent request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_app(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::App #get_app(name: nil) ⇒ ::Google::Cloud::Ces::V1::App

Gets details of the specified app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::App.
p result

Overloads:

  • #get_app(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::App

    Pass arguments to get_app via a request object, either of type GetAppRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::GetAppRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_app(name: nil) ⇒ ::Google::Cloud::Ces::V1::App

    Pass arguments to get_app 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) (defaults to: nil)

      Required. The resource name of the app to retrieve.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 357

def get_app request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::GetAppRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_app..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.get_app request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_app_version(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::AppVersion #get_app_version(name: nil) ⇒ ::Google::Cloud::Ces::V1::AppVersion

Gets details of the specified app version.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::AppVersion.
p result

Overloads:

  • #get_app_version(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::AppVersion

    Pass arguments to get_app_version via a request object, either of type GetAppVersionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::GetAppVersionRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_app_version(name: nil) ⇒ ::Google::Cloud::Ces::V1::AppVersion

    Pass arguments to get_app_version 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) (defaults to: nil)

      Required. The resource name of the app version to retrieve.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 3959

def get_app_version request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::GetAppVersionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_app_version..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.get_app_version request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_changelog(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Changelog #get_changelog(name: nil) ⇒ ::Google::Cloud::Ces::V1::Changelog

Gets the specified changelog.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Changelog.
p result

Overloads:

  • #get_changelog(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Changelog

    Pass arguments to get_changelog via a request object, either of type GetChangelogRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::GetChangelogRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_changelog(name: nil) ⇒ ::Google::Cloud::Ces::V1::Changelog

    Pass arguments to get_changelog 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) (defaults to: nil)

      Required. The resource name of the changelog to retrieve.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 4406

def get_changelog request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::GetChangelogRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_changelog..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.get_changelog request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_conversation(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Conversation #get_conversation(name: nil, source: nil) ⇒ ::Google::Cloud::Ces::V1::Conversation

Gets details of the specified conversation.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Conversation.
p result

Overloads:

  • #get_conversation(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Conversation

    Pass arguments to get_conversation via a request object, either of type GetConversationRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::GetConversationRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_conversation(name: nil, source: nil) ⇒ ::Google::Cloud::Ces::V1::Conversation

    Pass arguments to get_conversation 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) (defaults to: nil)

      Required. The resource name of the conversation to retrieve.

    • source (::Google::Cloud::Ces::V1::Conversation::Source) (defaults to: nil)

      Optional. Indicate the source of the conversation. If not set, all source will be searched.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 2058

def get_conversation request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::GetConversationRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_conversation..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.get_conversation request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_deployment(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Deployment #get_deployment(name: nil) ⇒ ::Google::Cloud::Ces::V1::Deployment

Gets details of the specified deployment.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Deployment.
p result

Overloads:

  • #get_deployment(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Deployment

    Pass arguments to get_deployment via a request object, either of type GetDeploymentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::GetDeploymentRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_deployment(name: nil) ⇒ ::Google::Cloud::Ces::V1::Deployment

    Pass arguments to get_deployment 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) (defaults to: nil)

      Required. The name of the deployment. Format: projects/{project}/locations/{location}/apps/{app}/deployments/{deployment}

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 3099

def get_deployment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::GetDeploymentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_deployment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.get_deployment request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_example(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Example #get_example(name: nil) ⇒ ::Google::Cloud::Ces::V1::Example

Gets details of the specified example.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Example.
p result

Overloads:

  • #get_example(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Example

    Pass arguments to get_example via a request object, either of type GetExampleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::GetExampleRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_example(name: nil) ⇒ ::Google::Cloud::Ces::V1::Example

    Pass arguments to get_example 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) (defaults to: nil)

      Required. The resource name of the example to retrieve.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 1450

def get_example request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::GetExampleRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_example..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.get_example request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_guardrail(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Guardrail #get_guardrail(name: nil) ⇒ ::Google::Cloud::Ces::V1::Guardrail

Gets details of the specified guardrail.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Guardrail.
p result

Overloads:

  • #get_guardrail(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Guardrail

    Pass arguments to get_guardrail via a request object, either of type GetGuardrailRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::GetGuardrailRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_guardrail(name: nil) ⇒ ::Google::Cloud::Ces::V1::Guardrail

    Pass arguments to get_guardrail 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) (defaults to: nil)

      Required. The resource name of the guardrail to retrieve.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 2663

def get_guardrail request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::GetGuardrailRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_guardrail..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.get_guardrail request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_tool(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Tool #get_tool(name: nil) ⇒ ::Google::Cloud::Ces::V1::Tool

Gets details of the specified tool.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Tool.
p result

Overloads:

  • #get_tool(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Tool

    Pass arguments to get_tool via a request object, either of type GetToolRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::GetToolRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_tool(name: nil) ⇒ ::Google::Cloud::Ces::V1::Tool

    Pass arguments to get_tool 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) (defaults to: nil)

      Required. The resource name of the tool to retrieve.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 1875

def get_tool request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::GetToolRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_tool..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.get_tool request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_toolset(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Toolset #get_toolset(name: nil) ⇒ ::Google::Cloud::Ces::V1::Toolset

Gets details of the specified toolset.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Toolset.
p result

Overloads:

  • #get_toolset(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Toolset

    Pass arguments to get_toolset via a request object, either of type GetToolsetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::GetToolsetRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_toolset(name: nil) ⇒ ::Google::Cloud::Ces::V1::Toolset

    Pass arguments to get_toolset 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) (defaults to: nil)

      Required. The resource name of the toolset to retrieve.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 3526

def get_toolset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::GetToolsetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_toolset..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.get_toolset request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#import_app(request, options = nil) ⇒ ::Gapic::Operation #import_app(gcs_uri: nil, app_content: nil, parent: nil, display_name: nil, app_id: nil, import_options: nil, ignore_app_lock: nil) ⇒ ::Gapic::Operation

Imports the specified app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

Overloads:

  • #import_app(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to import_app via a request object, either of type ImportAppRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::ImportAppRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #import_app(gcs_uri: nil, app_content: nil, parent: nil, display_name: nil, app_id: nil, import_options: nil, ignore_app_lock: nil) ⇒ ::Gapic::Operation

    Pass arguments to import_app 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:

    • gcs_uri (::String) (defaults to: nil)

      The Google Cloud Storage URI from which to import app. The format of this URI must be gs://<bucket-name>/<object-name>.

      Note: The following parameters are mutually exclusive: gcs_uri, app_content. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.

    • app_content (::String) (defaults to: nil)

      Raw bytes representing the compressed zip file with the app folder structure.

      Note: The following parameters are mutually exclusive: app_content, gcs_uri. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one.

    • parent (::String) (defaults to: nil)

      Required. The parent resource name with the location of the app to import.

    • display_name (::String) (defaults to: nil)

      Optional. The display name of the app to import.

      • If the app is created on import, and the display name is specified, the imported app will use this display name. If a conflict is detected with an existing app, a timestamp will be appended to the display name to make it unique.
      • If the app is a reimport, this field should not be set. Providing a display name during reimport will result in an INVALID_ARGUMENT error.
    • app_id (::String) (defaults to: nil)

      Optional. The ID to use for the imported app.

      • If not specified, a unique ID will be automatically assigned for the app.
      • Otherwise, the imported app will use this ID as the final component of its resource name. If an app with the same ID already exists at the specified location in the project, the content of the existing app will be replaced.
    • import_options (::Google::Cloud::Ces::V1::ImportAppRequest::ImportOptions, ::Hash) (defaults to: nil)

      Optional. Options governing the import process for the app.

    • ignore_app_lock (::Boolean) (defaults to: nil)

      Optional. Flag for overriding the app lock during import. If set to true, the import process will ignore the app lock.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 838

def import_app request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::ImportAppRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.import_app..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.import_app request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_agents(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Agent> #list_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Agent>

Lists agents in the given app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

# Call the list_agents method.
result = client.list_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::Ces::V1::Agent.
  p item
end

Overloads:

  • #list_agents(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Agent>

    Pass arguments to list_agents via a request object, either of type ListAgentsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::ListAgentsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_agents(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Agent>

    Pass arguments to list_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) (defaults to: nil)

      Required. The resource name of the app to list agents from.

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      Optional. The next_page_token value returned from a previous list AgentService.ListAgents call.

    • filter (::String) (defaults to: nil)

      Optional. Filter to be applied when listing the agents. See https://google.aip.dev/160 for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. Only "name" and "create_time" is supported. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 937

def list_agents request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::ListAgentsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_agents..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

#list_app_versions(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::AppVersion> #list_app_versions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::AppVersion>

Lists all app versions in the given app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

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

Overloads:

  • #list_app_versions(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::AppVersion>

    Pass arguments to list_app_versions via a request object, either of type ListAppVersionsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::ListAppVersionsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_app_versions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::AppVersion>

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

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the app to list app versions from.

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      Optional. The next_page_token value returned from a previous list AgentService.ListAppVersions call.

    • filter (::String) (defaults to: nil)

      Optional. Filter to be applied when listing the app versions. See https://google.aip.dev/160 for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. Only "name" and "create_time" is supported. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 3879

def list_app_versions request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::ListAppVersionsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_app_versions..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

#list_apps(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::App> #list_apps(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::App>

Lists apps in the given project and location.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

# Call the list_apps method.
result = client.list_apps 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::Ces::V1::App.
  p item
end

Overloads:

  • #list_apps(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::App>

    Pass arguments to list_apps via a request object, either of type ListAppsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::ListAppsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_apps(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::App>

    Pass arguments to list_apps 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) (defaults to: nil)

      Required. The resource name of the location to list apps from.

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      Optional. The next_page_token value returned from a previous list AgentService.ListApps call.

    • filter (::String) (defaults to: nil)

      Optional. Filter to be applied when listing the apps. See https://google.aip.dev/160 for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. Only "name" and "create_time" is supported. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 277

def list_apps request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::ListAppsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_apps..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

#list_changelogs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Changelog> #list_changelogs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Changelog>

Lists the changelogs of the specified app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

# Call the list_changelogs method.
result = client.list_changelogs 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::Ces::V1::Changelog.
  p item
end

Overloads:

  • #list_changelogs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Changelog>

    Pass arguments to list_changelogs via a request object, either of type ListChangelogsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::ListChangelogsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_changelogs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Changelog>

    Pass arguments to list_changelogs 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) (defaults to: nil)

      Required. The resource name of the app to list changelogs from.

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      Optional. The next_page_token value returned from a previous list AgentService.ListChangelogs call.

    • filter (::String) (defaults to: nil)

      Optional. Filter to be applied when listing the changelogs. See https://google.aip.dev/160 for more details.

      The filter string can be used to filter by action, resource_type, resource_name, author, and create_time. The : comparator can be used for case-insensitive partial matching on string fields, while = performs an exact case-sensitive match.

      Examples:

      • action:update (case-insensitive partial match)
      • action="Create" (case-sensitive exact match)
      • resource_type:agent
      • resource_name:my-agent
      • author:me@example.com
      • create_time > "2025-01-01T00:00:00Z"
      • create_time <= "2025-01-01T00:00:00Z" AND resource_type:tool
    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. Only "name" and "create_time" is supported. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 4326

def list_changelogs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::ListChangelogsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_changelogs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

#list_conversations(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Conversation> #list_conversations(parent: nil, page_size: nil, page_token: nil, filter: nil, source: nil, sources: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Conversation>

Lists conversations in the given app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

# Call the list_conversations method.
result = client.list_conversations 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::Ces::V1::Conversation.
  p item
end

Overloads:

  • #list_conversations(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Conversation>

    Pass arguments to list_conversations via a request object, either of type ListConversationsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::ListConversationsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_conversations(parent: nil, page_size: nil, page_token: nil, filter: nil, source: nil, sources: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Conversation>

    Pass arguments to list_conversations 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) (defaults to: nil)

      Required. The resource name of the app to list conversations from.

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      Optional. The next_page_token value returned from a previous list AgentService.ListConversations call.

    • filter (::String) (defaults to: nil)

      Optional. Filter to be applied when listing the conversations. See https://google.aip.dev/160 for more details.

    • source (::Google::Cloud::Ces::V1::Conversation::Source) (defaults to: nil)

      Optional. Indicate the source of the conversation. If not set, Source.Live will be applied by default. Will be deprecated in favor of sources field.

    • sources (::Array<::Google::Cloud::Ces::V1::Conversation::Source>) (defaults to: nil)

      Optional. Indicate the sources of the conversations. If not set, all available sources will be applied by default.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 1975

def list_conversations request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::ListConversationsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_conversations..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

#list_deployments(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Deployment> #list_deployments(parent: nil, page_size: nil, page_token: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Deployment>

Lists deployments in the given app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

# Call the list_deployments method.
result = client.list_deployments 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::Ces::V1::Deployment.
  p item
end

Overloads:

  • #list_deployments(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Deployment>

    Pass arguments to list_deployments via a request object, either of type ListDeploymentsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::ListDeploymentsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_deployments(parent: nil, page_size: nil, page_token: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Deployment>

    Pass arguments to list_deployments 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) (defaults to: nil)

      Required. The parent app. Format: projects/{project}/locations/{location}/apps/{app}

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of deployments to return. The service may return fewer than this value. If unspecified, at most 50 deployments will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

    • page_token (::String) (defaults to: nil)

      Optional. A page token, received from a previous ListDeployments call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListDeployments must match the call that provided the page token.

    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. Only "name" and "create_time" is supported. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 3017

def list_deployments request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::ListDeploymentsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_deployments..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

#list_examples(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Example> #list_examples(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Example>

Lists examples in the given app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

# Call the list_examples method.
result = client.list_examples 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::Ces::V1::Example.
  p item
end

Overloads:

  • #list_examples(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Example>

    Pass arguments to list_examples via a request object, either of type ListExamplesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::ListExamplesRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_examples(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Example>

    Pass arguments to list_examples 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) (defaults to: nil)

      Required. The resource name of the app to list examples from.

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      Optional. The next_page_token value returned from a previous list AgentService.ListExamples call.

    • filter (::String) (defaults to: nil)

      Optional. Filter to be applied when listing the examples. See https://google.aip.dev/160 for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. Only "name" and "create_time" is supported. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 1370

def list_examples request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::ListExamplesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_examples..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

#list_guardrails(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Guardrail> #list_guardrails(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Guardrail>

Lists guardrails in the given app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

# Call the list_guardrails method.
result = client.list_guardrails 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::Ces::V1::Guardrail.
  p item
end

Overloads:

  • #list_guardrails(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Guardrail>

    Pass arguments to list_guardrails via a request object, either of type ListGuardrailsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::ListGuardrailsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_guardrails(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Guardrail>

    Pass arguments to list_guardrails 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) (defaults to: nil)

      Required. The resource name of the app to list guardrails from.

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      Optional. The next_page_token value returned from a previous list AgentService.ListGuardrails call.

    • filter (::String) (defaults to: nil)

      Optional. Filter to be applied when listing the guardrails. See https://google.aip.dev/160 for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. Only "name" and "create_time" is supported. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 2583

def list_guardrails request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::ListGuardrailsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_guardrails..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

#list_tools(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Tool> #list_tools(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Tool>

Lists tools in the given app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

# Call the list_tools method.
result = client.list_tools 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::Ces::V1::Tool.
  p item
end

Overloads:

  • #list_tools(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Tool>

    Pass arguments to list_tools via a request object, either of type ListToolsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::ListToolsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_tools(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Tool>

    Pass arguments to list_tools 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) (defaults to: nil)

      Required. The resource name of the app to list tools from.

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      Optional. The next_page_token value returned from a previous list AgentService.ListTools call.

    • filter (::String) (defaults to: nil)

      Optional. Filter to be applied when listing the tools. Use "include_system_tools=true" to include system tools in the response. See https://google.aip.dev/160 for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. Only "name" and "create_time" is supported. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 1795

def list_tools request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::ListToolsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_tools..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

#list_toolsets(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Toolset> #list_toolsets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Toolset>

Lists toolsets in the given app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

# Call the list_toolsets method.
result = client.list_toolsets 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::Ces::V1::Toolset.
  p item
end

Overloads:

  • #list_toolsets(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Toolset>

    Pass arguments to list_toolsets via a request object, either of type ListToolsetsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::ListToolsetsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_toolsets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Ces::V1::Toolset>

    Pass arguments to list_toolsets 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) (defaults to: nil)

      Required. The resource name of the app to list toolsets from.

    • page_size (::Integer) (defaults to: nil)

      Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

    • page_token (::String) (defaults to: nil)

      Optional. The next_page_token value returned from a previous list AgentService.ListToolsets call.

    • filter (::String) (defaults to: nil)

      Optional. Filter to be applied when listing the toolsets. See https://google.aip.dev/160 for more details.

    • order_by (::String) (defaults to: nil)

      Optional. Field to sort by. Only "name" and "create_time" is supported. See https://google.aip.dev/132#ordering for more details.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 3446

def list_toolsets request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::ListToolsetsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_toolsets..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

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

#loggerLogger

The logger used for request/response debug logging.

Returns:

  • (Logger)


210
211
212
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 210

def logger
  @agent_service_stub.logger
end

#restore_app_version(request, options = nil) ⇒ ::Gapic::Operation #restore_app_version(name: nil) ⇒ ::Gapic::Operation

Restores the specified app version. This will create a new app version from the current draft app and overwrite the current draft with the specified app version.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

Overloads:

  • #restore_app_version(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to restore_app_version via a request object, either of type RestoreAppVersionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::RestoreAppVersionRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #restore_app_version(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to restore_app_version 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) (defaults to: nil)

      Required. The resource name of the app version to restore.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 4213

def restore_app_version request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::RestoreAppVersionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.restore_app_version..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.restore_app_version request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


113
114
115
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 113

def universe_domain
  @agent_service_stub.universe_domain
end

#update_agent(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Agent #update_agent(agent: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1::Agent

Updates the specified agent.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Agent.
p result

Overloads:

  • #update_agent(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Agent

    Pass arguments to update_agent via a request object, either of type UpdateAgentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::UpdateAgentRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_agent(agent: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1::Agent

    Pass arguments to update_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:

    • agent (::Google::Cloud::Ces::V1::Agent, ::Hash) (defaults to: nil)

      Required. The agent to update.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to control which fields get updated. If the mask is not present, all fields will be updated.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 1182

def update_agent request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::UpdateAgentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_agent..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.update_agent request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_app(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::App #update_app(app: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1::App

Updates the specified app.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::App.
p result

Overloads:

  • #update_app(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::App

    Pass arguments to update_app via a request object, either of type UpdateAppRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::UpdateAppRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_app(app: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1::App

    Pass arguments to update_app 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:

    • app (::Google::Cloud::Ces::V1::App, ::Hash) (defaults to: nil)

      Required. The app to update.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to control which fields get updated. If the mask is not present, all fields will be updated.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 531

def update_app request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::UpdateAppRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_app..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.update_app request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_deployment(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Deployment #update_deployment(deployment: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1::Deployment

Updates the specified deployment.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Deployment.
p result

Overloads:

  • #update_deployment(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Deployment

    Pass arguments to update_deployment via a request object, either of type UpdateDeploymentRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::UpdateDeploymentRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_deployment(deployment: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1::Deployment

    Pass arguments to update_deployment 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:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 3265

def update_deployment request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::UpdateDeploymentRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_deployment..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.update_deployment request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_example(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Example #update_example(example: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1::Example

Updates the specified example.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Example.
p result

Overloads:

  • #update_example(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Example

    Pass arguments to update_example via a request object, either of type UpdateExampleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::UpdateExampleRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_example(example: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1::Example

    Pass arguments to update_example 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:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 1615

def update_example request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::UpdateExampleRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_example..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.update_example request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_guardrail(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Guardrail #update_guardrail(guardrail: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1::Guardrail

Updates the specified guardrail.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Guardrail.
p result

Overloads:

  • #update_guardrail(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Guardrail

    Pass arguments to update_guardrail via a request object, either of type UpdateGuardrailRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::UpdateGuardrailRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_guardrail(guardrail: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1::Guardrail

    Pass arguments to update_guardrail 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:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 2828

def update_guardrail request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::UpdateGuardrailRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_guardrail..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.update_guardrail request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_tool(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Tool #update_tool(tool: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1::Tool

Updates the specified tool.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Tool.
p result

Overloads:

  • #update_tool(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Tool

    Pass arguments to update_tool via a request object, either of type UpdateToolRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::UpdateToolRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_tool(tool: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1::Tool

    Pass arguments to update_tool 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:

    • tool (::Google::Cloud::Ces::V1::Tool, ::Hash) (defaults to: nil)

      Required. The tool to update.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to control which fields get updated. If the mask is not present, all fields will be updated.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 2395

def update_tool request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::UpdateToolRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_tool..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.update_tool request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_toolset(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Toolset #update_toolset(toolset: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1::Toolset

Updates the specified toolset.

Examples:

Basic example

require "google/cloud/ces/v1"

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

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

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

# The returned object is of type Google::Cloud::Ces::V1::Toolset.
p result

Overloads:

  • #update_toolset(request, options = nil) ⇒ ::Google::Cloud::Ces::V1::Toolset

    Pass arguments to update_toolset via a request object, either of type UpdateToolsetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::Ces::V1::UpdateToolsetRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_toolset(toolset: nil, update_mask: nil) ⇒ ::Google::Cloud::Ces::V1::Toolset

    Pass arguments to update_toolset 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:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
# File 'lib/google/cloud/ces/v1/agent_service/rest/client.rb', line 3691

def update_toolset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Ces::V1::UpdateToolsetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_toolset..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::Ces::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

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

  @agent_service_stub.update_toolset request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end