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}
-
(::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}
-
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.
-
(::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
- (::Google::Cloud::ApiHub::V1::SpecContents) — Optional. Input only. The contents of the uploaded spec.
#contents=
def contents=(value) -> ::Google::Cloud::ApiHub::V1::SpecContents
- value (::Google::Cloud::ApiHub::V1::SpecContents) — Optional. Input only. The contents of the uploaded spec.
- (::Google::Cloud::ApiHub::V1::SpecContents) — Optional. Input only. The contents of the uploaded spec.
#create_time
def create_time() -> ::Google::Protobuf::Timestamp
- (::Google::Protobuf::Timestamp) — Output only. The time at which the spec was created.
#details
def details() -> ::Google::Cloud::ApiHub::V1::SpecDetails
- (::Google::Cloud::ApiHub::V1::SpecDetails) — Output only. Details parsed from the spec.
#display_name
def display_name() -> ::String
- (::String) — Required. The display name of the spec. This can contain the file name of the spec.
#display_name=
def display_name=(value) -> ::String
- value (::String) — Required. The display name of the spec. This can contain the file name of the spec.
- (::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
-
(::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
-
value (::Google::Cloud::ApiHub::V1::Documentation) — Optional. The documentation of the spec.
For OpenAPI spec, this will be populated from
externalDocs
in OpenAPI spec.
-
(::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
- (::Google::Cloud::ApiHub::V1::LintResponse) — Optional. The lint response for the spec.
#lint_response=
def lint_response=(value) -> ::Google::Cloud::ApiHub::V1::LintResponse
- value (::Google::Cloud::ApiHub::V1::LintResponse) — Optional. The lint response for the spec.
- (::Google::Cloud::ApiHub::V1::LintResponse) — Optional. The lint response for the spec.
#name
def name() -> ::String
-
(::String) — Identifier. The name of the spec.
Format:
projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
#name=
def name=(value) -> ::String
-
value (::String) — Identifier. The name of the spec.
Format:
projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
-
(::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
- (::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
- value (::Google::Cloud::ApiHub::V1::Spec::ParsingMode) — Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing.
- (::Google::Cloud::ApiHub::V1::Spec::ParsingMode) — Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing.
#source_uri
def source_uri() -> ::String
- (::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
- value (::String) — Optional. The URI of the spec source in case file is uploaded from an external version control system.
- (::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
-
(::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
-
value (::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.
-
(::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
- (::Google::Protobuf::Timestamp) — Output only. The time at which the spec was last updated.