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.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Identifier. The name of the spec. Format: |
↳ display_name |
string
Required. The display name of the spec. This can contain the file name of the spec. |
↳ spec_type |
Google\Cloud\ApiHub\V1\AttributeValues
Required. The type of spec. The value should be one of the allowed values defined for |
↳ contents |
Google\Cloud\ApiHub\V1\SpecContents
Optional. Input only. The contents of the uploaded spec. |
↳ details |
Google\Cloud\ApiHub\V1\SpecDetails
Output only. Details parsed from the spec. |
↳ source_uri |
string
Optional. The URI of the spec source in case file is uploaded from an external version control system. |
↳ create_time |
Google\Protobuf\Timestamp
Output only. The time at which the spec was created. |
↳ update_time |
Google\Protobuf\Timestamp
Output only. The time at which the spec was last updated. |
↳ lint_response |
Google\Cloud\ApiHub\V1\LintResponse
Optional. The lint response for the spec. |
↳ 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: |
↳ documentation |
Google\Cloud\ApiHub\V1\Documentation
Optional. The documentation of the spec. For OpenAPI spec, this will be populated from |
↳ parsing_mode |
int
Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing. |
getName
Identifier. The name of the spec.
Format:
projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
Returns | |
---|---|
Type | Description |
string |
setName
Identifier. The name of the spec.
Format:
projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getDisplayName
Required. The display name of the spec.
This can contain the file name of the spec.
Returns | |
---|---|
Type | Description |
string |
setDisplayName
Required. The display name of the spec.
This can contain the file name of the spec.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$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.
Returns | |
---|---|
Type | Description |
Google\Cloud\ApiHub\V1\AttributeValues|null |
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.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\ApiHub\V1\AttributeValues
|
Returns | |
---|---|
Type | Description |
$this |
getContents
Optional. Input only. The contents of the uploaded spec.
Returns | |
---|---|
Type | Description |
Google\Cloud\ApiHub\V1\SpecContents|null |
hasContents
clearContents
setContents
Optional. Input only. The contents of the uploaded spec.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\ApiHub\V1\SpecContents
|
Returns | |
---|---|
Type | Description |
$this |
getDetails
Output only. Details parsed from the spec.
Returns | |
---|---|
Type | Description |
Google\Cloud\ApiHub\V1\SpecDetails|null |
hasDetails
clearDetails
setDetails
Output only. Details parsed from the spec.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\ApiHub\V1\SpecDetails
|
Returns | |
---|---|
Type | Description |
$this |
getSourceUri
Optional. The URI of the spec source in case file is uploaded from an external version control system.
Returns | |
---|---|
Type | Description |
string |
setSourceUri
Optional. The URI of the spec source in case file is uploaded from an external version control system.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getCreateTime
Output only. The time at which the spec was created.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasCreateTime
clearCreateTime
setCreateTime
Output only. The time at which the spec was created.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$this |
getUpdateTime
Output only. The time at which the spec was last updated.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. The time at which the spec was last updated.
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$this |
getLintResponse
Optional. The lint response for the spec.
Returns | |
---|---|
Type | Description |
Google\Cloud\ApiHub\V1\LintResponse|null |
hasLintResponse
clearLintResponse
setLintResponse
Optional. The lint response for the spec.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\ApiHub\V1\LintResponse
|
Returns | |
---|---|
Type | Description |
$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.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\MapField |
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.
Parameter | |
---|---|
Name | Description |
var |
array|Google\Protobuf\Internal\MapField
|
Returns | |
---|---|
Type | Description |
$this |
getDocumentation
Optional. The documentation of the spec.
For OpenAPI spec, this will be populated from externalDocs
in OpenAPI
spec.
Returns | |
---|---|
Type | Description |
Google\Cloud\ApiHub\V1\Documentation|null |
hasDocumentation
clearDocumentation
setDocumentation
Optional. The documentation of the spec.
For OpenAPI spec, this will be populated from externalDocs
in OpenAPI
spec.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\ApiHub\V1\Documentation
|
Returns | |
---|---|
Type | Description |
$this |
getParsingMode
Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing.
Returns | |
---|---|
Type | Description |
int |
setParsingMode
Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |