# BeyondCorp ClientGateways V1 API - Class Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client (v0.13.0)

0.13.0 (latest) 0.12.0 0.11.0 0.10.1 0.9.0 0.8.0 0.7.1 0.6.0 0.5.2 0.4.2 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the BeyondCorp ClientGateways V1 API class Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.

Client for the ClientGatewaysService service.

API Overview:

The `beyondcorp.googleapis.com` service implements the Google Cloud
BeyondCorp API.

Data Model:

The ClientGatewaysService exposes the following resources:

- Client Gateways, named as follows: `projects/{project_id}/locations/{location_id}/clientGateways/{client_gateway_id}`.

## Inherits

- Object

## Includes

- [Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest/Google-Cloud-BeyondCorp-ClientGateways-V1-ClientGatewaysService-Paths)

## Methods

### .configure

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

Configure the ClientGatewaysService Client class.


<br />

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

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

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest/Google-Cloud-BeyondCorp-ClientGateways-V1-ClientGatewaysService-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest/Google-Cloud-BeyondCorp-ClientGateways-V1-ClientGatewaysService-Client-Configuration))
**Example**

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

### #configure

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

Configure the ClientGatewaysService Client instance.


The configuration is set to the derived mode, meaning that values can be changed,
but structural changes (adding new fields, etc.) are not allowed. Structural changes
should be made on [Client.configure](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest/Google-Cloud-BeyondCorp-ClientGateways-V1-ClientGatewaysService-Client#Google__Cloud__BeyondCorp__ClientGateways__V1__ClientGatewaysService__Client_configure_class_ "Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.configure (method)").

<br />

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

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

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest/Google-Cloud-BeyondCorp-ClientGateways-V1-ClientGatewaysService-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest/Google-Cloud-BeyondCorp-ClientGateways-V1-ClientGatewaysService-Client-Configuration))

### #create_client_gateway

    def create_client_gateway(request, options = nil) -> ::Gapic::Operation
    def create_client_gateway(parent: nil, client_gateway_id: nil, client_gateway: nil, request_id: nil, validate_only: nil) -> ::Gapic::Operation

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

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

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

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

    def create_client_gateway(parent: nil, client_gateway_id: nil, client_gateway: nil, request_id: nil, validate_only: nil) -> ::Gapic::Operation

Pass arguments to `create_client_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) --- Required. Value for parent.
- **client_gateway_id** (::String) ---

  Optional. User-settable client gateway resource ID.
  - Must start with a letter.
  - Must contain between 4-63 characters from `/[a-z][0-9]-/`.
  - Must end with a number or a letter.
- **client_gateway** ([::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest/Google-Cloud-BeyondCorp-ClientGateways-V1-ClientGateway), ::Hash) --- Required. The resource being created.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


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

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
- **validate_only** (::Boolean) --- Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.
**Yields**

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

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

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

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

Basic example

```ruby
require "google/cloud/beyond_corp/client_gateways/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BeyondCorp::ClientGateways::V1::CreateClientGatewayRequest.new

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

### #delete_client_gateway

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

Deletes a single ClientGateway.
**Overloads**

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

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

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

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

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


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

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
- **validate_only** (::Boolean) --- Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.
**Yields**

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

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

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

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

Basic example

```ruby
require "google/cloud/beyond_corp/client_gateways/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BeyondCorp::ClientGateways::V1::DeleteClientGatewayRequest.new

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

### #get_client_gateway

    def get_client_gateway(request, options = nil) -> ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway
    def get_client_gateway(name: nil) -> ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway

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

    def get_client_gateway(request, options = nil) -> ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway

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

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

    def get_client_gateway(name: nil) -> ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway

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

- **name** (::String) --- Required. Name of the resource
**Yields**

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

- **response** ([::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest/Google-Cloud-BeyondCorp-ClientGateways-V1-ClientGateway))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest/Google-Cloud-BeyondCorp-ClientGateways-V1-ClientGateway))
**Raises**

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

Basic example

```ruby
require "google/cloud/beyond_corp/client_gateways/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BeyondCorp::ClientGateways::V1::GetClientGatewayRequest.new

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

# The returned object is of type Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway.
p result
```

### #iam_policy_client

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

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

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

### #initialize

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

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

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

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest/Google-Cloud-BeyondCorp-ClientGateways-V1-ClientGatewaysService-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest/Google-Cloud-BeyondCorp-ClientGateways-V1-ClientGatewaysService-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Client.new

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

### #list_client_gateways

    def list_client_gateways(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway>
    def list_client_gateways(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway>

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

    def list_client_gateways(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway>

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

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

    def list_client_gateways(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway>

Pass arguments to `list_client_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) --- Required. Parent value for ListClientGatewaysRequest.
- **page_size** (::Integer) --- Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- **page_token** (::String) --- Optional. A token identifying a page of results the server should return.
- **filter** (::String) --- Optional. Filtering results.
- **order_by** (::String) --- Optional. Hint for how to order the results.
**Yields**

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

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

- (::Gapic::PagedEnumerable\<[::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGateway](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest/Google-Cloud-BeyondCorp-ClientGateways-V1-ClientGateway)\>)
**Raises**

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

Basic example

```ruby
require "google/cloud/beyond_corp/client_gateways/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BeyondCorp::ClientGateways::V1::ListClientGatewaysRequest.new

# Call the list_client_gateways method.
result = client.list_client_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::BeyondCorp::ClientGateways::V1::ClientGateway.
  p item
end
```

### #location_client

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

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

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

### #logger

    def logger() -> Logger

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

- (Logger)

### #operations_client

    def operations_client() -> ::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations

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

- ([::Google::Cloud::BeyondCorp::ClientGateways::V1::ClientGatewaysService::Operations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-beyond_corp-client_gateways-v1/latest/Google-Cloud-BeyondCorp-ClientGateways-V1-ClientGatewaysService-Operations))

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)