Cloud PubSub V1 Client - Class SchemaSettings (1.39.3)

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

Settings for validating messages published against a schema.

Generated from protobuf message google.pubsub.v1.SchemaSettings

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ schema string

Required. The name of the schema that messages published should be validated against. Format is projects/{project}/schemas/{schema}. The value of this field will be _deleted-schema_ if the schema has been deleted.

↳ encoding int

The encoding of messages validated against schema.

getSchema

Required. The name of the schema that messages published should be validated against. Format is projects/{project}/schemas/{schema}. The value of this field will be _deleted-schema_ if the schema has been deleted.

Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {

Returns
TypeDescription
string

setSchema

Required. The name of the schema that messages published should be validated against. Format is projects/{project}/schemas/{schema}. The value of this field will be _deleted-schema_ if the schema has been deleted.

Generated from protobuf field string schema = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getEncoding

The encoding of messages validated against schema.

Generated from protobuf field .google.pubsub.v1.Encoding encoding = 2;

Returns
TypeDescription
int

setEncoding

The encoding of messages validated against schema.

Generated from protobuf field .google.pubsub.v1.Encoding encoding = 2;

Parameter
NameDescription
var int
Returns
TypeDescription
$this