Class Key.PathElement.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Key.PathElement.Builder>
com.google.datastore.v1.Key.PathElement.Builder
All Implemented Interfaces:
Key.PathElementOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Key.PathElement

public static final class Key.PathElement.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Key.PathElement.Builder> implements Key.PathElementOrBuilder
 A (kind, ID/name) pair used to construct a key path.

 If either name or ID is set, the element is complete.
 If neither is set, the element is incomplete.
 
Protobuf type google.datastore.v1.Key.PathElement
  • 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<Key.PathElement.Builder>
    • clear

      public Key.PathElement.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<Key.PathElement.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<Key.PathElement.Builder>
    • getDefaultInstanceForType

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

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

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

      public Key.PathElement.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<Key.PathElement.Builder>
    • setField

      public Key.PathElement.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<Key.PathElement.Builder>
    • clearField

      public Key.PathElement.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<Key.PathElement.Builder>
    • clearOneof

      public Key.PathElement.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<Key.PathElement.Builder>
    • setRepeatedField

      public Key.PathElement.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<Key.PathElement.Builder>
    • addRepeatedField

      public Key.PathElement.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<Key.PathElement.Builder>
    • mergeFrom

      public Key.PathElement.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<Key.PathElement.Builder>
    • mergeFrom

      public Key.PathElement.Builder mergeFrom(Key.PathElement other)
    • isInitialized

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

      public Key.PathElement.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<Key.PathElement.Builder>
      Throws:
      IOException
    • getIdTypeCase

      public Key.PathElement.IdTypeCase getIdTypeCase()
      Specified by:
      getIdTypeCase in interface Key.PathElementOrBuilder
    • clearIdType

      public Key.PathElement.Builder clearIdType()
    • getKind

      public String getKind()
       The kind of the entity.
      
       A kind matching regex `__.*__` is reserved/read-only.
       A kind must not contain more than 1500 bytes when UTF-8 encoded.
       Cannot be `""`.
      
       Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
       encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
       bytes.
       
      string kind = 1;
      Specified by:
      getKind in interface Key.PathElementOrBuilder
      Returns:
      The kind.
    • getKindBytes

      public com.google.protobuf.ByteString getKindBytes()
       The kind of the entity.
      
       A kind matching regex `__.*__` is reserved/read-only.
       A kind must not contain more than 1500 bytes when UTF-8 encoded.
       Cannot be `""`.
      
       Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
       encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
       bytes.
       
      string kind = 1;
      Specified by:
      getKindBytes in interface Key.PathElementOrBuilder
      Returns:
      The bytes for kind.
    • setKind

      public Key.PathElement.Builder setKind(String value)
       The kind of the entity.
      
       A kind matching regex `__.*__` is reserved/read-only.
       A kind must not contain more than 1500 bytes when UTF-8 encoded.
       Cannot be `""`.
      
       Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
       encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
       bytes.
       
      string kind = 1;
      Parameters:
      value - The kind to set.
      Returns:
      This builder for chaining.
    • clearKind

      public Key.PathElement.Builder clearKind()
       The kind of the entity.
      
       A kind matching regex `__.*__` is reserved/read-only.
       A kind must not contain more than 1500 bytes when UTF-8 encoded.
       Cannot be `""`.
      
       Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
       encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
       bytes.
       
      string kind = 1;
      Returns:
      This builder for chaining.
    • setKindBytes

      public Key.PathElement.Builder setKindBytes(com.google.protobuf.ByteString value)
       The kind of the entity.
      
       A kind matching regex `__.*__` is reserved/read-only.
       A kind must not contain more than 1500 bytes when UTF-8 encoded.
       Cannot be `""`.
      
       Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
       encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
       bytes.
       
      string kind = 1;
      Parameters:
      value - The bytes for kind to set.
      Returns:
      This builder for chaining.
    • hasId

      public boolean hasId()
       The auto-allocated ID of the entity.
      
       Never equal to zero. Values less than zero are discouraged and may not
       be supported in the future.
       
      int64 id = 2;
      Specified by:
      hasId in interface Key.PathElementOrBuilder
      Returns:
      Whether the id field is set.
    • getId

      public long getId()
       The auto-allocated ID of the entity.
      
       Never equal to zero. Values less than zero are discouraged and may not
       be supported in the future.
       
      int64 id = 2;
      Specified by:
      getId in interface Key.PathElementOrBuilder
      Returns:
      The id.
    • setId

      public Key.PathElement.Builder setId(long value)
       The auto-allocated ID of the entity.
      
       Never equal to zero. Values less than zero are discouraged and may not
       be supported in the future.
       
      int64 id = 2;
      Parameters:
      value - The id to set.
      Returns:
      This builder for chaining.
    • clearId

      public Key.PathElement.Builder clearId()
       The auto-allocated ID of the entity.
      
       Never equal to zero. Values less than zero are discouraged and may not
       be supported in the future.
       
      int64 id = 2;
      Returns:
      This builder for chaining.
    • hasName

      public boolean hasName()
       The name of the entity.
      
       A name matching regex `__.*__` is reserved/read-only.
       A name must not be more than 1500 bytes when UTF-8 encoded.
       Cannot be `""`.
      
       Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
       encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
       bytes.
       
      string name = 3;
      Specified by:
      hasName in interface Key.PathElementOrBuilder
      Returns:
      Whether the name field is set.
    • getName

      public String getName()
       The name of the entity.
      
       A name matching regex `__.*__` is reserved/read-only.
       A name must not be more than 1500 bytes when UTF-8 encoded.
       Cannot be `""`.
      
       Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
       encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
       bytes.
       
      string name = 3;
      Specified by:
      getName in interface Key.PathElementOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The name of the entity.
      
       A name matching regex `__.*__` is reserved/read-only.
       A name must not be more than 1500 bytes when UTF-8 encoded.
       Cannot be `""`.
      
       Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
       encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
       bytes.
       
      string name = 3;
      Specified by:
      getNameBytes in interface Key.PathElementOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Key.PathElement.Builder setName(String value)
       The name of the entity.
      
       A name matching regex `__.*__` is reserved/read-only.
       A name must not be more than 1500 bytes when UTF-8 encoded.
       Cannot be `""`.
      
       Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
       encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
       bytes.
       
      string name = 3;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Key.PathElement.Builder clearName()
       The name of the entity.
      
       A name matching regex `__.*__` is reserved/read-only.
       A name must not be more than 1500 bytes when UTF-8 encoded.
       Cannot be `""`.
      
       Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
       encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
       bytes.
       
      string name = 3;
      Returns:
      This builder for chaining.
    • setNameBytes

      public Key.PathElement.Builder setNameBytes(com.google.protobuf.ByteString value)
       The name of the entity.
      
       A name matching regex `__.*__` is reserved/read-only.
       A name must not be more than 1500 bytes when UTF-8 encoded.
       Cannot be `""`.
      
       Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
       encoded as `__bytes<X>__` where `<X>` is the base-64 encoding of the
       bytes.
       
      string name = 3;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final Key.PathElement.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<Key.PathElement.Builder>
    • mergeUnknownFields

      public final Key.PathElement.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<Key.PathElement.Builder>