Google Cloud Apigee Registry V1 Client - Class ApiSpec (0.4.2)

Reference documentation and code samples for the Google Cloud Apigee Registry V1 Client class ApiSpec.

Describes a version of an API in a structured way.

ApiSpecs provide formal descriptions that consumers can use to use a version. ApiSpec resources are intended to be fully-resolved descriptions of an ApiVersion. When specs consist of multiple files, these should be bundled together (e.g., in a zip archive) and stored as a unit. Multiple specs can exist to provide representations in different API description formats. Synchronization of these representations would be provided by tooling and background services.

Generated from protobuf message google.cloud.apigeeregistry.v1.ApiSpec

Namespace

Google \ Cloud \ ApigeeRegistry \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Resource name.

↳ filename string

A possibly-hierarchical name used to refer to the spec from other specs.

↳ description string

A detailed description.

↳ revision_id string

Output only. Immutable. The revision ID of the spec. A new revision is committed whenever the spec contents are changed. The format is an 8-character hexadecimal string.

↳ create_time Google\Protobuf\Timestamp

Output only. Creation timestamp; when the spec resource was created.

↳ revision_create_time Google\Protobuf\Timestamp

Output only. Revision creation timestamp; when the represented revision was created.

↳ revision_update_time Google\Protobuf\Timestamp

Output only. Last update timestamp: when the represented revision was last modified.

↳ mime_type string

A style (format) descriptor for this spec that is specified as a Media Type (https://en.wikipedia.org/wiki/Media_type). Possible values include application/vnd.apigee.proto, application/vnd.apigee.openapi, and application/vnd.apigee.graphql, with possible suffixes representing compression types. These hypothetical names are defined in the vendor tree defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").

↳ size_bytes int

Output only. The size of the spec file in bytes. If the spec is gzipped, this is the size of the uncompressed spec.

↳ hash string

Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is the hash of the uncompressed spec.

↳ source_uri string

The original source URI of the spec (if one exists). This is an external location that can be used for reference purposes but which may not be authoritative since this external resource may change after the spec is retrieved.

↳ contents string

Input only. The contents of the spec. Provided by API callers when specs are created or updated. To access the contents of a spec, use GetApiSpecContents.

↳ labels array|Google\Protobuf\Internal\MapField

Labels attach identifying metadata to resources. Identifying metadata can be used to filter list operations. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with apigeeregistry.googleapis.com/ and cannot be changed.

↳ annotations array|Google\Protobuf\Internal\MapField

Annotations attach non-identifying metadata to resources. Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts.

getName

Resource name.

Returns
TypeDescription
string

setName

Resource name.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getFilename

A possibly-hierarchical name used to refer to the spec from other specs.

Returns
TypeDescription
string

setFilename

A possibly-hierarchical name used to refer to the spec from other specs.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDescription

A detailed description.

Returns
TypeDescription
string

setDescription

A detailed description.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getRevisionId

Output only. Immutable. The revision ID of the spec.

A new revision is committed whenever the spec contents are changed. The format is an 8-character hexadecimal string.

Returns
TypeDescription
string

setRevisionId

Output only. Immutable. The revision ID of the spec.

A new revision is committed whenever the spec contents are changed. The format is an 8-character hexadecimal string.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCreateTime

Output only. Creation timestamp; when the spec resource was created.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. Creation timestamp; when the spec resource was created.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getRevisionCreateTime

Output only. Revision creation timestamp; when the represented revision was created.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasRevisionCreateTime

clearRevisionCreateTime

setRevisionCreateTime

Output only. Revision creation timestamp; when the represented revision was created.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getRevisionUpdateTime

Output only. Last update timestamp: when the represented revision was last modified.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasRevisionUpdateTime

clearRevisionUpdateTime

setRevisionUpdateTime

Output only. Last update timestamp: when the represented revision was last modified.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getMimeType

A style (format) descriptor for this spec that is specified as a Media Type (https://en.wikipedia.org/wiki/Media_type). Possible values include application/vnd.apigee.proto, application/vnd.apigee.openapi, and application/vnd.apigee.graphql, with possible suffixes representing compression types. These hypothetical names are defined in the vendor tree defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.

Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").

Returns
TypeDescription
string

setMimeType

A style (format) descriptor for this spec that is specified as a Media Type (https://en.wikipedia.org/wiki/Media_type). Possible values include application/vnd.apigee.proto, application/vnd.apigee.openapi, and application/vnd.apigee.graphql, with possible suffixes representing compression types. These hypothetical names are defined in the vendor tree defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final.

Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSizeBytes

Output only. The size of the spec file in bytes. If the spec is gzipped, this is the size of the uncompressed spec.

Returns
TypeDescription
int

setSizeBytes

Output only. The size of the spec file in bytes. If the spec is gzipped, this is the size of the uncompressed spec.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getHash

Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is the hash of the uncompressed spec.

Returns
TypeDescription
string

setHash

Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is the hash of the uncompressed spec.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSourceUri

The original source URI of the spec (if one exists).

This is an external location that can be used for reference purposes but which may not be authoritative since this external resource may change after the spec is retrieved.

Returns
TypeDescription
string

setSourceUri

The original source URI of the spec (if one exists).

This is an external location that can be used for reference purposes but which may not be authoritative since this external resource may change after the spec is retrieved.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getContents

Input only. The contents of the spec.

Provided by API callers when specs are created or updated. To access the contents of a spec, use GetApiSpecContents.

Returns
TypeDescription
string

setContents

Input only. The contents of the spec.

Provided by API callers when specs are created or updated. To access the contents of a spec, use GetApiSpecContents.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getLabels

Labels attach identifying metadata to resources. Identifying metadata can be used to filter list operations.

Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with apigeeregistry.googleapis.com/ and cannot be changed.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setLabels

Labels attach identifying metadata to resources. Identifying metadata can be used to filter list operations.

Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with apigeeregistry.googleapis.com/ and cannot be changed.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getAnnotations

Annotations attach non-identifying metadata to resources.

Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setAnnotations

Annotations attach non-identifying metadata to resources.

Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this