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::ApiHub::Rest::Client.

REST client for the ApiHub service.


<br />

This service provides all methods related to the API hub.

## Inherits

- Object

## Includes

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

## Methods

### .configure

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

Configure the ApiHub Client class.


<br />

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

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

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

### #configure

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

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

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

### #create_api

    def create_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Api
    def create_api(parent: nil, api_id: nil, api: nil) -> ::Google::Cloud::ApiHub::V1::Api

Create an API resource in the API hub.
Once an API resource is created, versions can be added to it.
**Overloads**

    def create_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Api

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

- **request** ([::Google::Cloud::ApiHub::V1::CreateApiRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-CreateApiRequest), ::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_api(parent: nil, api_id: nil, api: nil) -> ::Google::Cloud::ApiHub::V1::Api

Pass arguments to `create_api` 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 API resource. Format: `projects/{project}/locations/{location}`
- **api_id** (::String) --- Optional. The ID to use for the API resource, which will become the final component of the API'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 API 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\]-_/.
- **api** ([::Google::Cloud::ApiHub::V1::Api](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Api), ::Hash) --- Required. The API resource to create.
**Yields**

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

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

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

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

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

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

### #create_api_operation

    def create_api_operation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::ApiOperation
    def create_api_operation(parent: nil, api_operation_id: nil, api_operation: nil) -> ::Google::Cloud::ApiHub::V1::ApiOperation

Create an apiOperation in an API version.
An apiOperation can be created only if the version has no apiOperations
which were created by parsing a spec.
**Overloads**

    def create_api_operation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::ApiOperation

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

- **request** ([::Google::Cloud::ApiHub::V1::CreateApiOperationRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-CreateApiOperationRequest), ::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_api_operation(parent: nil, api_operation_id: nil, api_operation: nil) -> ::Google::Cloud::ApiHub::V1::ApiOperation

Pass arguments to `create_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). **Parameters**

- **parent** (::String) --- Required. The parent resource for the operation resource. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
- **api_operation_id** (::String) --- Optional. The ID to use for the operation resource, which will become the final component of the operation'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 operation resource in the API hub.
  - If not provided, a system generated id will be used.

  This value should be 4-500 characters, overall resource name which
  will be of format
  `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`,
  its length is limited to 700 characters, and valid characters are
  /\[a-z\]\[A-Z\]\[0-9\]-_/.
- **api_operation** ([::Google::Cloud::ApiHub::V1::ApiOperation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ApiOperation), ::Hash) --- Required. The operation resource to create.
**Yields**

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

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

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

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

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

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

### #create_attribute

    def create_attribute(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Attribute
    def create_attribute(parent: nil, attribute_id: nil, attribute: nil) -> ::Google::Cloud::ApiHub::V1::Attribute

Create a user defined attribute.


<br />

Certain pre defined attributes are already created by the API hub. These
attributes will have type as `SYSTEM_DEFINED` and can be listed via
[ListAttributes](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ApiHub-Rest-Client#Google__Cloud__ApiHub__V1__ApiHub__Rest__Client_list_attributes_instance_ "Google::Cloud::ApiHub::V1::ApiHub::Rest::Client#list_attributes (method)") method.
Allowed values for the same can be updated via
[UpdateAttribute](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ApiHub-Rest-Client#Google__Cloud__ApiHub__V1__ApiHub__Rest__Client_update_attribute_instance_ "Google::Cloud::ApiHub::V1::ApiHub::Rest::Client#update_attribute (method)") method.
**Overloads**

    def create_attribute(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Attribute

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

- **request** ([::Google::Cloud::ApiHub::V1::CreateAttributeRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-CreateAttributeRequest), ::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_attribute(parent: nil, attribute_id: nil, attribute: nil) -> ::Google::Cloud::ApiHub::V1::Attribute

Pass arguments to `create_attribute` 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 Attribute. Format: `projects/{project}/locations/{location}`
- **attribute_id** (::String) --- Optional. The ID to use for the attribute, which will become the final component of the attribute'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 attribute 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\]-_/.
- **attribute** ([::Google::Cloud::ApiHub::V1::Attribute](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Attribute), ::Hash) --- Required. The attribute to create.
**Yields**

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

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

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

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

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

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

### #create_deployment

    def create_deployment(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Deployment
    def create_deployment(parent: nil, deployment_id: nil, deployment: nil) -> ::Google::Cloud::ApiHub::V1::Deployment

Create a deployment resource in the API hub.
Once a deployment resource is created, it can be associated with API
versions.
**Overloads**

    def create_deployment(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Deployment

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

- **request** ([::Google::Cloud::ApiHub::V1::CreateDeploymentRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-CreateDeploymentRequest), ::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_deployment(parent: nil, deployment_id: nil, deployment: nil) -> ::Google::Cloud::ApiHub::V1::Deployment

Pass arguments to `create_deployment` 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 deployment resource. Format: `projects/{project}/locations/{location}`
- **deployment_id** (::String) --- Optional. The ID to use for the deployment resource, which will become the final component of the deployment'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 deployment 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\]-_/.
- **deployment** ([::Google::Cloud::ApiHub::V1::Deployment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Deployment), ::Hash) --- Required. The deployment resource to create.
**Yields**

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

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

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

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

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

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

### #create_external_api

    def create_external_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi
    def create_external_api(parent: nil, external_api_id: nil, external_api: nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi

Create an External API resource in the API hub.
**Overloads**

    def create_external_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi

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

- **request** ([::Google::Cloud::ApiHub::V1::CreateExternalApiRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-CreateExternalApiRequest), ::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_external_api(parent: nil, external_api_id: nil, external_api: nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi

Pass arguments to `create_external_api` 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 External API resource. Format: `projects/{project}/locations/{location}`
- **external_api_id** (::String) --- Optional. The ID to use for the External API resource, which will become the final component of the External API'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 External API 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\]-_/.
- **external_api** ([::Google::Cloud::ApiHub::V1::ExternalApi](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ExternalApi), ::Hash) --- Required. The External API resource to create.
**Yields**

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

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

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

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

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

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

### #create_spec

    def create_spec(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Spec
    def create_spec(parent: nil, spec_id: nil, spec: nil) -> ::Google::Cloud::ApiHub::V1::Spec

Add a spec to an API version in the API hub.
Multiple specs can be added to an API version.
Note, while adding a spec, at least one of `contents` or `source_uri` must
be provided. If `contents` is provided, then `spec_type` must also be
provided.


On adding a spec with contents to the version, the operations present in it
will be added to the version.Note that the file contents in the spec should
be of the same type as defined in the
`projects/{project}/locations/{location}/attributes/system-spec-type`
attribute associated with spec resource. Note that specs of various types
can be uploaded, however parsing of details is supported for OpenAPI spec
currently.

<br />

In order to access the information parsed from the spec, use the
[GetSpec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ApiHub-Rest-Client#Google__Cloud__ApiHub__V1__ApiHub__Rest__Client_get_spec_instance_ "Google::Cloud::ApiHub::V1::ApiHub::Rest::Client#get_spec (method)") method.
In order to access the raw contents for a particular spec, use the
[GetSpecContents](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ApiHub-Rest-Client#Google__Cloud__ApiHub__V1__ApiHub__Rest__Client_get_spec_contents_instance_ "Google::Cloud::ApiHub::V1::ApiHub::Rest::Client#get_spec_contents (method)") method.
In order to access the operations parsed from the spec, use the
[ListAPIOperations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ApiHub-Rest-Client#Google__Cloud__ApiHub__V1__ApiHub__Rest__Client_list_api_operations_instance_ "Google::Cloud::ApiHub::V1::ApiHub::Rest::Client#list_api_operations (method)")
method.
**Overloads**

    def create_spec(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Spec

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

- **request** ([::Google::Cloud::ApiHub::V1::CreateSpecRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-CreateSpecRequest), ::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_spec(parent: nil, spec_id: nil, spec: nil) -> ::Google::Cloud::ApiHub::V1::Spec

Pass arguments to `create_spec` 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 Spec. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
- **spec_id** (::String) --- Optional. The ID to use for the spec, which will become the final component of the spec'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 spec in the API resource.
  - If not provided, a system generated id will be used.

  This value should be 4-500 characters, overall resource name which will be
  of format
  `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`,
  its length is limited to 1000 characters and valid characters are
  /\[a-z\]\[A-Z\]\[0-9\]-_/.
- **spec** ([::Google::Cloud::ApiHub::V1::Spec](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Spec), ::Hash) --- Required. The spec to create.
**Yields**

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

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

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

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

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

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

### #create_version

    def create_version(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Version
    def create_version(parent: nil, version_id: nil, version: nil) -> ::Google::Cloud::ApiHub::V1::Version

Create an API version for an API resource in the API hub.
**Overloads**

    def create_version(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Version

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

- **request** ([::Google::Cloud::ApiHub::V1::CreateVersionRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-CreateVersionRequest), ::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_version(parent: nil, version_id: nil, version: nil) -> ::Google::Cloud::ApiHub::V1::Version

Pass arguments to `create_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) --- Required. The parent resource for API version. Format: `projects/{project}/locations/{location}/apis/{api}`
- **version_id** (::String) --- Optional. The ID to use for the API version, which will become the final component of the version'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 version in the API resource.
  - If not provided, a system generated id will be used.

  This value should be 4-500 characters, overall resource name which will be
  of format
  `projects/{project}/locations/{location}/apis/{api}/versions/{version}`,
  its length is limited to 700 characters and valid characters are
  /\[a-z\]\[A-Z\]\[0-9\]-_/.
- **version** ([::Google::Cloud::ApiHub::V1::Version](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Version), ::Hash) --- Required. The version to create.
**Yields**

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

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

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

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

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

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

### #delete_api

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

Delete an API resource in the API hub. API can only be deleted if all
underlying versions are deleted.
**Overloads**

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

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

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

Pass arguments to `delete_api` 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. The name of the API resource to delete. Format: `projects/{project}/locations/{location}/apis/{api}`
- **force** (::Boolean) --- Optional. If set to true, any versions from this API will also be deleted. Otherwise, the request will only work if the API has no versions.
**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::ApiHub::Rest::Client.new

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

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

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

### #delete_api_operation

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

Delete an operation in an API version and we can delete only the
operations created via create API. If the operation was created by parsing
the spec, then it can be deleted by editing or deleting the spec.
**Overloads**

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

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

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

Pass arguments to `delete_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 operation resource to delete. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
**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::ApiHub::Rest::Client.new

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

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

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

### #delete_attribute

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

Delete an attribute.


<br />

Note: System defined attributes cannot be deleted. All
associations of the attribute being deleted with any API hub resource will
also get deleted.
**Overloads**

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

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

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

Pass arguments to `delete_attribute` 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 attribute to delete. Format: `projects/{project}/locations/{location}/attributes/{attribute}`
**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::ApiHub::Rest::Client.new

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

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

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

### #delete_deployment

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

Delete a deployment resource in the API hub.
**Overloads**

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

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

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

Pass arguments to `delete_deployment` 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 deployment resource to delete. Format: `projects/{project}/locations/{location}/deployments/{deployment}`
**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::ApiHub::Rest::Client.new

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

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

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

### #delete_external_api

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

Delete an External API resource in the API hub.
**Overloads**

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

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

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

Pass arguments to `delete_external_api` 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 External API resource to delete. Format: `projects/{project}/locations/{location}/externalApis/{externalApi}`
**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::ApiHub::Rest::Client.new

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

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

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

### #delete_spec

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

Delete a spec.
Deleting a spec will also delete the associated operations from the
version.
**Overloads**

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

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

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

Pass arguments to `delete_spec` 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 spec to delete. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`
**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::ApiHub::Rest::Client.new

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

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

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

### #delete_version

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

Delete an API version. Version can only be deleted if all underlying specs,
operations, definitions and linked deployments are deleted.
**Overloads**

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

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

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

Pass arguments to `delete_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) --- Required. The name of the version to delete. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
- **force** (::Boolean) --- Optional. If set to true, any specs from this version will also be deleted. Otherwise, the request will only work if the version has no specs.
**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::ApiHub::Rest::Client.new

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

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

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

### #get_api

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

Get API resource details including the API versions contained in it.
**Overloads**

    def get_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Api

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

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

Pass arguments to `get_api` 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 API resource to retrieve. Format: `projects/{project}/locations/{location}/apis/{api}`
**Yields**

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

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

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

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

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

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

### #get_api_operation

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

Get details about a particular operation in API version.
**Overloads**

    def get_api_operation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::ApiOperation

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

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

Pass arguments to `get_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 operation to retrieve. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
**Yields**

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

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

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

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

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

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

### #get_attribute

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

Get details about the attribute.
**Overloads**

    def get_attribute(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Attribute

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

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

Pass arguments to `get_attribute` 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 attribute to retrieve. Format: `projects/{project}/locations/{location}/attributes/{attribute}`
**Yields**

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

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

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

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

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

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

### #get_definition

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

Get details about a definition in an API version.
**Overloads**

    def get_definition(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Definition

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

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

Pass arguments to `get_definition` 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 definition to retrieve. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/definitions/{definition}`
**Yields**

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

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

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

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

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

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

### #get_deployment

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

Get details about a deployment and the API versions linked to it.
**Overloads**

    def get_deployment(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Deployment

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

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

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

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

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

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

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

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

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

### #get_external_api

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

Get details about an External API resource in the API hub.
**Overloads**

    def get_external_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi

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

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

Pass arguments to `get_external_api` 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 External API resource to retrieve. Format: `projects/{project}/locations/{location}/externalApis/{externalApi}`
**Yields**

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

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

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

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

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

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

### #get_spec

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

Get details about the information parsed from a spec.
Note that this method does not return the raw spec contents.
Use [GetSpecContents](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ApiHub-Rest-Client#Google__Cloud__ApiHub__V1__ApiHub__Rest__Client_get_spec_contents_instance_ "Google::Cloud::ApiHub::V1::ApiHub::Rest::Client#get_spec_contents (method)") method
to retrieve the same.
**Overloads**

    def get_spec(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Spec

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

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

Pass arguments to `get_spec` 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 spec to retrieve. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`
**Yields**

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

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

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

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

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

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

### #get_spec_contents

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

Get spec contents.
**Overloads**

    def get_spec_contents(request, options = nil) -> ::Google::Cloud::ApiHub::V1::SpecContents

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

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

Pass arguments to `get_spec_contents` 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 spec whose contents need to be retrieved. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`
**Yields**

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

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

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

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

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

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

### #get_version

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

Get details about the API version of an API resource. This will include
information about the specs and operations present in the API
version as well as the deployments linked to it.
**Overloads**

    def get_version(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Version

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

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

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

- **name** (::String) --- Required. The name of the API version to retrieve. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
**Yields**

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

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

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

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

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

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

### #initialize

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

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

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

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

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

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

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

### #list_api_operations

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

List operations in an API version.
**Overloads**

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

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

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

Pass arguments to `list_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 operations i.e., the API version. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
- **filter** (::String) ---

  Optional. An expression that filters the list of ApiOperations.

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

  The following fields in the `ApiOperation` are eligible for filtering:
  - `name` - The ApiOperation resource name. Allowed comparison operators: `=`.
  - `details.http_operation.path.path` - The http operation's complete path relative to server endpoint. Allowed comparison operators: `=`.
  - `details.http_operation.method` - The http operation method type. Allowed comparison operators: `=`.
  - `details.deprecated` - Indicates if the ApiOperation is deprecated. Allowed values are True / False indicating the deprycation status of the ApiOperation. Allowed comparison operators: `=`.
  - `create_time` - The time at which the ApiOperation was created. The value should be in the (RFC3339)\[https://tools.ietf.org/html/rfc3339\] format. Allowed comparison operators: `>` and `<`.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.enum_values.values.id` - The allowed value id of the user defined enum attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-enum-id is a placeholder that can be replaced with any user defined enum attribute name.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.enum_values.values.display_name`
  - The allowed value display name of the user defined enum attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-enum-display-name is a placeholder that can be replaced with any user defined enum attribute enum name.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.string_values.values` - The allowed value of the user defined string attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-string is a placeholder that can be replaced with any user defined string attribute name.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.json_values.values` - The allowed value of the user defined JSON attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-json is a placeholder that can be replaced with any user defined JSON attribute name.

  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:
  - `details.deprecated = True` - The ApiOperation is deprecated.
  - `details.http_operation.method = GET AND create_time <
    \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\"` - The method of the http operation of the ApiOperation is *GET* and the spec was created before *2021-08-15 14:50:00 UTC* and after *2021-08-10
    12:00:00 UTC*.
  - `details.http_operation.method = GET OR details.http_operation.method =
    POST`. - The http operation of the method of ApiOperation is *GET* or *POST*.
  - `details.deprecated = True AND
    attributes.projects/test-project-id/locations/test-location-id/
    attributes/17650f90-4a29-4971-b3c0-d5532da3764b.string_values.values:
    test` - The filter string specifies that the ApiOperation is deprecated and the value of the user defined attribute of type string is *test*.
- **page_size** (::Integer) --- Optional. The maximum number of operations to return. The service may return fewer than this value. If unspecified, at most 50 operations 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 `ListApiOperations` call. Provide this to retrieve the subsequent page.


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

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

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

# Call the list_api_operations method.
result = client.list_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::ApiOperation.
  p item
end
```

### #list_apis

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

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

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

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

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

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

  Optional. An expression that filters the list of ApiResources.

  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 not
  case sensitive.

  The following fields in the `ApiResource` are eligible for filtering:
  - `owner.email` - The email of the team which owns the ApiResource. Allowed comparison operators: `=`.
  - `create_time` - The time at which the ApiResource 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 ApiResource. Allowed comparison operators: `=`.
  - `target_user.enum_values.values.id` - The allowed value id of the target users attribute associated with the ApiResource. Allowed comparison operator is `:`.
  - `target_user.enum_values.values.display_name` - The allowed value display name of the target users attribute associated with the ApiResource. Allowed comparison operator is `:`.
  - `team.enum_values.values.id` - The allowed value id of the team attribute associated with the ApiResource. Allowed comparison operator is `:`.
  - `team.enum_values.values.display_name` - The allowed value display name of the team attribute associated with the ApiResource. Allowed comparison operator is `:`.
  - `business_unit.enum_values.values.id` - The allowed value id of the business unit attribute associated with the ApiResource. Allowed comparison operator is `:`.
  - `business_unit.enum_values.values.display_name` - The allowed value display name of the business unit attribute associated with the ApiResource. Allowed comparison operator is `:`.
  - `maturity_level.enum_values.values.id` - The allowed value id of the maturity level attribute associated with the ApiResource. Allowed comparison operator is `:`.
  - `maturity_level.enum_values.values.display_name` - The allowed value display name of the maturity level attribute associated with the ApiResource. Allowed comparison operator is `:`.
  - `api_style.enum_values.values.id` - The allowed value id of the api style attribute associated with the ApiResource. Allowed comparison operator is `:`.
  - `api_style.enum_values.values.display_name` - The allowed value display name of the api style attribute associated with the ApiResource. Allowed comparison operator is `:`.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.enum_values.values.id` - The allowed value id of the user defined enum attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-enum-id is a placeholder that can be replaced with any user defined enum attribute name.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.enum_values.values.display_name`
  - The allowed value display name of the user defined enum attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-enum-display-name is a placeholder that can be replaced with any user defined enum attribute enum name.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.string_values.values` - The allowed value of the user defined string attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-string is a placeholder that can be replaced with any user defined string attribute name.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.json_values.values` - The allowed value of the user defined JSON attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-json is a placeholder that can be replaced with any user defined JSON attribute name.

  A filter function is also supported in the filter string. The filter
  function is `id(name)`. The `id(name)` function returns the id of the
  resource name. For example, `id(name) = \"api-1\"` is equivalent to
  `name = \"projects/test-project-id/locations/test-location-id/apis/api-1\"`
  provided the parent is
  `projects/test-project-id/locations/test-location-id`.

  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:
  - `owner.email = \"apihub@google.com\"` - - The owner team email is *apihub@google.com*.
  - `owner.email = \"apihub@google.com\" AND create_time <
    \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\"` - The owner team email is *apihub@google.com* and the api was created before *2021-08-15 14:50:00 UTC* and after *2021-08-10 12:00:00 UTC*.
  - `owner.email = \"apihub@google.com\" OR team.enum_values.values.id:
    apihub-team-id` - The filter string specifies the APIs where the owner team email is *apihub@google.com* or the id of the allowed value associated with the team attribute is *apihub-team-id*.
  - `owner.email = \"apihub@google.com\" OR
    team.enum_values.values.display_name: ApiHub Team` - The filter string specifies the APIs where the owner team email is *apihub@google.com* or the display name of the allowed value associated with the team attribute is `ApiHub Team`.
  - `owner.email = \"apihub@google.com\" AND
    attributes.projects/test-project-id/locations/test-location-id/
    attributes/17650f90-4a29-4971-b3c0-d5532da3764b.enum_values.values.id:
    test_enum_id AND
    attributes.projects/test-project-id/locations/test-location-id/
    attributes/1765\0f90-4a29-5431-b3d0-d5532da3764c.string_values.values:
    test_string_value` - The filter string specifies the APIs where the owner team email is *apihub@google.com* and the id of the allowed value associated with the user defined attribute of type enum is *test_enum_id* and the value of the user defined attribute of type string is *test*..
- **page_size** (::Integer) --- Optional. The maximum number of API resources to return. The service may return fewer than this value. If unspecified, at most 50 Apis 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 `ListApis` call. Provide this to retrieve the subsequent page.


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

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

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

# Call the list_apis method.
result = client.list_apis 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::Api.
  p item
end
```

### #list_attributes

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

List all attributes.
**Overloads**

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

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

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

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

  Optional. An expression that filters the list of Attributes.

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

  The following fields in the `Attribute` are eligible for filtering:
  - `display_name` - The display name of the Attribute. Allowed comparison operators: `=`.
  - `definition_type` - The definition type of the attribute. Allowed comparison operators: `=`.
  - `scope` - The scope of the attribute. Allowed comparison operators: `=`.
  - `data_type` - The type of the data of the attribute. Allowed comparison operators: `=`.
  - `mandatory` - Denotes whether the attribute is mandatory or not. Allowed comparison operators: `=`.
  - `create_time` - The time at which the Attribute was created. The value should be in the (RFC3339)\[https://tools.ietf.org/html/rfc3339\] format. Allowed comparison operators: `>` and `<`.

  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:
  - `display_name = production` - - The display name of the attribute is *production*.
  - `(display_name = production) AND (create_time <
    \"2021-08-15T14:50:00Z\") AND (create_time > \"2021-08-10T12:00:00Z\")` - The display name of the attribute is *production* and the attribute was created before *2021-08-15 14:50:00 UTC* and after *2021-08-10 12:00:00
    UTC*.
  - `display_name = production OR scope = api` - The attribute where the display name is *production* or the scope is *api*.
- **page_size** (::Integer) --- Optional. The maximum number of attribute resources to return. The service may return fewer than this value. If unspecified, at most 50 attributes 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 `ListAttributes` call. Provide this to retrieve the subsequent page.


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

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

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

# Call the list_attributes method.
result = client.list_attributes 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::Attribute.
  p item
end
```

### #list_deployments

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

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

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

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

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

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

  Optional. An expression that filters the list of Deployments.

  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 not case sensitive.

  The following fields in the `Deployments` are eligible for filtering:
  - `display_name` - The display name of the Deployment. Allowed comparison operators: `=`.
  - `create_time` - The time at which the Deployment was created. The value should be in the (RFC3339)\[https://tools.ietf.org/html/rfc3339\] format. Allowed comparison operators: `>` and `<`.
  - `resource_uri` - A URI to the deployment resource. Allowed comparison operators: `=`.
  - `api_versions` - The API versions linked to this deployment. Allowed comparison operators: `:`.
  - `source_project` - The project/organization at source for the deployment. Allowed comparison operators: `=`.
  - `source_environment` - The environment at source for the deployment. Allowed comparison operators: `=`.
  - `deployment_type.enum_values.values.id` - The allowed value id of the deployment_type attribute associated with the Deployment. Allowed comparison operators: `:`.
  - `deployment_type.enum_values.values.display_name` - The allowed value display name of the deployment_type attribute associated with the Deployment. Allowed comparison operators: `:`.
  - `slo.string_values.values` -The allowed string value of the slo attribute associated with the deployment. Allowed comparison operators: `:`.
  - `environment.enum_values.values.id` - The allowed value id of the environment attribute associated with the deployment. Allowed comparison operators: `:`.
  - `environment.enum_values.values.display_name` - The allowed value display name of the environment attribute associated with the deployment. Allowed comparison operators: `:`.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.enum_values.values.id` - The allowed value id of the user defined enum attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-enum-id is a placeholder that can be replaced with any user defined enum attribute name.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.enum_values.values.display_name`
  - The allowed value display name of the user defined enum attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-enum-display-name is a placeholder that can be replaced with any user defined enum attribute enum name.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.string_values.values` - The allowed value of the user defined string attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-string is a placeholder that can be replaced with any user defined string attribute name.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.json_values.values` - The allowed value of the user defined JSON attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-json is a placeholder that can be replaced with any user defined JSON attribute name.

  A filter function is also supported in the filter string. The filter
  function is `id(name)`. The `id(name)` function returns the id of the
  resource name. For example, `id(name) = \"deployment-1\"` is equivalent to
  `name =
  \"projects/test-project-id/locations/test-location-id/deployments/deployment-1\"`
  provided the parent is
  `projects/test-project-id/locations/test-location-id`.

  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:
  - `environment.enum_values.values.id: staging-id` - The allowed value id of the environment attribute associated with the Deployment is *staging-id*.
  - `environment.enum_values.values.display_name: \"Staging Deployment\"` - The allowed value display name of the environment attribute associated with the Deployment is `Staging Deployment`.
  - `environment.enum_values.values.id: production-id AND create_time <
    \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\"` - The allowed value id of the environment attribute associated with the Deployment is *production-id* and Deployment was created before *2021-08-15 14:50:00 UTC* and after *2021-08-10 12:00:00 UTC*.
  - `environment.enum_values.values.id: production-id OR
    slo.string_values.values: \"99.99%\"`
  - The allowed value id of the environment attribute Deployment is *production-id* or string value of the slo attribute is *99.99%*.
  - `environment.enum_values.values.id: staging-id AND
    attributes.projects/test-project-id/locations/test-location-id/
    attributes/17650f90-4a29-4971-b3c0-d5532da3764b.string_values.values:
    test` - The filter string specifies that the allowed value id of the environment attribute associated with the Deployment is *staging-id* and the value of the user defined attribute of type string is *test*.
- **page_size** (::Integer) --- Optional. The maximum number of deployment resources to return. The service may return fewer than this value. If unspecified, at most 50 deployments 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 `ListDeployments` call. Provide this to retrieve the subsequent page.


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

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

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

# Call the list_deployments method.
result = client.list_deployments 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::Deployment.
  p item
end
```

### #list_external_apis

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

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

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

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

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

Pass arguments to `list_external_apis` 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 External API resources. Format: `projects/{project}/locations/{location}`
- **page_size** (::Integer) --- Optional. The maximum number of External API resources to return. The service may return fewer than this value. If unspecified, at most 50 ExternalApis 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 `ListExternalApis` call. Provide this to retrieve the subsequent page.


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

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

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

# Call the list_external_apis method.
result = client.list_external_apis 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::ExternalApi.
  p item
end
```

### #list_specs

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

List specs corresponding to a particular API resource.
**Overloads**

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

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

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

Pass arguments to `list_specs` 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 specs. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}`
- **filter** (::String) ---

  Optional. An expression that filters the list of Specs.

  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 not
  case sensitive.

  The following fields in the `Spec` are eligible for filtering:
  - `display_name` - The display name of the Spec. Allowed comparison operators: `=`.
  - `create_time` - The time at which the Spec was created. The value should be in the (RFC3339)\[https://tools.ietf.org/html/rfc3339\] format. Allowed comparison operators: `>` and `<`.
  - `spec_type.enum_values.values.id` - The allowed value id of the spec_type attribute associated with the Spec. Allowed comparison operators: `:`.
  - `spec_type.enum_values.values.display_name` - The allowed value display name of the spec_type attribute associated with the Spec. Allowed comparison operators: `:`.
  - `lint_response.json_values.values` - The json value of the lint_response attribute associated with the Spec. Allowed comparison operators: `:`.
  - `mime_type` - The MIME type of the Spec. Allowed comparison operators: `=`.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.enum_values.values.id` - The allowed value id of the user defined enum attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-enum-id is a placeholder that can be replaced with any user defined enum attribute name.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.enum_values.values.display_name`
  - The allowed value display name of the user defined enum attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-enum-display-name is a placeholder that can be replaced with any user defined enum attribute enum name.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.string_values.values` - The allowed value of the user defined string attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-string is a placeholder that can be replaced with any user defined string attribute name.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.json_values.values` - The allowed value of the user defined JSON attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-json is a placeholder that can be replaced with any user defined JSON attribute name.

  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:
  - `spec_type.enum_values.values.id: rest-id` - The filter string specifies that the id of the allowed value associated with the spec_type attribute is *rest-id*.
  - `spec_type.enum_values.values.display_name: \"Rest Display Name\"` - The filter string specifies that the display name of the allowed value associated with the spec_type attribute is `Rest Display Name`.
  - `spec_type.enum_values.values.id: grpc-id AND create_time <
    \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\"` - The id of the allowed value associated with the spec_type attribute is *grpc-id* and the spec was created before *2021-08-15 14:50:00 UTC* and after *2021-08-10 12:00:00 UTC*.
  - `spec_type.enum_values.values.id: rest-id OR
    spec_type.enum_values.values.id: grpc-id`
  - The id of the allowed value associated with the spec_type attribute is *rest-id* or *grpc-id*.
  - `spec_type.enum_values.values.id: rest-id AND
    attributes.projects/test-project-id/locations/test-location-id/
    attributes/17650f90-4a29-4971-b3c0-d5532da3764b.enum_values.values.id:
    test` - The filter string specifies that the id of the allowed value associated with the spec_type attribute is *rest-id* and the id of the allowed value associated with the user defined attribute of type enum is *test*.
- **page_size** (::Integer) --- Optional. The maximum number of specs to return. The service may return fewer than this value. If unspecified, at most 50 specs 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 `ListSpecs` call. Provide this to retrieve the subsequent page.


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

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

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

# Call the list_specs method.
result = client.list_specs 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::Spec.
  p item
end
```

### #list_versions

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

List API versions of an API resource in the API hub.
**Overloads**

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

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

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

Pass arguments to `list_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) --- Required. The parent which owns this collection of API versions i.e., the API resource Format: `projects/{project}/locations/{location}/apis/{api}`
- **filter** (::String) ---

  Optional. An expression that filters the list of Versions.

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

  The following fields in the `Version` are eligible for filtering:
  - `display_name` - The display name of the Version. Allowed comparison operators: `=`.
  - `create_time` - The time at which the Version was created. The value should be in the (RFC3339)\[https://tools.ietf.org/html/rfc3339\] format. Allowed comparison operators: `>` and `<`.
  - `lifecycle.enum_values.values.id` - The allowed value id of the lifecycle attribute associated with the Version. Allowed comparison operators: `:`.
  - `lifecycle.enum_values.values.display_name` - The allowed value display name of the lifecycle attribute associated with the Version. Allowed comparison operators: `:`.
  - `compliance.enum_values.values.id` - The allowed value id of the compliances attribute associated with the Version. Allowed comparison operators: `:`.
  - `compliance.enum_values.values.display_name` - The allowed value display name of the compliances attribute associated with the Version. Allowed comparison operators: `:`.
  - `accreditation.enum_values.values.id` - The allowed value id of the accreditations attribute associated with the Version. Allowed comparison operators: `:`.
  - `accreditation.enum_values.values.display_name` - The allowed value display name of the accreditations attribute associated with the Version. Allowed comparison operators: `:`.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.enum_values.values.id` - The allowed value id of the user defined enum attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-enum-id is a placeholder that can be replaced with any user defined enum attribute name.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.enum_values.values.display_name`
  - The allowed value display name of the user defined enum attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-enum-display-name is a placeholder that can be replaced with any user defined enum attribute enum name.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.string_values.values` - The allowed value of the user defined string attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-string is a placeholder that can be replaced with any user defined string attribute name.
  - `attributes.projects/test-project-id/locations/test-location-id/
    attributes/user-defined-attribute-id.json_values.values` - The allowed value of the user defined JSON attribute associated with the Resource. Allowed comparison operator is `:`. Here user-defined-attribute-json is a placeholder that can be replaced with any user defined JSON attribute name.

  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:
  - `lifecycle.enum_values.values.id: preview-id` - The filter string specifies that the id of the allowed value associated with the lifecycle attribute of the Version is *preview-id*.
  - `lifecycle.enum_values.values.display_name: \"Preview Display Name\"` - The filter string specifies that the display name of the allowed value associated with the lifecycle attribute of the Version is `Preview
    Display Name`.
  - `lifecycle.enum_values.values.id: preview-id AND create_time <
    \"2021-08-15T14:50:00Z\" AND create_time > \"2021-08-10T12:00:00Z\"` - The id of the allowed value associated with the lifecycle attribute of the Version is *preview-id* and it was created before *2021-08-15
    14:50:00 UTC* and after *2021-08-10 12:00:00 UTC*.
  - `compliance.enum_values.values.id: gdpr-id OR
    compliance.enum_values.values.id: pci-dss-id`
  - The id of the allowed value associated with the compliance attribute is *gdpr-id* or *pci-dss-id*.
  - `lifecycle.enum_values.values.id: preview-id AND
    attributes.projects/test-project-id/locations/test-location-id/
    attributes/17650f90-4a29-4971-b3c0-d5532da3764b.string_values.values:
    test` - The filter string specifies that the id of the allowed value associated with the lifecycle attribute of the Version is *preview-id* and the value of the user defined attribute of type string is *test*.
- **page_size** (::Integer) --- Optional. The maximum number of versions to return. The service may return fewer than this value. If unspecified, at most 50 versions 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 `ListVersions` call. Provide this to retrieve the subsequent page.


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

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

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

# Call the list_versions method.
result = client.list_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::ApiHub::V1::Version.
  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_resources

    def search_resources(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::SearchResult>
    def search_resources(location: nil, query: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::ApiHub::V1::SearchResult>

Search across API-Hub resources.
**Overloads**

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

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

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

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

- **location** (::String) --- Required. The resource name of the location which will be of the type `projects/{project_id}/locations/{location_id}`. This field is used to identify the instance of API-Hub in which resources should be searched.
- **query** (::String) --- Required. The free text search query. This query can contain keywords which could be related to any detail of the API-Hub resources such display names, descriptions, attributes etc.
- **filter** (::String) ---

  Optional. An expression that filters the list of search results.

  A filter expression consists of a field name, a comparison operator,
  and a value for filtering. The value must be a string, a number, or a
  boolean. The comparison operator must be `=`. Filters are not case
  sensitive.

  The following field names are eligible for filtering:
  - `resource_type` - The type of resource in the search results. Must be one of the following: `Api`, `ApiOperation`, `Deployment`, `Definition`, `Spec` or `Version`. This field can only be specified once in the filter.

  Here are is an example:
  - `resource_type = Api` - The resource_type is *Api*.
- **page_size** (::Integer) --- Optional. The maximum number of search results to return. The service may return fewer than this value. If unspecified at most 10 search results will be returned. If value is negative then `INVALID_ARGUMENT` error is returned. The maximum value is 25; values above 25 will be coerced to 25. While paginating, you can specify a new page size parameter for each page of search results to be listed.
- **page_token** (::String) --- Optional. A page token, received from a previous \[SearchResources\]\[SearchResources\] call. Specify this parameter to retrieve the next page of transactions.


  When paginating, you must specify the `page_token` parameter and all the
  other parameters except
  [page_size](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-SearchResourcesRequest#Google__Cloud__ApiHub__V1__SearchResourcesRequest_page_size_instance_ "Google::Cloud::ApiHub::V1::SearchResourcesRequest#page_size (method)")
  should be specified with the same value which was used in the previous
  call. If the other fields are set with a different value than the previous
  call then `INVALID_ARGUMENT` error is returned.
**Yields**

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

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

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

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

# Call the search_resources method.
result = client.search_resources 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::SearchResult.
  p item
end
```

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)

### #update_api

    def update_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Api
    def update_api(api: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::Api

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


- [display_name](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Api#Google__Cloud__ApiHub__V1__Api_display_name_instance_ "Google::Cloud::ApiHub::V1::Api#display_name (method)")
- [description](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Api#Google__Cloud__ApiHub__V1__Api_description_instance_ "Google::Cloud::ApiHub::V1::Api#description (method)")
- [owner](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Api#Google__Cloud__ApiHub__V1__Api_owner_instance_ "Google::Cloud::ApiHub::V1::Api#owner (method)")
- [documentation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Api#Google__Cloud__ApiHub__V1__Api_documentation_instance_ "Google::Cloud::ApiHub::V1::Api#documentation (method)")
- [target_user](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Api#Google__Cloud__ApiHub__V1__Api_target_user_instance_ "Google::Cloud::ApiHub::V1::Api#target_user (method)")
- [team](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Api#Google__Cloud__ApiHub__V1__Api_team_instance_ "Google::Cloud::ApiHub::V1::Api#team (method)")
- [business_unit](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Api#Google__Cloud__ApiHub__V1__Api_business_unit_instance_ "Google::Cloud::ApiHub::V1::Api#business_unit (method)")
- [maturity_level](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Api#Google__Cloud__ApiHub__V1__Api_maturity_level_instance_ "Google::Cloud::ApiHub::V1::Api#maturity_level (method)")
- [api_style](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Api#Google__Cloud__ApiHub__V1__Api_api_style_instance_ "Google::Cloud::ApiHub::V1::Api#api_style (method)")
- [attributes](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Api#Google__Cloud__ApiHub__V1__Api_attributes_instance_ "Google::Cloud::ApiHub::V1::Api#attributes (method)")

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.

<br />

Updating the owner field requires complete owner message
and updates both owner and email fields.
**Overloads**

    def update_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Api

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

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

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

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


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

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

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

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

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

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

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

### #update_api_operation

    def update_api_operation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::ApiOperation
    def update_api_operation(api_operation: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::ApiOperation

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


- \[details.description\]\[ApiOperation.details.description\]
- \[details.documentation\]\[ApiOperation.details.documentation\]
- \[details.http_operation.path\]\[ApiOperation.details.http_operation.path.path\]
- \[details.http_operation.method\]\[ApiOperation.details.http_operation.method\]
- \[details.deprecated\]\[ApiOperation.details.deprecated\]
- [attributes](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ApiOperation#Google__Cloud__ApiHub__V1__ApiOperation_attributes_instance_ "Google::Cloud::ApiHub::V1::ApiOperation#attributes (method)")

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

<br />

An operation can be updated only if the operation was created via
[CreateApiOperation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ApiHub-Rest-Client#Google__Cloud__ApiHub__V1__ApiHub__Rest__Client_create_api_operation_instance_ "Google::Cloud::ApiHub::V1::ApiHub::Rest::Client#create_api_operation (method)") API.
If the operation was created by parsing the spec, then it can be edited by
updating the spec.
**Overloads**

    def update_api_operation(request, options = nil) -> ::Google::Cloud::ApiHub::V1::ApiOperation

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

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

Pass arguments to `update_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). **Parameters**

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


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

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

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

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

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

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

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

### #update_attribute

    def update_attribute(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Attribute
    def update_attribute(attribute: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::Attribute

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


- [display_name](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Attribute#Google__Cloud__ApiHub__V1__Attribute_display_name_instance_ "Google::Cloud::ApiHub::V1::Attribute#display_name (method)") The display name can be updated for user defined attributes only.
- [description](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Attribute#Google__Cloud__ApiHub__V1__Attribute_description_instance_ "Google::Cloud::ApiHub::V1::Attribute#description (method)") The description can be updated for user defined attributes only.
- [allowed_values](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Attribute#Google__Cloud__ApiHub__V1__Attribute_allowed_values_instance_ "Google::Cloud::ApiHub::V1::Attribute#allowed_values (method)") To update the list of allowed values, clients need to use the fetched list of allowed values and add or remove values to or from the same list. The mutable allowed values can be updated for both user defined and System defined attributes. The immutable allowed values cannot be updated or deleted. The updated list of allowed values cannot be empty. If an allowed value that is already used by some resource's attribute is deleted, then the association between the resource and the attribute value will also be deleted.
- [cardinality](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Attribute#Google__Cloud__ApiHub__V1__Attribute_cardinality_instance_ "Google::Cloud::ApiHub::V1::Attribute#cardinality (method)") The cardinality can be updated for user defined attributes only. Cardinality can only be increased during an update.

<br />

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

    def update_attribute(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Attribute

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

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

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

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


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

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

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

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

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

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

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

### #update_deployment

    def update_deployment(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Deployment
    def update_deployment(deployment: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::Deployment

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

- [display_name](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Deployment#Google__Cloud__ApiHub__V1__Deployment_display_name_instance_ "Google::Cloud::ApiHub::V1::Deployment#display_name (method)")
- [description](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Deployment#Google__Cloud__ApiHub__V1__Deployment_description_instance_ "Google::Cloud::ApiHub::V1::Deployment#description (method)")
- [documentation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Deployment#Google__Cloud__ApiHub__V1__Deployment_documentation_instance_ "Google::Cloud::ApiHub::V1::Deployment#documentation (method)")
- [deployment_type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Deployment#Google__Cloud__ApiHub__V1__Deployment_deployment_type_instance_ "Google::Cloud::ApiHub::V1::Deployment#deployment_type (method)")
- [resource_uri](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Deployment#Google__Cloud__ApiHub__V1__Deployment_resource_uri_instance_ "Google::Cloud::ApiHub::V1::Deployment#resource_uri (method)")
- [endpoints](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Deployment#Google__Cloud__ApiHub__V1__Deployment_endpoints_instance_ "Google::Cloud::ApiHub::V1::Deployment#endpoints (method)")
- [slo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Deployment#Google__Cloud__ApiHub__V1__Deployment_slo_instance_ "Google::Cloud::ApiHub::V1::Deployment#slo (method)")
- [environment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Deployment#Google__Cloud__ApiHub__V1__Deployment_environment_instance_ "Google::Cloud::ApiHub::V1::Deployment#environment (method)")
- [attributes](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Deployment#Google__Cloud__ApiHub__V1__Deployment_attributes_instance_ "Google::Cloud::ApiHub::V1::Deployment#attributes (method)")
- \[source_project\] \[google.cloud.apihub.v1.Deployment.source_project\]
- \[source_environment\] \[google.cloud.apihub.v1.Deployment.source_environment\]
- [management_url](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Deployment#Google__Cloud__ApiHub__V1__Deployment_management_url_instance_ "Google::Cloud::ApiHub::V1::Deployment#management_url (method)")
- [source_uri](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Deployment#Google__Cloud__ApiHub__V1__Deployment_source_uri_instance_ "Google::Cloud::ApiHub::V1::Deployment#source_uri (method)") The [update_mask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-UpdateDeploymentRequest#Google__Cloud__ApiHub__V1__UpdateDeploymentRequest_update_mask_instance_ "Google::Cloud::ApiHub::V1::UpdateDeploymentRequest#update_mask (method)") should be used to specify the fields being updated.
**Overloads**

    def update_deployment(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Deployment

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

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

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

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


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

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

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

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

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

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

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

### #update_external_api

    def update_external_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi
    def update_external_api(external_api: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi

Update an External API resource in the API hub. The following fields can be
updated:


- [display_name](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ExternalApi#Google__Cloud__ApiHub__V1__ExternalApi_display_name_instance_ "Google::Cloud::ApiHub::V1::ExternalApi#display_name (method)")
- [description](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ExternalApi#Google__Cloud__ApiHub__V1__ExternalApi_description_instance_ "Google::Cloud::ApiHub::V1::ExternalApi#description (method)")
- [documentation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ExternalApi#Google__Cloud__ApiHub__V1__ExternalApi_documentation_instance_ "Google::Cloud::ApiHub::V1::ExternalApi#documentation (method)")
- [endpoints](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ExternalApi#Google__Cloud__ApiHub__V1__ExternalApi_endpoints_instance_ "Google::Cloud::ApiHub::V1::ExternalApi#endpoints (method)")
- [paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-ExternalApi#Google__Cloud__ApiHub__V1__ExternalApi_paths_instance_ "Google::Cloud::ApiHub::V1::ExternalApi#paths (method)")

<br />

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

    def update_external_api(request, options = nil) -> ::Google::Cloud::ApiHub::V1::ExternalApi

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

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

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

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


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

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

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

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

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

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

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

### #update_spec

    def update_spec(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Spec
    def update_spec(spec: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::Spec

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


- [display_name](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Spec#Google__Cloud__ApiHub__V1__Spec_display_name_instance_ "Google::Cloud::ApiHub::V1::Spec#display_name (method)")
- [source_uri](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Spec#Google__Cloud__ApiHub__V1__Spec_source_uri_instance_ "Google::Cloud::ApiHub::V1::Spec#source_uri (method)")
- [lint_response](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Spec#Google__Cloud__ApiHub__V1__Spec_lint_response_instance_ "Google::Cloud::ApiHub::V1::Spec#lint_response (method)")
- [attributes](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Spec#Google__Cloud__ApiHub__V1__Spec_attributes_instance_ "Google::Cloud::ApiHub::V1::Spec#attributes (method)")
- [contents](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Spec#Google__Cloud__ApiHub__V1__Spec_contents_instance_ "Google::Cloud::ApiHub::V1::Spec#contents (method)")
- [spec_type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Spec#Google__Cloud__ApiHub__V1__Spec_spec_type_instance_ "Google::Cloud::ApiHub::V1::Spec#spec_type (method)")

In case of an OAS spec, updating spec contents can lead to:

1. Creation, deletion and update of operations.
2. Creation, deletion and update of definitions.
3. Update of other info parsed out from the new spec.

In case of contents or source_uri being present in update mask, spec_type
must also be present. Also, spec_type can not be present in update mask if
contents or source_uri is not present.

<br />

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

    def update_spec(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Spec

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

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

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

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


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

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

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

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

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

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

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

### #update_version

    def update_version(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Version
    def update_version(version: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::Version

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


- [display_name](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Version#Google__Cloud__ApiHub__V1__Version_display_name_instance_ "Google::Cloud::ApiHub::V1::Version#display_name (method)")
- [description](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Version#Google__Cloud__ApiHub__V1__Version_description_instance_ "Google::Cloud::ApiHub::V1::Version#description (method)")
- [documentation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Version#Google__Cloud__ApiHub__V1__Version_documentation_instance_ "Google::Cloud::ApiHub::V1::Version#documentation (method)")
- [deployments](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Version#Google__Cloud__ApiHub__V1__Version_deployments_instance_ "Google::Cloud::ApiHub::V1::Version#deployments (method)")
- [lifecycle](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Version#Google__Cloud__ApiHub__V1__Version_lifecycle_instance_ "Google::Cloud::ApiHub::V1::Version#lifecycle (method)")
- [compliance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Version#Google__Cloud__ApiHub__V1__Version_compliance_instance_ "Google::Cloud::ApiHub::V1::Version#compliance (method)")
- [accreditation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Version#Google__Cloud__ApiHub__V1__Version_accreditation_instance_ "Google::Cloud::ApiHub::V1::Version#accreditation (method)")
- [attributes](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Version#Google__Cloud__ApiHub__V1__Version_attributes_instance_ "Google::Cloud::ApiHub::V1::Version#attributes (method)")

<br />

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

    def update_version(request, options = nil) -> ::Google::Cloud::ApiHub::V1::Version

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

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

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

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


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

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

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

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

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

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

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