1.2.0 (latest) 1.1.0 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::ApiHubCurate::Rest::Client.

REST client for the ApiHubCurate service.


<br />

This service is used for managing curations for processing API data consumed
from collect layer.

## Inherits

- Object

## Includes

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

## Methods

### .configure

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

Configure the ApiHubCurate Client class.


<br />

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

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

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

### #configure

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

Configure the ApiHubCurate 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-ApiHubCurate-Rest-Client#Google__Cloud__ApiHub__V1__ApiHubCurate__Rest__Client_configure_class_ "Google::Cloud::ApiHub::V1::ApiHubCurate::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-ApiHubCurate-Rest-Client-Configuration "Google::Cloud::ApiHub::V1::ApiHubCurate::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-ApiHubCurate-Rest-Client-Configuration))
**Returns**

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

### #create_curation

    def create_curation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Curation
    def create_curation(parent: nil, curation_id: nil, curation: nil) -> ::Google::Cloud::ApiHub::V1::Curation

Create a curation resource in the API hub.
Once a curation resource is created, plugin instances can start using it.
**Overloads**

    def create_curation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Curation

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

- **request** ([::Google::Cloud::ApiHub::V1::CreateCurationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-CreateCurationRequest), ::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_curation(parent: nil, curation_id: nil, curation: nil) -> ::Google::Cloud::ApiHub::V1::Curation

Pass arguments to `create_curation` 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 resource for the curation resource. Format: `projects/{project}/locations/{location}`
- **curation_id** (::String) --- Optional. The ID to use for the curation resource, which will become the final component of the curations's resource name. This field is optional.


  - If provided, the same will be used. The service will throw an error if the specified ID is already used by another curation resource in the API hub.
  - If not provided, a system generated ID will be used.

  This value should be 4-500 characters, and valid characters
  are /\[a-z\]\[A-Z\]\[0-9\]-_/.
- **curation** ([::Google::Cloud::ApiHub::V1::Curation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Curation), ::Hash) --- Required. The curation resource to create.
**Yields**

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

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

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

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

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

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

### #delete_curation

    def delete_curation(request, options = nil) -> ::Google::Protobuf::Empty
    def delete_curation(name: nil) -> ::Google::Protobuf::Empty

Delete a curation resource in the API hub. A curation can only be deleted
if it's not being used by any plugin instance.
**Overloads**

    def delete_curation(request, options = nil) -> ::Google::Protobuf::Empty

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

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

Pass arguments to `delete_curation` 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 curation resource to delete. Format: `projects/{project}/locations/{location}/curations/{curation}`
**Yields**

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

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

- ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Protobuf-Empty))
**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::ApiHubCurate::Rest::Client.new

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

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

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

### #get_curation

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

Get curation resource details.
**Overloads**

    def get_curation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Curation

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

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

Pass arguments to `get_curation` 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 curation resource to retrieve. Format: `projects/{project}/locations/{location}/curations/{curation}`
**Yields**

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

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

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

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

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

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

### #initialize

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

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

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

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

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

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

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

### #list_curations

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

List curation resources in the API hub.
**Overloads**

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

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

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

Pass arguments to `list_curations` 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 curation resources. Format: `projects/{project}/locations/{location}`
- **filter** (::String) ---

  Optional. An expression that filters the list of curation resources.

  A filter expression consists of a field name, a comparison
  operator, and a value for filtering. The value must be a string. The
  comparison operator must be one of: `<`, `>`, `:` or `=`. Filters are case
  insensitive.

  The following fields in the `curation resource` are eligible for filtering:
  - `create_time` - The time at which the curation was created. The value should be in the (RFC3339)\[https://tools.ietf.org/html/rfc3339\] format. Allowed comparison operators: `>` and `<`.
  - `display_name` - The display name of the curation. Allowed comparison operators: `=`.
  - `state` - The state of the curation. Allowed comparison operators: `=`.

  Expressions are combined with either `AND` logic operator or `OR` logical
  operator but not both of them together i.e. only one of the `AND` or `OR`
  operator can be used throughout the filter string and both the operators
  cannot be used together. No other logical operators are supported. At most
  three filter fields are allowed in the filter string and if provided
  more than that then `INVALID_ARGUMENT` error is returned by the API.

  Here are a few examples:
  - `create_time < \"2021-08-15T14:50:00Z\" AND create_time >
    \"2021-08-10T12:00:00Z\"` - The curation resource was created before *2021-08-15 14:50:00 UTC* and after *2021-08-10 12:00:00 UTC*.
- **page_size** (::Integer) --- Optional. The maximum number of curation resources to return. The service may return fewer than this value. If unspecified, at most 50 curations 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 `ListCurations` call. Provide this to retrieve the subsequent page.


  When paginating, all other parameters (except page_size) provided to
  `ListCurations` 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::Curation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Curation)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::ApiHub::V1::Curation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Curation)\>)
**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::ApiHubCurate::Rest::Client.new

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

# Call the list_curations method.
result = client.list_curations 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::Curation.
  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)

### #update_curation

    def update_curation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Curation
    def update_curation(curation: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::Curation

Update a curation resource in the API hub. The following fields in the
[curation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Curation "Google::Cloud::ApiHub::V1::Curation (class)") can be updated:


- [display_name](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Curation#Google__Cloud__ApiHub__V1__Curation_display_name_instance_ "Google::Cloud::ApiHub::V1::Curation#display_name (method)")
- [description](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Curation#Google__Cloud__ApiHub__V1__Curation_description_instance_ "Google::Cloud::ApiHub::V1::Curation#description (method)")

<br />

The
[update_mask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-UpdateApiRequest#Google__Cloud__ApiHub__V1__UpdateApiRequest_update_mask_instance_ "Google::Cloud::ApiHub::V1::UpdateApiRequest#update_mask (method)")
should be used to specify the fields being updated.
**Overloads**

    def update_curation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Curation

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

- **request** ([::Google::Cloud::ApiHub::V1::UpdateCurationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-UpdateCurationRequest), ::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 update_curation(curation: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::Curation

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

- **curation** ([::Google::Cloud::ApiHub::V1::Curation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Curation), ::Hash) --- Required. The curation resource to update.


  The curation resource's `name` field is used to identify the curation
  resource to update.
  Format: `projects/{project}/locations/{location}/curations/{curation}`
- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Optional. The list of fields to update.
**Yields**

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

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

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

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

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

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