Cloud PubSub V1 Client - Class Schema (1.43.2)

Reference documentation and code samples for the Cloud PubSub V1 Client class Schema.

A schema resource.

Generated from protobuf message google.pubsub.v1.Schema

Namespace

Google \ Cloud \ PubSub \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Required. Name of the schema. Format is projects/{project}/schemas/{schema}.

↳ type int

The type of the schema definition.

↳ definition string

The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in type.

↳ revision_id string

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

↳ revision_create_time Google\Protobuf\Timestamp

Output only. The timestamp that the revision was created.

getName

Required. Name of the schema.

Format is projects/{project}/schemas/{schema}.

Returns
TypeDescription
string

setName

Required. Name of the schema.

Format is projects/{project}/schemas/{schema}.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getType

The type of the schema definition.

Returns
TypeDescription
int

setType

The type of the schema definition.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getDefinition

The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in type.

Returns
TypeDescription
string

setDefinition

The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in type.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getRevisionId

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

Returns
TypeDescription
string

setRevisionId

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getRevisionCreateTime

Output only. The timestamp that the revision was created.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasRevisionCreateTime

clearRevisionCreateTime

setRevisionCreateTime

Output only. The timestamp that the revision was created.

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