Reference documentation and code samples for the Google Cloud Api Hub V1 Client class 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.
Generated from protobuf message google.cloud.apihub.v1.Spec
Namespace
Google \ Cloud \ ApiHub \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
Identifier. The name of the spec. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
↳ display_name
string
Required. The display name of the spec. This can contain the file name of the spec.
↳ spec_type
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.
↳ contents
↳ details
↳ source_uri
string
Optional. The URI of the spec source in case file is uploaded from an external version control system.
↳ create_time
↳ update_time
↳ lint_response
↳ attributes
array| Google\Protobuf\Internal\MapField
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.
↳ documentation
Documentation
Optional. The documentation of the spec. For OpenAPI spec, this will be populated from externalDocs
in OpenAPI spec.
↳ parsing_mode
int
Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing.
↳ source_metadata
getName
Identifier. The name of the spec.
Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
string
setName
Identifier. The name of the spec.
Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
var
string
$this
getDisplayName
Required. The display name of the spec.
This can contain the file name of the spec.
string
setDisplayName
Required. The display name of the spec.
This can contain the file name of the spec.
var
string
$this
getSpecType
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.
hasSpecType
clearSpecType
setSpecType
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.
$this
getContents
Optional. Input only. The contents of the uploaded spec.
hasContents
clearContents
setContents
Optional. Input only. The contents of the uploaded spec.
$this
getDetails
Output only. Details parsed from the spec.
hasDetails
clearDetails
setDetails
Output only. Details parsed from the spec.
$this
getSourceUri
Optional. The URI of the spec source in case file is uploaded from an external version control system.
string
setSourceUri
Optional. The URI of the spec source in case file is uploaded from an external version control system.
var
string
$this
getCreateTime
Output only. The time at which the spec was created.
hasCreateTime
clearCreateTime
setCreateTime
Output only. The time at which the spec was created.
$this
getUpdateTime
Output only. The time at which the spec was last updated.
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. The time at which the spec was last updated.
$this
getLintResponse
Optional. The lint response for the spec.
hasLintResponse
clearLintResponse
setLintResponse
Optional. The lint response for the spec.
$this
getAttributes
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.
setAttributes
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.
$this
getDocumentation
Optional. The documentation of the spec.
For OpenAPI spec, this will be populated from externalDocs
in OpenAPI
spec.
hasDocumentation
clearDocumentation
setDocumentation
Optional. The documentation of the spec.
For OpenAPI spec, this will be populated from externalDocs
in OpenAPI
spec.
$this
getParsingMode
Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing.
setParsingMode
Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing.
$this
getSourceMetadata
Output only. The list of sources and metadata from the sources of the spec.
setSourceMetadata
Output only. The list of sources and metadata from the sources of the spec.
$this

