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

Represents an operation contained in an API version in the API Hub.
An operation is added/updated/deleted in an API version when a new spec is
added or an existing spec is updated/deleted in a version.
Currently, an operation will be created only corresponding to OpenAPI spec as
parsing is supported for OpenAPI spec.
Alternatively operations can be managed via create,update and delete APIs,
creation of apiOperation can be possible only for version with no parsed
operations and update/delete can be possible only for operations created via
create API.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #attributes

    def attributes() -> ::Google::Protobuf::Map{::String => ::Google::Cloud::ApiHub::V1::AttributeValues}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::Google::Cloud::ApiHub::V1::AttributeValues}) --- Optional. The list of user defined attributes associated with the API operation resource. The key is the attribute name. It will be of the format: `projects/{project}/locations/{location}/attributes/{attribute}`. The value is the attribute values associated with the resource.

### #attributes=

    def attributes=(value) -> ::Google::Protobuf::Map{::String => ::Google::Cloud::ApiHub::V1::AttributeValues}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::Google::Cloud::ApiHub::V1::AttributeValues}) --- Optional. The list of user defined attributes associated with the API operation resource. The key is the attribute name. It will be of the format: `projects/{project}/locations/{location}/attributes/{attribute}`. The value is the attribute values associated with the resource.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::Google::Cloud::ApiHub::V1::AttributeValues}) --- Optional. The list of user defined attributes associated with the API operation resource. The key is the attribute name. It will be of the format: `projects/{project}/locations/{location}/attributes/{attribute}`. The value is the attribute values associated with the resource.

### #create_time

    def create_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The time at which the operation was created.

### #details

    def details() -> ::Google::Cloud::ApiHub::V1::OperationDetails

**Returns**

- ([::Google::Cloud::ApiHub::V1::OperationDetails](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-OperationDetails)) --- Optional. Operation details. Note: Even though this field is optional, it is required for [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 and we will fail the request if not provided.

### #details=

    def details=(value) -> ::Google::Cloud::ApiHub::V1::OperationDetails

**Parameter**

- **value** ([::Google::Cloud::ApiHub::V1::OperationDetails](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-OperationDetails)) --- Optional. Operation details. Note: Even though this field is optional, it is required for [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 and we will fail the request if not provided.
**Returns**

- ([::Google::Cloud::ApiHub::V1::OperationDetails](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-OperationDetails)) --- Optional. Operation details. Note: Even though this field is optional, it is required for [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 and we will fail the request if not provided.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Identifier. The name of the operation.

  Format:
  `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Identifier. The name of the operation.


  Format:
  `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`
**Returns**

- (::String) --- Identifier. The name of the operation.

  Format:
  `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}`

### #source_metadata

    def source_metadata() -> ::Array<::Google::Cloud::ApiHub::V1::SourceMetadata>

**Returns**

- (::Array\<[::Google::Cloud::ApiHub::V1::SourceMetadata](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-SourceMetadata)\>) --- Output only. The list of sources and metadata from the sources of the API operation.

### #spec

    def spec() -> ::String

**Returns**

- (::String) --- Output only. The name of the spec will be of the format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` Note:The name of the spec will be empty if the operation is 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.

### #update_time

    def update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The time at which the operation was last updated.