Class SchemaSettings.Builder (1.119.0)

public static final class SchemaSettings.Builder extends GeneratedMessageV3.Builder<SchemaSettings.Builder> implements SchemaSettingsOrBuilder

Settings for validating messages published against a schema.

Protobuf type google.pubsub.v1.SchemaSettings

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SchemaSettings.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SchemaSettings.Builder
Overrides

build()

public SchemaSettings build()
Returns
TypeDescription
SchemaSettings

buildPartial()

public SchemaSettings buildPartial()
Returns
TypeDescription
SchemaSettings

clear()

public SchemaSettings.Builder clear()
Returns
TypeDescription
SchemaSettings.Builder
Overrides

clearEncoding()

public SchemaSettings.Builder clearEncoding()

The encoding of messages validated against schema.

.google.pubsub.v1.Encoding encoding = 2;

Returns
TypeDescription
SchemaSettings.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public SchemaSettings.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
SchemaSettings.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public SchemaSettings.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
SchemaSettings.Builder
Overrides

clearSchema()

public SchemaSettings.Builder clearSchema()

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.

string schema = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
SchemaSettings.Builder

This builder for chaining.

clone()

public SchemaSettings.Builder clone()
Returns
TypeDescription
SchemaSettings.Builder
Overrides

getDefaultInstanceForType()

public SchemaSettings getDefaultInstanceForType()
Returns
TypeDescription
SchemaSettings

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEncoding()

public Encoding getEncoding()

The encoding of messages validated against schema.

.google.pubsub.v1.Encoding encoding = 2;

Returns
TypeDescription
Encoding

The encoding.

getEncodingValue()

public int getEncodingValue()

The encoding of messages validated against schema.

.google.pubsub.v1.Encoding encoding = 2;

Returns
TypeDescription
int

The enum numeric value on the wire for encoding.

getSchema()

public String 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.

string schema = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The schema.

getSchemaBytes()

public ByteString getSchemaBytes()

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.

string schema = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for schema.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SchemaSettings.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SchemaSettings.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public SchemaSettings.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
SchemaSettings.Builder
Overrides

mergeFrom(SchemaSettings other)

public SchemaSettings.Builder mergeFrom(SchemaSettings other)
Parameter
NameDescription
otherSchemaSettings
Returns
TypeDescription
SchemaSettings.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SchemaSettings.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SchemaSettings.Builder
Overrides

setEncoding(Encoding value)

public SchemaSettings.Builder setEncoding(Encoding value)

The encoding of messages validated against schema.

.google.pubsub.v1.Encoding encoding = 2;

Parameter
NameDescription
valueEncoding

The encoding to set.

Returns
TypeDescription
SchemaSettings.Builder

This builder for chaining.

setEncodingValue(int value)

public SchemaSettings.Builder setEncodingValue(int value)

The encoding of messages validated against schema.

.google.pubsub.v1.Encoding encoding = 2;

Parameter
NameDescription
valueint

The enum numeric value on the wire for encoding to set.

Returns
TypeDescription
SchemaSettings.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public SchemaSettings.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SchemaSettings.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SchemaSettings.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
SchemaSettings.Builder
Overrides

setSchema(String value)

public SchemaSettings.Builder setSchema(String value)

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.

string schema = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The schema to set.

Returns
TypeDescription
SchemaSettings.Builder

This builder for chaining.

setSchemaBytes(ByteString value)

public SchemaSettings.Builder setSchemaBytes(ByteString value)

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.

string schema = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for schema to set.

Returns
TypeDescription
SchemaSettings.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final SchemaSettings.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SchemaSettings.Builder
Overrides