Class Schema.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Schema.Builder>
com.google.pubsub.v1.Schema.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, SchemaOrBuilder, Cloneable
Enclosing class:
Schema

public static final class Schema.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Schema.Builder> implements SchemaOrBuilder
 A schema resource.
 
Protobuf type google.pubsub.v1.Schema
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Schema.Builder>
    • clear

      public Schema.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<Schema.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Schema.Builder>
    • getDefaultInstanceForType

      public Schema getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Schema build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Schema buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public Schema.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<Schema.Builder>
    • setField

      public Schema.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<Schema.Builder>
    • clearField

      public Schema.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Schema.Builder>
    • clearOneof

      public Schema.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Schema.Builder>
    • setRepeatedField

      public Schema.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Schema.Builder>
    • addRepeatedField

      public Schema.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Schema.Builder>
    • mergeFrom

      public Schema.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Schema.Builder>
    • mergeFrom

      public Schema.Builder mergeFrom(Schema other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Schema.Builder>
    • mergeFrom

      public Schema.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Schema.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Required. Name of the schema.
       Format is `projects/{project}/schemas/{schema}`.
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getName in interface SchemaOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Required. Name of the schema.
       Format is `projects/{project}/schemas/{schema}`.
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getNameBytes in interface SchemaOrBuilder
      Returns:
      The bytes for name.
    • setName

      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];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setNameBytes

      public Schema.Builder setNameBytes(com.google.protobuf.ByteString value)
       Required. Name of the schema.
       Format is `projects/{project}/schemas/{schema}`.
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getTypeValue

      public int getTypeValue()
       The type of the schema definition.
       
      .google.pubsub.v1.Schema.Type type = 2;
      Specified by:
      getTypeValue in interface SchemaOrBuilder
      Returns:
      The enum numeric value on the wire for type.
    • setTypeValue

      public Schema.Builder setTypeValue(int value)
       The type of the schema definition.
       
      .google.pubsub.v1.Schema.Type type = 2;
      Parameters:
      value - The enum numeric value on the wire for type to set.
      Returns:
      This builder for chaining.
    • getType

      public Schema.Type getType()
       The type of the schema definition.
       
      .google.pubsub.v1.Schema.Type type = 2;
      Specified by:
      getType in interface SchemaOrBuilder
      Returns:
      The type.
    • setType

      public Schema.Builder setType(Schema.Type value)
       The type of the schema definition.
       
      .google.pubsub.v1.Schema.Type type = 2;
      Parameters:
      value - The type to set.
      Returns:
      This builder for chaining.
    • clearType

      public Schema.Builder clearType()
       The type of the schema definition.
       
      .google.pubsub.v1.Schema.Type type = 2;
      Returns:
      This builder for chaining.
    • 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;
      Specified by:
      getDefinition in interface SchemaOrBuilder
      Returns:
      The definition.
    • getDefinitionBytes

      public com.google.protobuf.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;
      Specified by:
      getDefinitionBytes in interface SchemaOrBuilder
      Returns:
      The bytes for definition.
    • setDefinition

      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;
      Parameters:
      value - The definition to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setDefinitionBytes

      public Schema.Builder setDefinitionBytes(com.google.protobuf.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;
      Parameters:
      value - The bytes for definition to set.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getRevisionId in interface SchemaOrBuilder
      Returns:
      The revisionId.
    • getRevisionIdBytes

      public com.google.protobuf.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];
      Specified by:
      getRevisionIdBytes in interface SchemaOrBuilder
      Returns:
      The bytes for revisionId.
    • setRevisionId

      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];
      Parameters:
      value - The revisionId to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setRevisionIdBytes

      public Schema.Builder setRevisionIdBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for revisionId to set.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      hasRevisionCreateTime in interface SchemaOrBuilder
      Returns:
      Whether the revisionCreateTime field is set.
    • getRevisionCreateTime

      public com.google.protobuf.Timestamp getRevisionCreateTime()
       Output only. The timestamp that the revision was created.
       
      .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getRevisionCreateTime in interface SchemaOrBuilder
      Returns:
      The revisionCreateTime.
    • setRevisionCreateTime

      public Schema.Builder setRevisionCreateTime(com.google.protobuf.Timestamp value)
       Output only. The timestamp that the revision was created.
       
      .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setRevisionCreateTime

      public Schema.Builder setRevisionCreateTime(com.google.protobuf.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];
    • mergeRevisionCreateTime

      public Schema.Builder mergeRevisionCreateTime(com.google.protobuf.Timestamp value)
       Output only. The timestamp that the revision was created.
       
      .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • 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];
    • getRevisionCreateTimeBuilder

      public com.google.protobuf.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];
    • getRevisionCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder()
       Output only. The timestamp that the revision was created.
       
      .google.protobuf.Timestamp revision_create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getRevisionCreateTimeOrBuilder in interface SchemaOrBuilder
    • setUnknownFields

      public final Schema.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Schema.Builder>
    • mergeUnknownFields

      public final Schema.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Schema.Builder>