Class: Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client

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

Overview

REST client for the NetworkServices service.

Service describing handlers for resources.

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#address_path, #agent_gateway_path, #authorization_policy_path, #backend_service_path, #certificate_path, #client_tls_policy_path, #endpoint_policy_path, #gateway_path, #gateway_route_view_path, #gateway_security_policy_path, #grpc_route_path, #http_route_path, #location_path, #mesh_path, #mesh_route_view_path, #network_path, #server_tls_policy_path, #service_binding_path, #service_lb_policy_path, #service_path, #subnetwork_path, #target_tcp_proxy_path, #tcp_route_path, #tls_route_path, #wasm_plugin_path, #wasm_plugin_version_path

Constructor Details

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

Create a new NetworkServices REST client object.

Examples:


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

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

Yields:

  • (config)

    Configure the NetworkServices client.

Yield Parameters:



130
131
132
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
190
191
192
193
194
195
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 130

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::NetworkServices::V1::NetworkServices::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

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

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

  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @network_services_stub.endpoint
    config.universe_domain = @network_services_stub.universe_domain
    config.bindings_override = @config.bindings_override
    config.logger = @network_services_stub.logger if config.respond_to? :logger=
  end
end

Instance Attribute Details

#iam_policy_clientGoogle::Iam::V1::IAMPolicy::Rest::Client (readonly)

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

Returns:

  • (Google::Iam::V1::IAMPolicy::Rest::Client)


216
217
218
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 216

def iam_policy_client
  @iam_policy_client
end

#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)


209
210
211
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 209

def location_client
  @location_client
end

#operations_client::Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Operations (readonly)

Get the associated client for long-running operations.



202
203
204
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 202

def operations_client
  @operations_client
end

Class Method Details

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

Configure the NetworkServices Client class.

See Configuration for a description of the configuration fields.

Examples:


# Modify the configuration for all NetworkServices clients
::Google::Cloud::NetworkServices::V1::NetworkServices::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
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 66

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "NetworkServices", "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
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

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

Configure the NetworkServices 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:



100
101
102
103
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 100

def configure
  yield @config if block_given?
  @config
end

#create_agent_gateway(request, options = nil) ⇒ ::Gapic::Operation #create_agent_gateway(parent: nil, agent_gateway_id: nil, agent_gateway: nil) ⇒ ::Gapic::Operation

Creates a new AgentGateway in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the create_agent_gateway method.
result = client.create_agent_gateway 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_agent_gateway(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest, ::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_gateway(parent: nil, agent_gateway_id: nil, agent_gateway: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_agent_gateway 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 resource of the AgentGateway. Must be in the format projects/*/locations/*.

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

      Required. Short name of the AgentGateway resource to be created.

    • agent_gateway (::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash) (defaults to: nil)

      Required. AgentGateway resource to be created.

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.



5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 5641

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateAgentGatewayRequest

  # 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_gateway..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::NetworkServices::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_gateway.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_agent_gateway.retry_policy

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

  @network_services_stub.create_agent_gateway 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_endpoint_policy(request, options = nil) ⇒ ::Gapic::Operation #create_endpoint_policy(parent: nil, endpoint_policy_id: nil, endpoint_policy: nil) ⇒ ::Gapic::Operation

Creates a new EndpointPolicy in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the create_endpoint_policy method.
result = client.create_endpoint_policy 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_endpoint_policy(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest, ::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_endpoint_policy(parent: nil, endpoint_policy_id: nil, endpoint_policy: nil) ⇒ ::Gapic::Operation

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

    Parameters:

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

      Required. The parent resource of the EndpointPolicy. Must be in the format projects/*/locations/*.

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

      Required. Short name of the EndpointPolicy resource to be created. E.g. "CustomECS".

    • endpoint_policy (::Google::Cloud::NetworkServices::V1::EndpointPolicy, ::Hash) (defaults to: nil)

      Required. EndpointPolicy resource to be created.

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.



460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 460

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateEndpointPolicyRequest

  # 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_endpoint_policy..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::NetworkServices::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_endpoint_policy.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_endpoint_policy.retry_policy

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

  @network_services_stub.create_endpoint_policy 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_gateway(request, options = nil) ⇒ ::Gapic::Operation #create_gateway(parent: nil, gateway_id: nil, gateway: nil) ⇒ ::Gapic::Operation

Creates a new Gateway in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the create_gateway method.
result = client.create_gateway 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_gateway(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::CreateGatewayRequest, ::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_gateway(parent: nil, gateway_id: nil, gateway: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_gateway 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 resource of the Gateway. Must be in the format projects/*/locations/*.

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

      Required. Short name of the Gateway resource to be created.

    • gateway (::Google::Cloud::NetworkServices::V1::Gateway, ::Hash) (defaults to: nil)

      Required. Gateway resource to be created.

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.



1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 1721

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateGatewayRequest

  # 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_gateway..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::NetworkServices::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_gateway.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_gateway.retry_policy

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

  @network_services_stub.create_gateway 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_grpc_route(request, options = nil) ⇒ ::Gapic::Operation #create_grpc_route(parent: nil, grpc_route_id: nil, grpc_route: nil) ⇒ ::Gapic::Operation

Creates a new GrpcRoute in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the create_grpc_route method.
result = client.create_grpc_route 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_grpc_route(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest, ::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_grpc_route(parent: nil, grpc_route_id: nil, grpc_route: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_grpc_route 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 resource of the GrpcRoute. Must be in the format projects/*/locations/*.

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

      Required. Short name of the GrpcRoute resource to be created.

    • grpc_route (::Google::Cloud::NetworkServices::V1::GrpcRoute, ::Hash) (defaults to: nil)

      Required. GrpcRoute resource to be created.

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.



2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 2168

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateGrpcRouteRequest

  # 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_grpc_route..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::NetworkServices::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_grpc_route.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_grpc_route.retry_policy

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

  @network_services_stub.create_grpc_route 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_http_route(request, options = nil) ⇒ ::Gapic::Operation #create_http_route(parent: nil, http_route_id: nil, http_route: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a new HttpRoute in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the create_http_route method.
result = client.create_http_route 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_http_route(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest, ::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_http_route(parent: nil, http_route_id: nil, http_route: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_http_route 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 resource of the HttpRoute. Must be in the format projects/*/locations/*.

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

      Required. Short name of the HttpRoute resource to be created.

    • http_route (::Google::Cloud::NetworkServices::V1::HttpRoute, ::Hash) (defaults to: nil)

      Required. HttpRoute resource to be created.

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

      Optional. Idempotent request UUID.

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.



2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 2619

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateHttpRouteRequest

  # 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_http_route..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::NetworkServices::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_http_route.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_http_route.retry_policy

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

  @network_services_stub.create_http_route 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_mesh(request, options = nil) ⇒ ::Gapic::Operation #create_mesh(parent: nil, mesh_id: nil, mesh: nil) ⇒ ::Gapic::Operation

Creates a new Mesh in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the create_mesh method.
result = client.create_mesh 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_mesh(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::CreateMeshRequest, ::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_mesh(parent: nil, mesh_id: nil, mesh: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_mesh 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 resource of the Mesh. Must be in the format projects/*/locations/*.

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

      Required. Short name of the Mesh resource to be created.

    • mesh (::Google::Cloud::NetworkServices::V1::Mesh, ::Hash) (defaults to: nil)

      Required. Mesh resource to be created.

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.



4403
4404
4405
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
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 4403

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateMeshRequest

  # 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_mesh..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::NetworkServices::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_mesh.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_mesh.retry_policy

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

  @network_services_stub.create_mesh 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_service_binding(request, options = nil) ⇒ ::Gapic::Operation #create_service_binding(parent: nil, service_binding_id: nil, service_binding: nil) ⇒ ::Gapic::Operation

Creates a new ServiceBinding in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the create_service_binding method.
result = client.create_service_binding 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_service_binding(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest, ::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_service_binding(parent: nil, service_binding_id: nil, service_binding: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_service_binding 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 resource of the ServiceBinding. Must be in the format projects/*/locations/*.

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

      Required. Short name of the ServiceBinding resource to be created.

    • service_binding (::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash) (defaults to: nil)

      Required. ServiceBinding resource to be created.

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.



3956
3957
3958
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
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 3956

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateServiceBindingRequest

  # 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_service_binding..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::NetworkServices::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_service_binding.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_service_binding.retry_policy

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

  @network_services_stub.create_service_binding 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_service_lb_policy(request, options = nil) ⇒ ::Gapic::Operation #create_service_lb_policy(parent: nil, service_lb_policy_id: nil, service_lb_policy: nil) ⇒ ::Gapic::Operation

Creates a new ServiceLbPolicy in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the create_service_lb_policy method.
result = client.create_service_lb_policy 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_service_lb_policy(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest, ::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_service_lb_policy(parent: nil, service_lb_policy_id: nil, service_lb_policy: nil) ⇒ ::Gapic::Operation

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

    Parameters:

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

      Required. The parent resource of the ServiceLbPolicy. Must be in the format projects/{project}/locations/{location}.

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

      Required. Short name of the ServiceLbPolicy resource to be created. E.g. for resource name projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}. the id is value of {service_lb_policy_name}

    • service_lb_policy (::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash) (defaults to: nil)

      Required. ServiceLbPolicy resource to be created.

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.



4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 4850

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateServiceLbPolicyRequest

  # 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_service_lb_policy..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::NetworkServices::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_service_lb_policy.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_service_lb_policy.retry_policy

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

  @network_services_stub.create_service_lb_policy 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_tcp_route(request, options = nil) ⇒ ::Gapic::Operation #create_tcp_route(parent: nil, tcp_route_id: nil, tcp_route: nil) ⇒ ::Gapic::Operation

Creates a new TcpRoute in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the create_tcp_route method.
result = client.create_tcp_route 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_tcp_route(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest, ::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_tcp_route(parent: nil, tcp_route_id: nil, tcp_route: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_tcp_route 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 resource of the TcpRoute. Must be in the format projects/*/locations/*.

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

      Required. Short name of the TcpRoute resource to be created.

    • tcp_route (::Google::Cloud::NetworkServices::V1::TcpRoute, ::Hash) (defaults to: nil)

      Required. TcpRoute resource to be created.

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.



3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 3066

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateTcpRouteRequest

  # 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_tcp_route..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::NetworkServices::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_tcp_route.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_tcp_route.retry_policy

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

  @network_services_stub.create_tcp_route 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_tls_route(request, options = nil) ⇒ ::Gapic::Operation #create_tls_route(parent: nil, tls_route_id: nil, tls_route: nil) ⇒ ::Gapic::Operation

Creates a new TlsRoute in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the create_tls_route method.
result = client.create_tls_route 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_tls_route(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest, ::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_tls_route(parent: nil, tls_route_id: nil, tls_route: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_tls_route 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 resource of the TlsRoute. Must be in the format projects/*/locations/*.

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

      Required. Short name of the TlsRoute resource to be created.

    • tls_route (::Google::Cloud::NetworkServices::V1::TlsRoute, ::Hash) (defaults to: nil)

      Required. TlsRoute resource to be created.

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.



3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 3513

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateTlsRouteRequest

  # 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_tls_route..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::NetworkServices::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_tls_route.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_tls_route.retry_policy

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

  @network_services_stub.create_tls_route 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_wasm_plugin(request, options = nil) ⇒ ::Gapic::Operation #create_wasm_plugin(parent: nil, wasm_plugin_id: nil, wasm_plugin: nil) ⇒ ::Gapic::Operation

Creates a new WasmPlugin resource in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the create_wasm_plugin method.
result = client.create_wasm_plugin 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_wasm_plugin(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest, ::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_wasm_plugin(parent: nil, wasm_plugin_id: nil, wasm_plugin: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_wasm_plugin 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 resource of the WasmPlugin resource. Must be in the format projects/{project}/locations/global.

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

      Required. User-provided ID of the WasmPlugin resource to be created.

    • wasm_plugin (::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash) (defaults to: nil)

      Required. WasmPlugin resource to be created.

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.



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
1307
1308
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 1273

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest

  # 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_wasm_plugin..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::NetworkServices::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_wasm_plugin.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_wasm_plugin.retry_policy

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

  @network_services_stub.create_wasm_plugin 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_wasm_plugin_version(request, options = nil) ⇒ ::Gapic::Operation #create_wasm_plugin_version(parent: nil, wasm_plugin_version_id: nil, wasm_plugin_version: nil) ⇒ ::Gapic::Operation

Creates a new WasmPluginVersion resource in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

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

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest, ::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_wasm_plugin_version(parent: nil, wasm_plugin_version_id: nil, wasm_plugin_version: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_wasm_plugin_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 parent resource of the WasmPluginVersion resource. Must be in the format projects/{project}/locations/global/wasmPlugins/{wasm_plugin}.

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

      Required. User-provided ID of the WasmPluginVersion resource to be created.

    • wasm_plugin_version (::Google::Cloud::NetworkServices::V1::WasmPluginVersion, ::Hash) (defaults to: nil)

      Required. WasmPluginVersion resource to be created.

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.



913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 913

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest

  # 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_wasm_plugin_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::NetworkServices::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_wasm_plugin_version.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_wasm_plugin_version.retry_policy

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

  @network_services_stub.create_wasm_plugin_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

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

Deletes a single AgentGateway.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the delete_agent_gateway method.
result = client.delete_agent_gateway 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_agent_gateway(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest, ::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_gateway(name: nil, etag: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_agent_gateway 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. A name of the AgentGateway to delete. Must be in the format projects/*/locations/*/agentGateways/*.

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

      Optional. The etag of the AgentGateway 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.



5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 5824

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteAgentGatewayRequest

  # 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_gateway..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::NetworkServices::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_gateway.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_agent_gateway.retry_policy

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

  @network_services_stub.delete_agent_gateway 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_endpoint_policy(request, options = nil) ⇒ ::Gapic::Operation #delete_endpoint_policy(name: nil) ⇒ ::Gapic::Operation

Deletes a single EndpointPolicy.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the delete_endpoint_policy method.
result = client.delete_endpoint_policy 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_endpoint_policy(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest, ::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_endpoint_policy(name: nil) ⇒ ::Gapic::Operation

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

    Parameters:

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

      Required. A name of the EndpointPolicy to delete. Must be in the format projects/*/locations/*/endpointPolicies/*.

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.



641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 641

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteEndpointPolicyRequest

  # 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_endpoint_policy..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::NetworkServices::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_endpoint_policy.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_endpoint_policy.retry_policy

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

  @network_services_stub.delete_endpoint_policy 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_gateway(request, options = nil) ⇒ ::Gapic::Operation #delete_gateway(name: nil) ⇒ ::Gapic::Operation

Deletes a single Gateway.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the delete_gateway method.
result = client.delete_gateway 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_gateway(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest, ::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_gateway(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_gateway 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. A name of the Gateway to delete. Must be in the format projects/*/locations/*/gateways/*.

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.



1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 1902

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteGatewayRequest

  # 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_gateway..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::NetworkServices::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_gateway.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_gateway.retry_policy

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

  @network_services_stub.delete_gateway 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_grpc_route(request, options = nil) ⇒ ::Gapic::Operation #delete_grpc_route(name: nil) ⇒ ::Gapic::Operation

Deletes a single GrpcRoute.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the delete_grpc_route method.
result = client.delete_grpc_route 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_grpc_route(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest, ::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_grpc_route(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_grpc_route 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. A name of the GrpcRoute to delete. Must be in the format projects/*/locations/*/grpcRoutes/*.

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.



2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 2349

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteGrpcRouteRequest

  # 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_grpc_route..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::NetworkServices::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_grpc_route.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_grpc_route.retry_policy

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

  @network_services_stub.delete_grpc_route 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_http_route(request, options = nil) ⇒ ::Gapic::Operation #delete_http_route(name: nil) ⇒ ::Gapic::Operation

Deletes a single HttpRoute.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the delete_http_route method.
result = client.delete_http_route 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_http_route(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest, ::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_http_route(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_http_route 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. A name of the HttpRoute to delete. Must be in the format projects/*/locations/*/httpRoutes/*.

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.



2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 2800

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteHttpRouteRequest

  # 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_http_route..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::NetworkServices::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_http_route.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_http_route.retry_policy

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

  @network_services_stub.delete_http_route 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_mesh(request, options = nil) ⇒ ::Gapic::Operation #delete_mesh(name: nil) ⇒ ::Gapic::Operation

Deletes a single Mesh.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the delete_mesh method.
result = client.delete_mesh 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_mesh(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::DeleteMeshRequest, ::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_mesh(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_mesh 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. A name of the Mesh to delete. Must be in the format projects/*/locations/*/meshes/*.

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.



4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 4584

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteMeshRequest

  # 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_mesh..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::NetworkServices::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_mesh.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_mesh.retry_policy

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

  @network_services_stub.delete_mesh 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_service_binding(request, options = nil) ⇒ ::Gapic::Operation #delete_service_binding(name: nil) ⇒ ::Gapic::Operation

Deletes a single ServiceBinding.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the delete_service_binding method.
result = client.delete_service_binding 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_service_binding(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest, ::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_service_binding(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_service_binding 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. A name of the ServiceBinding to delete. Must be in the format projects/*/locations/*/serviceBindings/*.

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.



4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 4137

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteServiceBindingRequest

  # 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_service_binding..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::NetworkServices::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_service_binding.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_service_binding.retry_policy

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

  @network_services_stub.delete_service_binding 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_service_lb_policy(request, options = nil) ⇒ ::Gapic::Operation #delete_service_lb_policy(name: nil) ⇒ ::Gapic::Operation

Deletes a single ServiceLbPolicy.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the delete_service_lb_policy method.
result = client.delete_service_lb_policy 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_service_lb_policy(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest, ::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_service_lb_policy(name: nil) ⇒ ::Gapic::Operation

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

    Parameters:

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

      Required. A name of the ServiceLbPolicy to delete. Must be in the format projects/{project}/locations/{location}/serviceLbPolicies/*.

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.



5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 5031

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteServiceLbPolicyRequest

  # 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_service_lb_policy..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::NetworkServices::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_service_lb_policy.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_service_lb_policy.retry_policy

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

  @network_services_stub.delete_service_lb_policy 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_tcp_route(request, options = nil) ⇒ ::Gapic::Operation #delete_tcp_route(name: nil) ⇒ ::Gapic::Operation

Deletes a single TcpRoute.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the delete_tcp_route method.
result = client.delete_tcp_route 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_tcp_route(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest, ::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_tcp_route(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_tcp_route 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. A name of the TcpRoute to delete. Must be in the format projects/*/locations/*/tcpRoutes/*.

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.



3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 3247

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteTcpRouteRequest

  # 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_tcp_route..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::NetworkServices::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_tcp_route.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_tcp_route.retry_policy

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

  @network_services_stub.delete_tcp_route 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_tls_route(request, options = nil) ⇒ ::Gapic::Operation #delete_tls_route(name: nil) ⇒ ::Gapic::Operation

Deletes a single TlsRoute.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the delete_tls_route method.
result = client.delete_tls_route 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_tls_route(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest, ::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_tls_route(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_tls_route 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. A name of the TlsRoute to delete. Must be in the format projects/*/locations/*/tlsRoutes/*.

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.



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
3725
3726
3727
3728
3729
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 3694

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteTlsRouteRequest

  # 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_tls_route..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::NetworkServices::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_tls_route.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_tls_route.retry_policy

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

  @network_services_stub.delete_tls_route 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_wasm_plugin(request, options = nil) ⇒ ::Gapic::Operation #delete_wasm_plugin(name: nil) ⇒ ::Gapic::Operation

Deletes the specified WasmPlugin resource.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the delete_wasm_plugin method.
result = client.delete_wasm_plugin 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_wasm_plugin(request, options = nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest, ::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_wasm_plugin(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_wasm_plugin 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. A name of the WasmPlugin resource to delete. Must be in the format projects/{project}/locations/global/wasmPlugins/{wasm_plugin}.

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.



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
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 1459

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest

  # 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_wasm_plugin..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::NetworkServices::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_wasm_plugin.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_wasm_plugin.retry_policy

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

  @network_services_stub.delete_wasm_plugin 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_wasm_plugin_version(request, options = nil) ⇒ ::Gapic::Operation #delete_wasm_plugin_version(name: nil) ⇒ ::Gapic::Operation

Deletes the specified WasmPluginVersion resource.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

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

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest, ::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_wasm_plugin_version(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_wasm_plugin_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. A name of the WasmPluginVersion resource to delete. Must be in the format projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_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.



1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 1002

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest

  # 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_wasm_plugin_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::NetworkServices::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_wasm_plugin_version.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_wasm_plugin_version.retry_policy

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

  @network_services_stub.delete_wasm_plugin_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

#get_agent_gateway(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::AgentGateway #get_agent_gateway(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::AgentGateway

Gets details of a single AgentGateway.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

# The returned object is of type Google::Cloud::NetworkServices::V1::AgentGateway.
p result

Overloads:

  • #get_agent_gateway(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::AgentGateway

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest, ::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_gateway(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::AgentGateway

    Pass arguments to get_agent_gateway 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. A name of the AgentGateway to get. Must be in the format projects/*/locations/*/agentGateways/*.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 5551

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetAgentGatewayRequest

  # 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_gateway..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::NetworkServices::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_gateway.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_agent_gateway.retry_policy

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

  @network_services_stub.get_agent_gateway 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_endpoint_policy(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::EndpointPolicy #get_endpoint_policy(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::EndpointPolicy

Gets details of a single EndpointPolicy.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

# The returned object is of type Google::Cloud::NetworkServices::V1::EndpointPolicy.
p result

Overloads:

  • #get_endpoint_policy(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::EndpointPolicy

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest, ::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_endpoint_policy(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::EndpointPolicy

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

    Parameters:

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

      Required. A name of the EndpointPolicy to get. Must be in the format projects/*/locations/*/endpointPolicies/*.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 369

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetEndpointPolicyRequest

  # 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_endpoint_policy..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::NetworkServices::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_endpoint_policy.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_endpoint_policy.retry_policy

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

  @network_services_stub.get_endpoint_policy 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_gateway(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::Gateway #get_gateway(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::Gateway

Gets details of a single Gateway.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

# The returned object is of type Google::Cloud::NetworkServices::V1::Gateway.
p result

Overloads:

  • #get_gateway(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::Gateway

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::GetGatewayRequest, ::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_gateway(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::Gateway

    Pass arguments to get_gateway 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. A name of the Gateway to get. Must be in the format projects/*/locations/*/gateways/*.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 1631

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGatewayRequest

  # 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_gateway..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::NetworkServices::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_gateway.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_gateway.retry_policy

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

  @network_services_stub.get_gateway 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_gateway_route_view(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::GatewayRouteView #get_gateway_route_view(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::GatewayRouteView

Get a single RouteView of a Gateway.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

# The returned object is of type Google::Cloud::NetworkServices::V1::GatewayRouteView.
p result

Overloads:

  • #get_gateway_route_view(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::GatewayRouteView

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest, ::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_gateway_route_view(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::GatewayRouteView

    Pass arguments to get_gateway_route_view 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. Name of the GatewayRouteView resource. Formats: projects/{project}/locations/{location}/gateways/{gateway}/routeViews/{route_view}

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 5113

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGatewayRouteViewRequest

  # 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_gateway_route_view..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::NetworkServices::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_gateway_route_view.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_gateway_route_view.retry_policy

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

  @network_services_stub.get_gateway_route_view 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_grpc_route(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::GrpcRoute #get_grpc_route(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::GrpcRoute

Gets details of a single GrpcRoute.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

# The returned object is of type Google::Cloud::NetworkServices::V1::GrpcRoute.
p result

Overloads:

  • #get_grpc_route(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::GrpcRoute

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest, ::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_grpc_route(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::GrpcRoute

    Pass arguments to get_grpc_route 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. A name of the GrpcRoute to get. Must be in the format projects/*/locations/*/grpcRoutes/*.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 2078

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetGrpcRouteRequest

  # 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_grpc_route..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::NetworkServices::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_grpc_route.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_grpc_route.retry_policy

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

  @network_services_stub.get_grpc_route 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_http_route(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::HttpRoute #get_http_route(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::HttpRoute

Gets details of a single HttpRoute.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

# The returned object is of type Google::Cloud::NetworkServices::V1::HttpRoute.
p result

Overloads:

  • #get_http_route(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::HttpRoute

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest, ::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_http_route(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::HttpRoute

    Pass arguments to get_http_route 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. A name of the HttpRoute to get. Must be in the format projects/*/locations/*/httpRoutes/*.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 2527

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetHttpRouteRequest

  # 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_http_route..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::NetworkServices::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_http_route.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_http_route.retry_policy

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

  @network_services_stub.get_http_route 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_mesh(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::Mesh #get_mesh(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::Mesh

Gets details of a single Mesh.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

# The returned object is of type Google::Cloud::NetworkServices::V1::Mesh.
p result

Overloads:

  • #get_mesh(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::Mesh

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::GetMeshRequest, ::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_mesh(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::Mesh

    Pass arguments to get_mesh 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. A name of the Mesh to get. Must be in the format projects/*/locations/*/meshes/*.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 4313

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetMeshRequest

  # 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_mesh..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::NetworkServices::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_mesh.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_mesh.retry_policy

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

  @network_services_stub.get_mesh 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_mesh_route_view(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::MeshRouteView #get_mesh_route_view(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::MeshRouteView

Get a single RouteView of a Mesh.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

# The returned object is of type Google::Cloud::NetworkServices::V1::MeshRouteView.
p result

Overloads:

  • #get_mesh_route_view(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::MeshRouteView

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest, ::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_mesh_route_view(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::MeshRouteView

    Pass arguments to get_mesh_route_view 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. Name of the MeshRouteView resource. Format: projects/{project}/locations/{location}/meshes/{mesh}/routeViews/{route_view}

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 5193

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetMeshRouteViewRequest

  # 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_mesh_route_view..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::NetworkServices::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_mesh_route_view.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_mesh_route_view.retry_policy

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

  @network_services_stub.get_mesh_route_view 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_service_binding(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::ServiceBinding #get_service_binding(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::ServiceBinding

Gets details of a single ServiceBinding.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

# The returned object is of type Google::Cloud::NetworkServices::V1::ServiceBinding.
p result

Overloads:

  • #get_service_binding(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::ServiceBinding

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest, ::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_service_binding(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::ServiceBinding

    Pass arguments to get_service_binding 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. A name of the ServiceBinding to get. Must be in the format projects/*/locations/*/serviceBindings/*.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 3866

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetServiceBindingRequest

  # 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_service_binding..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::NetworkServices::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_service_binding.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_service_binding.retry_policy

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

  @network_services_stub.get_service_binding 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_service_lb_policy(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy #get_service_lb_policy(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy

Gets details of a single ServiceLbPolicy.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

# The returned object is of type Google::Cloud::NetworkServices::V1::ServiceLbPolicy.
p result

Overloads:

  • #get_service_lb_policy(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest, ::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_service_lb_policy(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::ServiceLbPolicy

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

    Parameters:

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

      Required. A name of the ServiceLbPolicy to get. Must be in the format projects/{project}/locations/{location}/serviceLbPolicies/*.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 4757

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetServiceLbPolicyRequest

  # 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_service_lb_policy..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::NetworkServices::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_service_lb_policy.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_service_lb_policy.retry_policy

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

  @network_services_stub.get_service_lb_policy 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_tcp_route(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::TcpRoute #get_tcp_route(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::TcpRoute

Gets details of a single TcpRoute.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

# The returned object is of type Google::Cloud::NetworkServices::V1::TcpRoute.
p result

Overloads:

  • #get_tcp_route(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::TcpRoute

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest, ::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_tcp_route(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::TcpRoute

    Pass arguments to get_tcp_route 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. A name of the TcpRoute to get. Must be in the format projects/*/locations/*/tcpRoutes/*.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 2976

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetTcpRouteRequest

  # 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_tcp_route..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::NetworkServices::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_tcp_route.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_tcp_route.retry_policy

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

  @network_services_stub.get_tcp_route 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_tls_route(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::TlsRoute #get_tls_route(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::TlsRoute

Gets details of a single TlsRoute.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

# The returned object is of type Google::Cloud::NetworkServices::V1::TlsRoute.
p result

Overloads:

  • #get_tls_route(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::TlsRoute

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest, ::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_tls_route(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::TlsRoute

    Pass arguments to get_tls_route 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. A name of the TlsRoute to get. Must be in the format projects/*/locations/*/tlsRoutes/*.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 3423

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetTlsRouteRequest

  # 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_tls_route..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::NetworkServices::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_tls_route.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_tls_route.retry_policy

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

  @network_services_stub.get_tls_route 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_wasm_plugin(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::WasmPlugin #get_wasm_plugin(name: nil, view: nil) ⇒ ::Google::Cloud::NetworkServices::V1::WasmPlugin

Gets details of the specified WasmPlugin resource.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

# The returned object is of type Google::Cloud::NetworkServices::V1::WasmPlugin.
p result

Overloads:

  • #get_wasm_plugin(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::WasmPlugin

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest, ::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_wasm_plugin(name: nil, view: nil) ⇒ ::Google::Cloud::NetworkServices::V1::WasmPlugin

    Pass arguments to get_wasm_plugin 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. A name of the WasmPlugin resource to get. Must be in the format projects/{project}/locations/global/wasmPlugins/{wasm_plugin}.

    • view (::Google::Cloud::NetworkServices::V1::WasmPluginView) (defaults to: nil)

      Determines how much data must be returned in the response. See AIP-157.

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/network_services/v1/network_services/rest/client.rb', line 1182

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest

  # 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_wasm_plugin..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::NetworkServices::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_wasm_plugin.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_wasm_plugin.retry_policy

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

  @network_services_stub.get_wasm_plugin 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_wasm_plugin_version(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::WasmPluginVersion #get_wasm_plugin_version(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::WasmPluginVersion

Gets details of the specified WasmPluginVersion resource.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

# The returned object is of type Google::Cloud::NetworkServices::V1::WasmPluginVersion.
p result

Overloads:

  • #get_wasm_plugin_version(request, options = nil) ⇒ ::Google::Cloud::NetworkServices::V1::WasmPluginVersion

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest, ::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_wasm_plugin_version(name: nil) ⇒ ::Google::Cloud::NetworkServices::V1::WasmPluginVersion

    Pass arguments to get_wasm_plugin_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. A name of the WasmPluginVersion resource to get. Must be in the format projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 820

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest

  # 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_wasm_plugin_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::NetworkServices::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_wasm_plugin_version.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_wasm_plugin_version.retry_policy

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

  @network_services_stub.get_wasm_plugin_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

#list_agent_gateways(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway> #list_agent_gateways(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>

Lists AgentGateways in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the list_agent_gateways method.
result = client.list_agent_gateways 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::NetworkServices::V1::AgentGateway.
  p item
end

Overloads:

  • #list_agent_gateways(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest, ::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_agent_gateways(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::AgentGateway>

    Pass arguments to list_agent_gateways 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 project and location from which the AgentGateways should be listed, specified in the format projects/*/locations/*.

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

      Optional. Maximum number of AgentGateways to return per call.

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

      Optional. The value returned by the last ListAgentGatewaysResponse Indicates that this is a continuation of a prior ListAgentGateways call, and that the system should return the next page of data.

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

      Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 5470

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListAgentGatewaysRequest

  # 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_agent_gateways..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::NetworkServices::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_agent_gateways.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_agent_gateways.retry_policy

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

  @network_services_stub.list_agent_gateways request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_agent_gateways, "agent_gateways", 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_endpoint_policies(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::EndpointPolicy> #list_endpoint_policies(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::EndpointPolicy>

Lists EndpointPolicies in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the list_endpoint_policies method.
result = client.list_endpoint_policies 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::NetworkServices::V1::EndpointPolicy.
  p item
end

Overloads:

  • #list_endpoint_policies(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::EndpointPolicy>

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest, ::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_endpoint_policies(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::EndpointPolicy>

    Pass arguments to list_endpoint_policies 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 project and location from which the EndpointPolicies should be listed, specified in the format projects/*/locations/*.

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

      Maximum number of EndpointPolicies to return per call.

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

      The value returned by the last ListEndpointPoliciesResponse Indicates that this is a continuation of a prior ListEndpointPolicies call, and that the system should return the next page of data.

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

      Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



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
313
314
315
316
317
318
319
320
321
322
323
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 288

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListEndpointPoliciesRequest

  # 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_endpoint_policies..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::NetworkServices::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_endpoint_policies.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_endpoint_policies.retry_policy

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

  @network_services_stub.list_endpoint_policies request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_endpoint_policies, "endpoint_policies", 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_gateway_route_views(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView> #list_gateway_route_views(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>

Lists RouteViews

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the list_gateway_route_views method.
result = client.list_gateway_route_views 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::NetworkServices::V1::GatewayRouteView.
  p item
end

Overloads:

  • #list_gateway_route_views(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest, ::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_gateway_route_views(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GatewayRouteView>

    Pass arguments to list_gateway_route_views 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 Gateway to which a Route is associated. Formats: projects/{project}/locations/{location}/gateways/{gateway}

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

      Maximum number of GatewayRouteViews to return per call.

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

      The value returned by the last ListGatewayRouteViewsResponse Indicates that this is a continuation of a prior ListGatewayRouteViews call, and that the system should return the next page of data.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 5283

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGatewayRouteViewsRequest

  # 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_gateway_route_views..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::NetworkServices::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_gateway_route_views.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_gateway_route_views.retry_policy

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

  @network_services_stub.list_gateway_route_views request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_gateway_route_views, "gateway_route_views", 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_gateways(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Gateway> #list_gateways(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Gateway>

Lists Gateways in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the list_gateways method.
result = client.list_gateways 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::NetworkServices::V1::Gateway.
  p item
end

Overloads:

  • #list_gateways(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Gateway>

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::ListGatewaysRequest, ::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_gateways(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Gateway>

    Pass arguments to list_gateways 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 project and location from which the Gateways should be listed, specified in the format projects/*/locations/*.

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

      Maximum number of Gateways to return per call.

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

      The value returned by the last ListGatewaysResponse Indicates that this is a continuation of a prior ListGateways call, and that the system should return the next page of data.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 1550

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGatewaysRequest

  # 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_gateways..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::NetworkServices::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_gateways.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_gateways.retry_policy

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

  @network_services_stub.list_gateways request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_gateways, "gateways", 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_grpc_routes(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GrpcRoute> #list_grpc_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GrpcRoute>

Lists GrpcRoutes in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the list_grpc_routes method.
result = client.list_grpc_routes 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::NetworkServices::V1::GrpcRoute.
  p item
end

Overloads:

  • #list_grpc_routes(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GrpcRoute>

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest, ::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_grpc_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::GrpcRoute>

    Pass arguments to list_grpc_routes 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 project and location from which the GrpcRoutes should be listed, specified in the format projects/*/locations/*.

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

      Maximum number of GrpcRoutes to return per call.

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

      The value returned by the last ListGrpcRoutesResponse Indicates that this is a continuation of a prior ListGrpcRoutes call, and that the system should return the next page of data.

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

      Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 1997

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListGrpcRoutesRequest

  # 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_grpc_routes..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::NetworkServices::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_grpc_routes.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_grpc_routes.retry_policy

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

  @network_services_stub.list_grpc_routes request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_grpc_routes, "grpc_routes", 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_http_routes(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute> #list_http_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>

Lists HttpRoute in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the list_http_routes method.
result = client.list_http_routes 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::NetworkServices::V1::HttpRoute.
  p item
end

Overloads:

  • #list_http_routes(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest, ::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_http_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil, filter: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::HttpRoute>

    Pass arguments to list_http_routes 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 project and location from which the HttpRoutes should be listed, specified in the format projects/*/locations/*.

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

      Maximum number of HttpRoutes to return per call.

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

      The value returned by the last ListHttpRoutesResponse Indicates that this is a continuation of a prior ListHttpRoutes call, and that the system should return the next page of data.

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

      Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.

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

      Optional. Filter expression to restrict the list.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 2446

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListHttpRoutesRequest

  # 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_http_routes..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::NetworkServices::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_http_routes.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_http_routes.retry_policy

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

  @network_services_stub.list_http_routes request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_http_routes, "http_routes", 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_mesh_route_views(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView> #list_mesh_route_views(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>

Lists RouteViews

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the list_mesh_route_views method.
result = client.list_mesh_route_views 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::NetworkServices::V1::MeshRouteView.
  p item
end

Overloads:

  • #list_mesh_route_views(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest, ::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_mesh_route_views(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::MeshRouteView>

    Pass arguments to list_mesh_route_views 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 Mesh to which a Route is associated. Format: projects/{project}/locations/{location}/meshes/{mesh}

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

      Maximum number of MeshRouteViews to return per call.

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

      The value returned by the last ListMeshRouteViewsResponse Indicates that this is a continuation of a prior ListMeshRouteViews call, and that the system should return the next page of data.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 5375

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListMeshRouteViewsRequest

  # 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_mesh_route_views..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::NetworkServices::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_mesh_route_views.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_mesh_route_views.retry_policy

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

  @network_services_stub.list_mesh_route_views request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_mesh_route_views, "mesh_route_views", 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_meshes(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Mesh> #list_meshes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Mesh>

Lists Meshes in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the list_meshes method.
result = client.list_meshes 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::NetworkServices::V1::Mesh.
  p item
end

Overloads:

  • #list_meshes(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Mesh>

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::ListMeshesRequest, ::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_meshes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::Mesh>

    Pass arguments to list_meshes 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 project and location from which the Meshes should be listed, specified in the format projects/*/locations/*.

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

      Maximum number of Meshes to return per call.

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

      The value returned by the last ListMeshesResponse Indicates that this is a continuation of a prior ListMeshes call, and that the system should return the next page of data.

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

      Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 4232

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListMeshesRequest

  # 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_meshes..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::NetworkServices::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_meshes.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_meshes.retry_policy

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

  @network_services_stub.list_meshes request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_meshes, "meshes", 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_service_bindings(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceBinding> #list_service_bindings(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceBinding>

Lists ServiceBinding in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the list_service_bindings method.
result = client.list_service_bindings 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::NetworkServices::V1::ServiceBinding.
  p item
end

Overloads:

  • #list_service_bindings(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceBinding>

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest, ::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_service_bindings(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceBinding>

    Pass arguments to list_service_bindings 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 project and location from which the ServiceBindings should be listed, specified in the format projects/*/locations/*.

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

      Maximum number of ServiceBindings to return per call.

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

      The value returned by the last ListServiceBindingsResponse Indicates that this is a continuation of a prior ListRouters call, and that the system should return the next page of data.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



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
3816
3817
3818
3819
3820
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 3785

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListServiceBindingsRequest

  # 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_service_bindings..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::NetworkServices::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_service_bindings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_service_bindings.retry_policy

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

  @network_services_stub.list_service_bindings request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_service_bindings, "service_bindings", 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_service_lb_policies(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy> #list_service_lb_policies(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>

Lists ServiceLbPolicies in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the list_service_lb_policies method.
result = client.list_service_lb_policies 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::NetworkServices::V1::ServiceLbPolicy.
  p item
end

Overloads:

  • #list_service_lb_policies(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest, ::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_service_lb_policies(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::ServiceLbPolicy>

    Pass arguments to list_service_lb_policies 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 project and location from which the ServiceLbPolicies should be listed, specified in the format projects/{project}/locations/{location}.

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

      Maximum number of ServiceLbPolicies to return per call.

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

      The value returned by the last ListServiceLbPoliciesResponse Indicates that this is a continuation of a prior ListRouters call, and that the system should return the next page of data.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 4676

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListServiceLbPoliciesRequest

  # 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_service_lb_policies..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::NetworkServices::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_service_lb_policies.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_service_lb_policies.retry_policy

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

  @network_services_stub.list_service_lb_policies request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_service_lb_policies, "service_lb_policies", 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_tcp_routes(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TcpRoute> #list_tcp_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TcpRoute>

Lists TcpRoute in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the list_tcp_routes method.
result = client.list_tcp_routes 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::NetworkServices::V1::TcpRoute.
  p item
end

Overloads:

  • #list_tcp_routes(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TcpRoute>

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest, ::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_tcp_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TcpRoute>

    Pass arguments to list_tcp_routes 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 project and location from which the TcpRoutes should be listed, specified in the format projects/*/locations/*.

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

      Maximum number of TcpRoutes to return per call.

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

      The value returned by the last ListTcpRoutesResponse Indicates that this is a continuation of a prior ListTcpRoutes call, and that the system should return the next page of data.

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

      Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 2895

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListTcpRoutesRequest

  # 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_tcp_routes..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::NetworkServices::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_tcp_routes.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_tcp_routes.retry_policy

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

  @network_services_stub.list_tcp_routes request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_tcp_routes, "tcp_routes", 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_tls_routes(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TlsRoute> #list_tls_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TlsRoute>

Lists TlsRoute in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the list_tls_routes method.
result = client.list_tls_routes 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::NetworkServices::V1::TlsRoute.
  p item
end

Overloads:

  • #list_tls_routes(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TlsRoute>

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest, ::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_tls_routes(parent: nil, page_size: nil, page_token: nil, return_partial_success: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::TlsRoute>

    Pass arguments to list_tls_routes 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 project and location from which the TlsRoutes should be listed, specified in the format projects/*/locations/*.

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

      Maximum number of TlsRoutes to return per call.

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

      The value returned by the last ListTlsRoutesResponse Indicates that this is a continuation of a prior ListTlsRoutes call, and that the system should return the next page of data.

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

      Optional. If true, allow partial responses for multi-regional Aggregated List requests. Otherwise if one of the locations is down or unreachable, the Aggregated List request will fail.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

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

    if the REST call is aborted.



3342
3343
3344
3345
3346
3347
3348
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
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 3342

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListTlsRoutesRequest

  # 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_tls_routes..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::NetworkServices::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_tls_routes.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_tls_routes.retry_policy

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

  @network_services_stub.list_tls_routes request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_tls_routes, "tls_routes", 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_wasm_plugin_versions(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion> #list_wasm_plugin_versions(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>

Lists WasmPluginVersion resources in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the list_wasm_plugin_versions method.
result = client.list_wasm_plugin_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::NetworkServices::V1::WasmPluginVersion.
  p item
end

Overloads:

  • #list_wasm_plugin_versions(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest, ::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_wasm_plugin_versions(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>

    Pass arguments to list_wasm_plugin_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 WasmPlugin resource whose WasmPluginVersions are listed, specified in the following format: projects/{project}/locations/global/wasmPlugins/{wasm_plugin}.

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

      Maximum number of WasmPluginVersion resources to return per call. If not specified, at most 50 WasmPluginVersion resources are returned. The maximum value is 1000; values above 1000 are coerced to 1000.

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

      The value returned by the last ListWasmPluginVersionsResponse call. Indicates that this is a continuation of a prior ListWasmPluginVersions call, and that the next page of data is to 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.



738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 738

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest

  # 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_wasm_plugin_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::NetworkServices::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_wasm_plugin_versions.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_wasm_plugin_versions.retry_policy

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

  @network_services_stub.list_wasm_plugin_versions request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_wasm_plugin_versions, "wasm_plugin_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_wasm_plugins(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin> #list_wasm_plugins(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>

Lists WasmPlugin resources in a given project and location.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

# Call the list_wasm_plugins method.
result = client.list_wasm_plugins 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::NetworkServices::V1::WasmPlugin.
  p item
end

Overloads:

  • #list_wasm_plugins(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest, ::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_wasm_plugins(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>

    Pass arguments to list_wasm_plugins 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 project and location from which the WasmPlugin resources are listed, specified in the following format: projects/{project}/locations/global.

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

      Maximum number of WasmPlugin resources to return per call. If not specified, at most 50 WasmPlugin resources are returned. The maximum value is 1000; values above 1000 are coerced to 1000.

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

      The value returned by the last ListWasmPluginsResponse call. Indicates that this is a continuation of a prior ListWasmPlugins call, and that the next page of data is to 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.



1098
1099
1100
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
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 1098

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest

  # 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_wasm_plugins..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::NetworkServices::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_wasm_plugins.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_wasm_plugins.retry_policy

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

  @network_services_stub.list_wasm_plugins request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_wasm_plugins, "wasm_plugins", 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)


223
224
225
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 223

def logger
  @network_services_stub.logger
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


110
111
112
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 110

def universe_domain
  @network_services_stub.universe_domain
end

#update_agent_gateway(request, options = nil) ⇒ ::Gapic::Operation #update_agent_gateway(update_mask: nil, agent_gateway: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single AgentGateway.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

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

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest, ::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_gateway(update_mask: nil, agent_gateway: nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to specify the fields to be overwritten in the AgentGateway resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • agent_gateway (::Google::Cloud::NetworkServices::V1::AgentGateway, ::Hash) (defaults to: nil)

      Required. Updated AgentGateway resource.

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.



5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 5734

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateAgentGatewayRequest

  # 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_gateway..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::NetworkServices::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_gateway.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_agent_gateway.retry_policy

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

  @network_services_stub.update_agent_gateway 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

#update_endpoint_policy(request, options = nil) ⇒ ::Gapic::Operation #update_endpoint_policy(update_mask: nil, endpoint_policy: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single EndpointPolicy.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

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

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest, ::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_endpoint_policy(update_mask: nil, endpoint_policy: nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to specify the fields to be overwritten in the EndpointPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • endpoint_policy (::Google::Cloud::NetworkServices::V1::EndpointPolicy, ::Hash) (defaults to: nil)

      Required. Updated EndpointPolicy resource.

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.



553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 553

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateEndpointPolicyRequest

  # 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_endpoint_policy..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::NetworkServices::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_endpoint_policy.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_endpoint_policy.retry_policy

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

  @network_services_stub.update_endpoint_policy 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

#update_gateway(request, options = nil) ⇒ ::Gapic::Operation #update_gateway(update_mask: nil, gateway: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single Gateway.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

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

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest, ::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_gateway(update_mask: nil, gateway: nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to specify the fields to be overwritten in the Gateway resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • gateway (::Google::Cloud::NetworkServices::V1::Gateway, ::Hash) (defaults to: nil)

      Required. Updated Gateway resource.

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.



1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 1814

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateGatewayRequest

  # 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_gateway..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::NetworkServices::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_gateway.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_gateway.retry_policy

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

  @network_services_stub.update_gateway 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

#update_grpc_route(request, options = nil) ⇒ ::Gapic::Operation #update_grpc_route(update_mask: nil, grpc_route: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single GrpcRoute.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

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

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest, ::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_grpc_route(update_mask: nil, grpc_route: nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to specify the fields to be overwritten in the GrpcRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • grpc_route (::Google::Cloud::NetworkServices::V1::GrpcRoute, ::Hash) (defaults to: nil)

      Required. Updated GrpcRoute resource.

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.



2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 2261

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateGrpcRouteRequest

  # 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_grpc_route..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::NetworkServices::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_grpc_route.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_grpc_route.retry_policy

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

  @network_services_stub.update_grpc_route 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

#update_http_route(request, options = nil) ⇒ ::Gapic::Operation #update_http_route(update_mask: nil, http_route: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single HttpRoute.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

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

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest, ::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_http_route(update_mask: nil, http_route: nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to specify the fields to be overwritten in the HttpRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • http_route (::Google::Cloud::NetworkServices::V1::HttpRoute, ::Hash) (defaults to: nil)

      Required. Updated HttpRoute resource.

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.



2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 2712

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateHttpRouteRequest

  # 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_http_route..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::NetworkServices::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_http_route.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_http_route.retry_policy

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

  @network_services_stub.update_http_route 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

#update_mesh(request, options = nil) ⇒ ::Gapic::Operation #update_mesh(update_mask: nil, mesh: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single Mesh.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

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

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::UpdateMeshRequest, ::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_mesh(update_mask: nil, mesh: nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to specify the fields to be overwritten in the Mesh resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • mesh (::Google::Cloud::NetworkServices::V1::Mesh, ::Hash) (defaults to: nil)

      Required. Updated Mesh resource.

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.



4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 4496

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateMeshRequest

  # 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_mesh..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::NetworkServices::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_mesh.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_mesh.retry_policy

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

  @network_services_stub.update_mesh 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

#update_service_binding(request, options = nil) ⇒ ::Gapic::Operation #update_service_binding(update_mask: nil, service_binding: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single ServiceBinding.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

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

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest, ::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_service_binding(update_mask: nil, service_binding: nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to specify the fields to be overwritten in the ServiceBinding resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • service_binding (::Google::Cloud::NetworkServices::V1::ServiceBinding, ::Hash) (defaults to: nil)

      Required. Updated ServiceBinding resource.

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.



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
4077
4078
4079
4080
4081
4082
4083
4084
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 4049

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceBindingRequest

  # 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_service_binding..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::NetworkServices::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_service_binding.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_service_binding.retry_policy

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

  @network_services_stub.update_service_binding 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

#update_service_lb_policy(request, options = nil) ⇒ ::Gapic::Operation #update_service_lb_policy(update_mask: nil, service_lb_policy: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single ServiceLbPolicy.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

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

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest, ::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_service_lb_policy(update_mask: nil, service_lb_policy: nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to specify the fields to be overwritten in the ServiceLbPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • service_lb_policy (::Google::Cloud::NetworkServices::V1::ServiceLbPolicy, ::Hash) (defaults to: nil)

      Required. Updated ServiceLbPolicy resource.

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.



4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 4943

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateServiceLbPolicyRequest

  # 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_service_lb_policy..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::NetworkServices::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_service_lb_policy.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_service_lb_policy.retry_policy

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

  @network_services_stub.update_service_lb_policy 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

#update_tcp_route(request, options = nil) ⇒ ::Gapic::Operation #update_tcp_route(update_mask: nil, tcp_route: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single TcpRoute.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

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

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest, ::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_tcp_route(update_mask: nil, tcp_route: nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to specify the fields to be overwritten in the TcpRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • tcp_route (::Google::Cloud::NetworkServices::V1::TcpRoute, ::Hash) (defaults to: nil)

      Required. Updated TcpRoute resource.

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.



3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 3159

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateTcpRouteRequest

  # 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_tcp_route..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::NetworkServices::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_tcp_route.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_tcp_route.retry_policy

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

  @network_services_stub.update_tcp_route 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

#update_tls_route(request, options = nil) ⇒ ::Gapic::Operation #update_tls_route(update_mask: nil, tls_route: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single TlsRoute.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

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

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest, ::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_tls_route(update_mask: nil, tls_route: nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to specify the fields to be overwritten in the TlsRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • tls_route (::Google::Cloud::NetworkServices::V1::TlsRoute, ::Hash) (defaults to: nil)

      Required. Updated TlsRoute resource.

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.



3606
3607
3608
3609
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
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 3606

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateTlsRouteRequest

  # 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_tls_route..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::NetworkServices::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_tls_route.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_tls_route.retry_policy

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

  @network_services_stub.update_tls_route 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

#update_wasm_plugin(request, options = nil) ⇒ ::Gapic::Operation #update_wasm_plugin(update_mask: nil, wasm_plugin: nil) ⇒ ::Gapic::Operation

Updates the parameters of the specified WasmPlugin resource.

Examples:

Basic example

require "google/cloud/network_services/v1"

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

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

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

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

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

    Parameters:

    • request (::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest, ::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_wasm_plugin(update_mask: nil, wasm_plugin: nil) ⇒ ::Gapic::Operation

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

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Used to specify the fields to be overwritten in the WasmPlugin resource by the update. The fields specified in the update_mask field are relative to the resource, not the full request. An omitted update_mask field is treated as an implied update_mask field equivalent to all fields that are populated (that have a non-empty value). The update_mask field supports a special value *, which means that each field in the given WasmPlugin resource (including the empty ones) replaces the current value.

    • wasm_plugin (::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash) (defaults to: nil)

      Required. Updated WasmPlugin resource.

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.



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
1406
# File 'lib/google/cloud/network_services/v1/network_services/rest/client.rb', line 1371

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

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest

  # 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_wasm_plugin..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::NetworkServices::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_wasm_plugin.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_wasm_plugin.retry_policy

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

  @network_services_stub.update_wasm_plugin 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