Google Cloud Api Hub V1 Client - Class Definition (0.1.1)

Reference documentation and code samples for the Google Cloud Api Hub V1 Client class Definition.

Represents a definition for example schema, request, response definitions contained in an API version.

A definition is added/updated/deleted in an API version when a new spec is added or an existing spec is updated/deleted in a version. Currently, definition will be created only corresponding to OpenAPI spec as parsing is supported for OpenAPI spec. Also, within OpenAPI spec, only schema object is supported.

Generated from protobuf message google.cloud.apihub.v1.Definition

Namespace

Google \ Cloud \ ApiHub \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ schema Google\Cloud\ApiHub\V1\Schema

Output only. The value of a schema definition.

↳ name string

Identifier. The name of the definition. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/definitions/{definition}

↳ spec string

Output only. The name of the spec from where the definition was parsed. Format is projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}

↳ type int

Output only. The type of the definition.

↳ create_time Google\Protobuf\Timestamp

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

↳ update_time Google\Protobuf\Timestamp

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

↳ attributes array|Google\Protobuf\Internal\MapField

Optional. The list of user defined attributes associated with the definition resource. 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.

getSchema

Output only. The value of a schema definition.

Returns
Type Description
Google\Cloud\ApiHub\V1\Schema|null

hasSchema

setSchema

Output only. The value of a schema definition.

Parameter
Name Description
var Google\Cloud\ApiHub\V1\Schema
Returns
Type Description
$this

getName

Identifier. The name of the definition.

Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/definitions/{definition}

Returns
Type Description
string

setName

Identifier. The name of the definition.

Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/definitions/{definition}

Parameter
Name Description
var string
Returns
Type Description
$this

getSpec

Output only. The name of the spec from where the definition was parsed.

Format is projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}

Returns
Type Description
string

setSpec

Output only. The name of the spec from where the definition was parsed.

Format is projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}

Parameter
Name Description
var string
Returns
Type Description
$this

getType

Output only. The type of the definition.

Returns
Type Description
int

setType

Output only. The type of the definition.

Parameter
Name Description
var int
Returns
Type Description
$this

getCreateTime

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

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

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

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getUpdateTime

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

Returns
Type Description
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

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

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getAttributes

Optional. The list of user defined attributes associated with the definition resource. 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 definition resource. 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

getValue

Returns
Type Description
string