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::Spec.

Represents a spec associated with an API version in the API
Hub. Note that specs of various types can be uploaded, however
parsing of details is supported for OpenAPI spec currently.

## 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 spec. 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 spec. 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 spec. 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.

### #contents

    def contents() -> ::Google::Cloud::ApiHub::V1::SpecContents

**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)) --- Optional. Input only. The contents of the uploaded spec.

### #contents=

    def contents=(value) -> ::Google::Cloud::ApiHub::V1::SpecContents

**Parameter**

- **value** ([::Google::Cloud::ApiHub::V1::SpecContents](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-SpecContents)) --- Optional. Input only. The contents of the uploaded spec.
**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)) --- Optional. Input only. The contents of the uploaded spec.

### #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 spec was created.

### #details

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

**Returns**

- ([::Google::Cloud::ApiHub::V1::SpecDetails](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-SpecDetails)) --- Output only. Details parsed from the spec.

### #display_name

    def display_name() -> ::String

**Returns**

- (::String) --- Required. The display name of the spec. This can contain the file name of the spec.

### #display_name=

    def display_name=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The display name of the spec. This can contain the file name of the spec.
**Returns**

- (::String) --- Required. The display name of the spec. This can contain the file name of the spec.

### #documentation

    def documentation() -> ::Google::Cloud::ApiHub::V1::Documentation

**Returns**

- ([::Google::Cloud::ApiHub::V1::Documentation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Documentation)) --- Optional. The documentation of the spec. For OpenAPI spec, this will be populated from `externalDocs` in OpenAPI spec.

### #documentation=

    def documentation=(value) -> ::Google::Cloud::ApiHub::V1::Documentation

**Parameter**

- **value** ([::Google::Cloud::ApiHub::V1::Documentation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Documentation)) --- Optional. The documentation of the spec. For OpenAPI spec, this will be populated from `externalDocs` in OpenAPI spec.
**Returns**

- ([::Google::Cloud::ApiHub::V1::Documentation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Documentation)) --- Optional. The documentation of the spec. For OpenAPI spec, this will be populated from `externalDocs` in OpenAPI spec.

### #lint_response

    def lint_response() -> ::Google::Cloud::ApiHub::V1::LintResponse

**Returns**

- ([::Google::Cloud::ApiHub::V1::LintResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-LintResponse)) --- Optional. The lint response for the spec.

### #lint_response=

    def lint_response=(value) -> ::Google::Cloud::ApiHub::V1::LintResponse

**Parameter**

- **value** ([::Google::Cloud::ApiHub::V1::LintResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-LintResponse)) --- Optional. The lint response for the spec.
**Returns**

- ([::Google::Cloud::ApiHub::V1::LintResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-LintResponse)) --- Optional. The lint response for the spec.

### #name

    def name() -> ::String

**Returns**

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

  Format:
  `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`

### #name=

    def name=(value) -> ::String

**Parameter**

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


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

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

  Format:
  `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`

### #parsing_mode

    def parsing_mode() -> ::Google::Cloud::ApiHub::V1::Spec::ParsingMode

**Returns**

- ([::Google::Cloud::ApiHub::V1::Spec::ParsingMode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Spec-ParsingMode)) --- Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing.

### #parsing_mode=

    def parsing_mode=(value) -> ::Google::Cloud::ApiHub::V1::Spec::ParsingMode

**Parameter**

- **value** ([::Google::Cloud::ApiHub::V1::Spec::ParsingMode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Spec-ParsingMode)) --- Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing.
**Returns**

- ([::Google::Cloud::ApiHub::V1::Spec::ParsingMode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-Spec-ParsingMode)) --- Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing.

### #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 spec.

### #source_uri

    def source_uri() -> ::String

**Returns**

- (::String) --- Optional. The URI of the spec source in case file is uploaded from an external version control system.

### #source_uri=

    def source_uri=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. The URI of the spec source in case file is uploaded from an external version control system.
**Returns**

- (::String) --- Optional. The URI of the spec source in case file is uploaded from an external version control system.

### #spec_type

    def spec_type() -> ::Google::Cloud::ApiHub::V1::AttributeValues

**Returns**

- ([::Google::Cloud::ApiHub::V1::AttributeValues](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-AttributeValues)) --- Required. The type of spec. The value should be one of the allowed values defined for `projects/{project}/locations/{location}/attributes/system-spec-type` attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API.


  Note, this field is mandatory if content is provided.

### #spec_type=

    def spec_type=(value) -> ::Google::Cloud::ApiHub::V1::AttributeValues

**Parameter**

- **value** ([::Google::Cloud::ApiHub::V1::AttributeValues](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-AttributeValues)) --- Required. The type of spec. The value should be one of the allowed values defined for `projects/{project}/locations/{location}/attributes/system-spec-type` attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API.


  Note, this field is mandatory if content is provided.
**Returns**

- ([::Google::Cloud::ApiHub::V1::AttributeValues](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-AttributeValues)) --- Required. The type of spec. The value should be one of the allowed values defined for `projects/{project}/locations/{location}/attributes/system-spec-type` attribute. The number of values for this attribute will be based on the cardinality of the attribute. The same can be retrieved via GetAttribute API.


  Note, this field is mandatory if content is provided.

### #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 spec was last updated.