Class Schema.Builder (1.129.1)

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
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Schema.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Schema.Builder
Overrides

build()

public Schema build()
Returns
Type Description
Schema

buildPartial()

public Schema buildPartial()
Returns
Type Description
Schema

clear()

public Schema.Builder clear()
Returns
Type Description
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
Type Description
Schema.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Schema.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
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
Type Description
Schema.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Schema.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Schema.Builder
Overrides

clearRevisionCreateTime()

public Schema.Builder clearRevisionCreateTime()

Output only. The timestamp that the revision was created.

.google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Schema.Builder

clearRevisionId()

public Schema.Builder clearRevisionId()

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

string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Schema.Builder

This builder for chaining.

clearType()

public Schema.Builder clearType()

The type of the schema definition.

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

Returns
Type Description
Schema.Builder

This builder for chaining.

clone()

public Schema.Builder clone()
Returns
Type Description
Schema.Builder
Overrides

getDefaultInstanceForType()

public Schema getDefaultInstanceForType()
Returns
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for definition.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for name.

getRevisionCreateTime()

public Timestamp getRevisionCreateTime()

Output only. The timestamp that the revision was created.

.google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The revisionCreateTime.

getRevisionCreateTimeBuilder()

public Timestamp.Builder getRevisionCreateTimeBuilder()

Output only. The timestamp that the revision was created.

.google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getRevisionCreateTimeOrBuilder()

public TimestampOrBuilder getRevisionCreateTimeOrBuilder()

Output only. The timestamp that the revision was created.

.google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getRevisionId()

public String getRevisionId()

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

string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The revisionId.

getRevisionIdBytes()

public ByteString getRevisionIdBytes()

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

string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for revisionId.

getType()

public Schema.Type getType()

The type of the schema definition.

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

Returns
Type Description
Schema.Type

The type.

getTypeValue()

public int getTypeValue()

The type of the schema definition.

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

Returns
Type Description
int

The enum numeric value on the wire for type.

hasRevisionCreateTime()

public boolean hasRevisionCreateTime()

Output only. The timestamp that the revision was created.

.google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the revisionCreateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Schema.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Schema.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Schema.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Schema.Builder
Overrides

mergeFrom(Schema other)

public Schema.Builder mergeFrom(Schema other)
Parameter
Name Description
other Schema
Returns
Type Description
Schema.Builder

mergeRevisionCreateTime(Timestamp value)

public Schema.Builder mergeRevisionCreateTime(Timestamp value)

Output only. The timestamp that the revision was created.

.google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Schema.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Schema.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
value String

The definition to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for definition to set.

Returns
Type Description
Schema.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Schema.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
value String

The name to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Schema.Builder
Overrides

setRevisionCreateTime(Timestamp value)

public Schema.Builder setRevisionCreateTime(Timestamp value)

Output only. The timestamp that the revision was created.

.google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Schema.Builder

setRevisionCreateTime(Timestamp.Builder builderForValue)

public Schema.Builder setRevisionCreateTime(Timestamp.Builder builderForValue)

Output only. The timestamp that the revision was created.

.google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Schema.Builder

setRevisionId(String value)

public Schema.Builder setRevisionId(String value)

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

string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The revisionId to set.

Returns
Type Description
Schema.Builder

This builder for chaining.

setRevisionIdBytes(ByteString value)

public Schema.Builder setRevisionIdBytes(ByteString value)

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

string revision_id = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for revisionId to set.

Returns
Type Description
Schema.Builder

This builder for chaining.

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
Name Description
value Schema.Type

The type to set.

Returns
Type Description
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
Name Description
value int

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

Returns
Type Description
Schema.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Schema.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Schema.Builder
Overrides