Google Cloud Api Hub V1 Client - Class Spec (0.4.1)

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 \ V1

Methods

__construct

Constructor.

Parameters
Name
Description
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
SpecContents

Optional. Input only. The contents of the uploaded spec.

↳ details
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
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: 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
array< SourceMetadata >

Output only. The list of sources and metadata from the sources of the spec.

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

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
Returns
Type
Description
$this

getContents

Optional. Input only. The contents of the uploaded spec.

Returns
Type
Description
SpecContents |null

hasContents

clearContents

setContents

Optional. Input only. The contents of the uploaded spec.

Parameter
Name
Description
Returns
Type
Description
$this

getDetails

Output only. Details parsed from the spec.

Returns
Type
Description
SpecDetails |null

hasDetails

clearDetails

setDetails

Output only. Details parsed from the spec.

Parameter
Name
Description
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

hasCreateTime

clearCreateTime

setCreateTime

Output only. The time at which the spec was created.

Parameter
Name
Description
Returns
Type
Description
$this

getUpdateTime

Output only. The time at which the spec was last updated.

Returns
Type
Description

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The time at which the spec was last updated.

Parameter
Name
Description
Returns
Type
Description
$this

getLintResponse

Optional. The lint response for the spec.

Returns
Type
Description
LintResponse |null

hasLintResponse

clearLintResponse

setLintResponse

Optional. The lint response for the spec.

Parameter
Name
Description
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

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
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

hasDocumentation

clearDocumentation

setDocumentation

Optional. The documentation of the spec.

For OpenAPI spec, this will be populated from externalDocs in OpenAPI spec.

Parameter
Name
Description
Returns
Type
Description
$this

getParsingMode

Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing.

Returns
Type
Description
int
Enum of type ParsingMode .

setParsingMode

Optional. Input only. Enum specifying the parsing mode for OpenAPI Specification (OAS) parsing.

Parameter
Name
Description
var
int

Enum of type ParsingMode .

Returns
Type
Description
$this

Output only. The list of sources and metadata from the sources of the spec.

Returns
Type
Description

Output only. The list of sources and metadata from the sources of the spec.

Parameter
Name
Description
var
array< SourceMetadata >
Returns
Type
Description
$this
Create a Mobile Website
View Site in Mobile | Classic
Share by: