Cloud PubSub V1 Client - Class Schema (1.39.3)

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

A schema resource.

Generated from protobuf message google.pubsub.v1.Schema

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.

getName

Required. Name of the schema.

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

Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
string

setName

Required. Name of the schema.

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

Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getType

The type of the schema definition.

Generated from protobuf field .google.pubsub.v1.Schema.Type type = 2;

Returns
TypeDescription
int

setType

The type of the schema definition.

Generated from protobuf field .google.pubsub.v1.Schema.Type type = 2;

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.

Generated from protobuf field string definition = 3;

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.

Generated from protobuf field string definition = 3;

Parameter
NameDescription
var string
Returns
TypeDescription
$this