Class Schema.Builder (1.116.4)

public static final class Schema.Builder extends GeneratedMessageV3.Builder<Schema.Builder> implements SchemaOrBuilder

A schema resource.

Protobuf type google.pubsub.v1.Schema

Implements

SchemaOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Schema build()
Returns
TypeDescription
Schema

buildPartial()

public Schema buildPartial()
Returns
TypeDescription
Schema

clear()

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

clearDefinition()

public Schema.Builder clearDefinition()

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.

string definition = 3;

Returns
TypeDescription
Schema.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public Schema.Builder clearName()

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

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Schema.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearType()

public Schema.Builder clearType()

The type of the schema definition.

.google.pubsub.v1.Schema.Type type = 2;

Returns
TypeDescription
Schema.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public Schema getDefaultInstanceForType()
Returns
TypeDescription
Schema

getDefinition()

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

string definition = 3;

Returns
TypeDescription
String

The definition.

getDefinitionBytes()

public ByteString getDefinitionBytes()

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.

string definition = 3;

Returns
TypeDescription
ByteString

The bytes for definition.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getName()

public String getName()

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

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

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

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for name.

getType()

public Schema.Type getType()

The type of the schema definition.

.google.pubsub.v1.Schema.Type type = 2;

Returns
TypeDescription
Schema.Type

The type.

getTypeValue()

public int getTypeValue()

The type of the schema definition.

.google.pubsub.v1.Schema.Type type = 2;

Returns
TypeDescription
int

The enum numeric value on the wire for type.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(Schema other)

public Schema.Builder mergeFrom(Schema other)
Parameter
NameDescription
otherSchema
Returns
TypeDescription
Schema.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setDefinition(String value)

public Schema.Builder setDefinition(String value)

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.

string definition = 3;

Parameter
NameDescription
valueString

The definition to set.

Returns
TypeDescription
Schema.Builder

This builder for chaining.

setDefinitionBytes(ByteString value)

public Schema.Builder setDefinitionBytes(ByteString value)

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.

string definition = 3;

Parameter
NameDescription
valueByteString

The bytes for definition to set.

Returns
TypeDescription
Schema.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public Schema.Builder setName(String value)

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

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Schema.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Schema.Builder setNameBytes(ByteString value)

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

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Schema.Builder

This builder for chaining.

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

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

setType(Schema.Type value)

public Schema.Builder setType(Schema.Type value)

The type of the schema definition.

.google.pubsub.v1.Schema.Type type = 2;

Parameter
NameDescription
valueSchema.Type

The type to set.

Returns
TypeDescription
Schema.Builder

This builder for chaining.

setTypeValue(int value)

public Schema.Builder setTypeValue(int value)

The type of the schema definition.

.google.pubsub.v1.Schema.Type type = 2;

Parameter
NameDescription
valueint

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

Returns
TypeDescription
Schema.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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