1.2.0 (latest) 1.1.0 1.0.0 0.4.0 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the Cloud Location Finder V1 API class Google::Cloud::LocationFinder::V1::CloudLocationFinder::Rest::Client.

REST client for the CloudLocationFinder service.


<br />

Service describing handlers for resources

## Inherits

- Object

## Includes

- [Google::Cloud::LocationFinder::V1::CloudLocationFinder::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-location_finder-v1/latest/Google-Cloud-LocationFinder-V1-CloudLocationFinder-Paths)

## Methods

### .configure

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

Configure the CloudLocationFinder Client class.


<br />

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

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-location_finder-v1/latest/Google-Cloud-LocationFinder-V1-CloudLocationFinder-Rest-Client-Configuration))
**Example**

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

### #configure

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

Configure the CloudLocationFinder 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-location_finder-v1/latest/Google-Cloud-LocationFinder-V1-CloudLocationFinder-Rest-Client#Google__Cloud__LocationFinder__V1__CloudLocationFinder__Rest__Client_configure_class_ "Google::Cloud::LocationFinder::V1::CloudLocationFinder::Rest::Client.configure (method)").

<br />

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

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-location_finder-v1/latest/Google-Cloud-LocationFinder-V1-CloudLocationFinder-Rest-Client-Configuration))

### #get_cloud_location

    def get_cloud_location(request, options = nil) -> ::Google::Cloud::LocationFinder::V1::CloudLocation
    def get_cloud_location(name: nil) -> ::Google::Cloud::LocationFinder::V1::CloudLocation

Retrieves a resource containing information about a cloud location.
**Overloads**

    def get_cloud_location(request, options = nil) -> ::Google::Cloud::LocationFinder::V1::CloudLocation

Pass arguments to `get_cloud_location` via a request object, either of type GetCloudLocationRequest or an equivalent Hash. **Parameters**

- **request** (::Google::Cloud::LocationFinder::V1::GetCloudLocationRequest, ::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_cloud_location(name: nil) -> ::Google::Cloud::LocationFinder::V1::CloudLocation

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

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Google::Cloud::LocationFinder::V1::CloudLocation)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Google::Cloud::LocationFinder::V1::CloudLocation)
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::LocationFinder::V1::CloudLocation.
p result
```

### #initialize

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

Create a new CloudLocationFinder REST client object.
**Yields**

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

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-location_finder-v1/latest/Google-Cloud-LocationFinder-V1-CloudLocationFinder-Rest-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-location_finder-v1/latest/Google-Cloud-LocationFinder-V1-CloudLocationFinder-Rest-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::LocationFinder::V1::CloudLocationFinder::Rest::Client.new

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

### #list_cloud_locations

    def list_cloud_locations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>
    def list_cloud_locations(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>

Lists cloud locations under a given project and location.
**Overloads**

    def list_cloud_locations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>

Pass arguments to `list_cloud_locations` via a request object, either of type ListCloudLocationsRequest or an equivalent Hash. **Parameters**

- **request** (::Google::Cloud::LocationFinder::V1::ListCloudLocationsRequest, ::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_cloud_locations(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>

Pass arguments to `list_cloud_locations` 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. The parent, which owns this collection of cloud locations. Format: projects/{project}/locations/{location}
- **page_size** (::Integer) --- Optional. The maximum number of cloud locations to return per page. The service might return fewer cloud locations than this value. If unspecified, server will pick an appropriate default.
- **page_token** (::String) --- Optional. A token identifying a page of results the server should return. Provide page token returned by a previous 'ListCloudLocations' call to retrieve the next page of results. When paginating, all other parameters provided to 'ListCloudLocations' must match the call that provided the page token.
- **filter** (::String) --- Optional. A filter expression that filters resources listed in the response. The expression is in the form of field=value. For example, 'cloud_location_type=CLOUD_LOCATION_TYPE_REGION'. Multiple filter queries are space-separated. For example, 'cloud_location_type=CLOUD_LOCATION_TYPE_REGION territory_code="US"' By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Rest::PagedEnumerable\<::Google::Cloud::LocationFinder::V1::CloudLocation\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<::Google::Cloud::LocationFinder::V1::CloudLocation\>)
**Raises**

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

Basic example

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

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

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

# Call the list_cloud_locations method.
result = client.list_cloud_locations 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::LocationFinder::V1::CloudLocation.
  p item
end
```

### #location_client

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

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

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

### #logger

    def logger() -> Logger

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

- (Logger)

### #search_cloud_locations

    def search_cloud_locations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>
    def search_cloud_locations(parent: nil, source_cloud_location: nil, page_size: nil, page_token: nil, query: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>

Searches for cloud locations from a given source location.
**Overloads**

    def search_cloud_locations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>

Pass arguments to `search_cloud_locations` via a request object, either of type SearchCloudLocationsRequest or an equivalent Hash. **Parameters**

- **request** (::Google::Cloud::LocationFinder::V1::SearchCloudLocationsRequest, ::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 search_cloud_locations(parent: nil, source_cloud_location: nil, page_size: nil, page_token: nil, query: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::LocationFinder::V1::CloudLocation>

Pass arguments to `search_cloud_locations` 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. The parent, which owns this collection of cloud locations. Format: projects/{project}/locations/{location}
- **source_cloud_location** (::String) --- Required. The source cloud location to search from. Example search can be searching nearby cloud locations from the source cloud location by latency.
- **page_size** (::Integer) --- Optional. The maximum number of cloud locations to return. The service might return fewer cloud locations than this value. If unspecified, server will pick an appropriate default.
- **page_token** (::String) --- Optional. A token identifying a page of results the server should return. Provide Page token returned by a previous 'ListCloudLocations' call to retrieve the next page of results. When paginating, all other parameters provided to 'ListCloudLocations' must match the call that provided the page token.
- **query** (::String) --- Optional. The query string in search query syntax. While filter is used to filter the search results by attributes, query is used to specify the search requirements.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Rest::PagedEnumerable\<::Google::Cloud::LocationFinder::V1::CloudLocation\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<::Google::Cloud::LocationFinder::V1::CloudLocation\>)
**Raises**

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

Basic example

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

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

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

# Call the search_cloud_locations method.
result = client.search_cloud_locations 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::LocationFinder::V1::CloudLocation.
  p item
end
```

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)