Class SchemaSettings.Builder (1.117.0)
Note: Some or all of the information on this page might not apply
to Trusted Cloud. For a list of services that are available in
Trusted Cloud, see Services available for
Trusted Cloud .
Version 1.117.0keyboard_arrow_down
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
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public SchemaSettings . Builder addRepeatedField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
build()
public SchemaSettings build ()
Returns
buildPartial()
public SchemaSettings buildPartial ()
Returns
clear()
public SchemaSettings . Builder clear ()
Returns
Overrides
clearEncoding()
public SchemaSettings . Builder clearEncoding ()
The encoding of messages validated against schema
.
.google.pubsub.v1.Encoding encoding = 2;
Returns
clearField(Descriptors.FieldDescriptor field)
public SchemaSettings . Builder clearField ( Descriptors . FieldDescriptor field )
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public SchemaSettings . Builder clearOneof ( Descriptors . OneofDescriptor oneof )
Parameter
Returns
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
clone()
public SchemaSettings . Builder clone ()
Returns
Overrides
getDefaultInstanceForType()
public SchemaSettings getDefaultInstanceForType ()
Returns
getDescriptorForType()
public Descriptors . Descriptor getDescriptorForType ()
Returns
Overrides
getEncoding()
public Encoding getEncoding ()
The encoding of messages validated against schema
.
.google.pubsub.v1.Encoding encoding = 2;
Returns
getEncodingValue()
public int getEncodingValue ()
The encoding of messages validated against schema
.
.google.pubsub.v1.Encoding encoding = 2;
Returns
Type
Description
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
Type
Description
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
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Returns
Overrides
isInitialized()
public final boolean isInitialized ()
Returns
Overrides
public SchemaSettings . Builder mergeFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public SchemaSettings . Builder mergeFrom ( Message other )
Parameter
Returns
Overrides
mergeFrom(SchemaSettings other)
public SchemaSettings . Builder mergeFrom ( SchemaSettings other )
Parameter
Returns
mergeUnknownFields(UnknownFieldSet unknownFields)
public final SchemaSettings . Builder mergeUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
Overrides
setEncoding(Encoding value)
public SchemaSettings . Builder setEncoding ( Encoding value )
The encoding of messages validated against schema
.
.google.pubsub.v1.Encoding encoding = 2;
Parameter
Name
Description
value
Encoding
The encoding to set.
Returns
setEncodingValue(int value)
public SchemaSettings . Builder setEncodingValue ( int value )
The encoding of messages validated against schema
.
.google.pubsub.v1.Encoding encoding = 2;
Parameter
Name
Description
value
int
The enum numeric value on the wire for encoding to set.
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public SchemaSettings . Builder setField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public SchemaSettings . Builder setRepeatedField ( Descriptors . FieldDescriptor field , int index , Object value )
Parameters
Returns
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
Name
Description
value
String
The schema to set.
Returns
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
Name
Description
value
ByteString
The bytes for schema to set.
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final SchemaSettings . Builder setUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
Overrides
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-16 UTC."],[],[]]