1.1.0 (latest) 1.0.3 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.1 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the API hub V1 API class Google::Cloud::ApiHub::V1::ApiHubDiscovery::Rest::Client.

REST client for the ApiHubDiscovery service.


<br />

This service exposes methods used to manage DiscoveredApiObservations
and DiscoveredApiOperations.

## Inherits

- Object

## Includes

- [Google::Cloud::ApiHub::V1::ApiHubDiscovery::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ApiHubDiscovery-Paths)

## Methods

### .configure

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

Configure the ApiHubDiscovery Client class.


<br />

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

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

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

### #configure

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

Configure the ApiHubDiscovery 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-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ApiHubDiscovery-Rest-Client#Google__Cloud__ApiHub__V1__ApiHubDiscovery__Rest__Client_configure_class_ "Google::Cloud::ApiHub::V1::ApiHubDiscovery::Rest::Client.configure (method)").

<br />

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

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ApiHubDiscovery-Rest-Client-Configuration))

### #get_discovered_api_observation

    def get_discovered_api_observation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::DiscoveredApiObservation
    def get_discovered_api_observation(name: nil) -> ::Google::Cloud::ApiHub::V1::DiscoveredApiObservation

Gets a DiscoveredAPIObservation in a given project, location and
ApiObservation.
**Overloads**

    def get_discovered_api_observation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::DiscoveredApiObservation

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

- **request** ([::Google::Cloud::ApiHub::V1::GetDiscoveredApiObservationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-GetDiscoveredApiObservationRequest), ::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_discovered_api_observation(name: nil) -> ::Google::Cloud::ApiHub::V1::DiscoveredApiObservation

Pass arguments to `get_discovered_api_observation` 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. The name of the DiscoveredApiObservation to retrieve. Format: projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}
**Yields**

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

- **result** ([::Google::Cloud::ApiHub::V1::DiscoveredApiObservation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-DiscoveredApiObservation))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::ApiHub::V1::DiscoveredApiObservation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-DiscoveredApiObservation))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::ApiHub::V1::DiscoveredApiObservation.
p result
```

### #get_discovered_api_operation

    def get_discovered_api_operation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::DiscoveredApiOperation
    def get_discovered_api_operation(name: nil) -> ::Google::Cloud::ApiHub::V1::DiscoveredApiOperation

Gets a DiscoveredAPIOperation in a given project, location,
ApiObservation and ApiOperation.
**Overloads**

    def get_discovered_api_operation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::DiscoveredApiOperation

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

- **request** ([::Google::Cloud::ApiHub::V1::GetDiscoveredApiOperationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-GetDiscoveredApiOperationRequest), ::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_discovered_api_operation(name: nil) -> ::Google::Cloud::ApiHub::V1::DiscoveredApiOperation

Pass arguments to `get_discovered_api_operation` 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. The name of the DiscoveredApiOperation to retrieve. Format: projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}/discoveredApiOperations/{discovered_api_operation}
**Yields**

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

- **result** ([::Google::Cloud::ApiHub::V1::DiscoveredApiOperation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-DiscoveredApiOperation))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::ApiHub::V1::DiscoveredApiOperation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-DiscoveredApiOperation))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::ApiHub::V1::DiscoveredApiOperation.
p result
```

### #initialize

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

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

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

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

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

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

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

### #list_discovered_api_observations

    def list_discovered_api_observations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiObservation>
    def list_discovered_api_observations(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiObservation>

Lists all the DiscoveredAPIObservations in a given project and location.
**Overloads**

    def list_discovered_api_observations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiObservation>

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

- **request** ([::Google::Cloud::ApiHub::V1::ListDiscoveredApiObservationsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ListDiscoveredApiObservationsRequest), ::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_discovered_api_observations(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiObservation>

Pass arguments to `list_discovered_api_observations` 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 ApiObservations. Format: projects/{project}/locations/{location}
- **page_size** (::Integer) --- Optional. The maximum number of ApiObservations to return. The service may return fewer than this value. If unspecified, at most 10 ApiObservations will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
- **page_token** (::String) --- Optional. A page token, received from a previous `ListApiObservations` call. Provide this to retrieve the subsequent page.


  When paginating, all other parameters provided to
  `ListApiObservations` must match the call that provided the page
  token.
**Yields**

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

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::ApiHub::V1::DiscoveredApiObservation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-DiscoveredApiObservation)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::ApiHub::V1::DiscoveredApiObservation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-DiscoveredApiObservation)\>)
**Raises**

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

Basic example

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

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

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

# Call the list_discovered_api_observations method.
result = client.list_discovered_api_observations 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::ApiHub::V1::DiscoveredApiObservation.
  p item
end
```

### #list_discovered_api_operations

    def list_discovered_api_operations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiOperation>
    def list_discovered_api_operations(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiOperation>

Lists all the DiscoveredAPIOperations in a given project, location and
ApiObservation.
**Overloads**

    def list_discovered_api_operations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiOperation>

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

- **request** ([::Google::Cloud::ApiHub::V1::ListDiscoveredApiOperationsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ListDiscoveredApiOperationsRequest), ::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_discovered_api_operations(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::DiscoveredApiOperation>

Pass arguments to `list_discovered_api_operations` 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 DiscoveredApiOperations. Format: projects/{project}/locations/{location}/discoveredApiObservations/{discovered_api_observation}
- **page_size** (::Integer) --- Optional. DiscoveredApiOperations will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
- **page_token** (::String) --- Optional. A page token, received from a previous `ListDiscoveredApiApiOperations` call. Provide this to retrieve the subsequent page.


  When paginating, all other parameters provided to
  `ListDiscoveredApiApiOperations` must match the call that provided the page
  token.
**Yields**

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

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::ApiHub::V1::DiscoveredApiOperation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-DiscoveredApiOperation)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::ApiHub::V1::DiscoveredApiOperation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-DiscoveredApiOperation)\>)
**Raises**

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

Basic example

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

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

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

# Call the list_discovered_api_operations method.
result = client.list_discovered_api_operations 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::ApiHub::V1::DiscoveredApiOperation.
  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)

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)