Class Key.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Key.Builder>
com.google.privacy.dlp.v2.Key.Builder
All Implemented Interfaces:
KeyOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Key

public static final class Key.Builder extends com.google.protobuf.GeneratedMessage.Builder<Key.Builder> implements KeyOrBuilder
 A unique identifier for a Datastore entity.
 If a key's partition ID or any of its path kinds or names are
 reserved/read-only, the key is reserved/read-only.
 A reserved/read-only key is forbidden in certain documented contexts.
 
Protobuf type google.privacy.dlp.v2.Key
  • Method Details

    • getDescriptor

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

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

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

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

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

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

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

      public Key.Builder mergeFrom(Key other)
    • isInitialized

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

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

      public boolean hasPartitionId()
       Entities are partitioned into subsets, currently identified by a project
       ID and namespace ID.
       Queries are scoped to a single partition.
       
      .google.privacy.dlp.v2.PartitionId partition_id = 1;
      Specified by:
      hasPartitionId in interface KeyOrBuilder
      Returns:
      Whether the partitionId field is set.
    • getPartitionId

      public PartitionId getPartitionId()
       Entities are partitioned into subsets, currently identified by a project
       ID and namespace ID.
       Queries are scoped to a single partition.
       
      .google.privacy.dlp.v2.PartitionId partition_id = 1;
      Specified by:
      getPartitionId in interface KeyOrBuilder
      Returns:
      The partitionId.
    • setPartitionId

      public Key.Builder setPartitionId(PartitionId value)
       Entities are partitioned into subsets, currently identified by a project
       ID and namespace ID.
       Queries are scoped to a single partition.
       
      .google.privacy.dlp.v2.PartitionId partition_id = 1;
    • setPartitionId

      public Key.Builder setPartitionId(PartitionId.Builder builderForValue)
       Entities are partitioned into subsets, currently identified by a project
       ID and namespace ID.
       Queries are scoped to a single partition.
       
      .google.privacy.dlp.v2.PartitionId partition_id = 1;
    • mergePartitionId

      public Key.Builder mergePartitionId(PartitionId value)
       Entities are partitioned into subsets, currently identified by a project
       ID and namespace ID.
       Queries are scoped to a single partition.
       
      .google.privacy.dlp.v2.PartitionId partition_id = 1;
    • clearPartitionId

      public Key.Builder clearPartitionId()
       Entities are partitioned into subsets, currently identified by a project
       ID and namespace ID.
       Queries are scoped to a single partition.
       
      .google.privacy.dlp.v2.PartitionId partition_id = 1;
    • getPartitionIdBuilder

      public PartitionId.Builder getPartitionIdBuilder()
       Entities are partitioned into subsets, currently identified by a project
       ID and namespace ID.
       Queries are scoped to a single partition.
       
      .google.privacy.dlp.v2.PartitionId partition_id = 1;
    • getPartitionIdOrBuilder

      public PartitionIdOrBuilder getPartitionIdOrBuilder()
       Entities are partitioned into subsets, currently identified by a project
       ID and namespace ID.
       Queries are scoped to a single partition.
       
      .google.privacy.dlp.v2.PartitionId partition_id = 1;
      Specified by:
      getPartitionIdOrBuilder in interface KeyOrBuilder
    • getPathList

      public List<Key.PathElement> getPathList()
       The entity path.
       An entity path consists of one or more elements composed of a kind and a
       string or numerical identifier, which identify entities. The first
       element identifies a _root entity_, the second element identifies
       a _child_ of the root entity, the third element identifies a child of the
       second entity, and so forth. The entities identified by all prefixes of
       the path are called the element's _ancestors_.
      
       A path can never be empty, and a path can have at most 100 elements.
       
      repeated .google.privacy.dlp.v2.Key.PathElement path = 2;
      Specified by:
      getPathList in interface KeyOrBuilder
    • getPathCount

      public int getPathCount()
       The entity path.
       An entity path consists of one or more elements composed of a kind and a
       string or numerical identifier, which identify entities. The first
       element identifies a _root entity_, the second element identifies
       a _child_ of the root entity, the third element identifies a child of the
       second entity, and so forth. The entities identified by all prefixes of
       the path are called the element's _ancestors_.
      
       A path can never be empty, and a path can have at most 100 elements.
       
      repeated .google.privacy.dlp.v2.Key.PathElement path = 2;
      Specified by:
      getPathCount in interface KeyOrBuilder
    • getPath

      public Key.PathElement getPath(int index)
       The entity path.
       An entity path consists of one or more elements composed of a kind and a
       string or numerical identifier, which identify entities. The first
       element identifies a _root entity_, the second element identifies
       a _child_ of the root entity, the third element identifies a child of the
       second entity, and so forth. The entities identified by all prefixes of
       the path are called the element's _ancestors_.
      
       A path can never be empty, and a path can have at most 100 elements.
       
      repeated .google.privacy.dlp.v2.Key.PathElement path = 2;
      Specified by:
      getPath in interface KeyOrBuilder
    • setPath

      public Key.Builder setPath(int index, Key.PathElement value)
       The entity path.
       An entity path consists of one or more elements composed of a kind and a
       string or numerical identifier, which identify entities. The first
       element identifies a _root entity_, the second element identifies
       a _child_ of the root entity, the third element identifies a child of the
       second entity, and so forth. The entities identified by all prefixes of
       the path are called the element's _ancestors_.
      
       A path can never be empty, and a path can have at most 100 elements.
       
      repeated .google.privacy.dlp.v2.Key.PathElement path = 2;
    • setPath

      public Key.Builder setPath(int index, Key.PathElement.Builder builderForValue)
       The entity path.
       An entity path consists of one or more elements composed of a kind and a
       string or numerical identifier, which identify entities. The first
       element identifies a _root entity_, the second element identifies
       a _child_ of the root entity, the third element identifies a child of the
       second entity, and so forth. The entities identified by all prefixes of
       the path are called the element's _ancestors_.
      
       A path can never be empty, and a path can have at most 100 elements.
       
      repeated .google.privacy.dlp.v2.Key.PathElement path = 2;
    • addPath

      public Key.Builder addPath(Key.PathElement value)
       The entity path.
       An entity path consists of one or more elements composed of a kind and a
       string or numerical identifier, which identify entities. The first
       element identifies a _root entity_, the second element identifies
       a _child_ of the root entity, the third element identifies a child of the
       second entity, and so forth. The entities identified by all prefixes of
       the path are called the element's _ancestors_.
      
       A path can never be empty, and a path can have at most 100 elements.
       
      repeated .google.privacy.dlp.v2.Key.PathElement path = 2;
    • addPath

      public Key.Builder addPath(int index, Key.PathElement value)
       The entity path.
       An entity path consists of one or more elements composed of a kind and a
       string or numerical identifier, which identify entities. The first
       element identifies a _root entity_, the second element identifies
       a _child_ of the root entity, the third element identifies a child of the
       second entity, and so forth. The entities identified by all prefixes of
       the path are called the element's _ancestors_.
      
       A path can never be empty, and a path can have at most 100 elements.
       
      repeated .google.privacy.dlp.v2.Key.PathElement path = 2;
    • addPath

      public Key.Builder addPath(Key.PathElement.Builder builderForValue)
       The entity path.
       An entity path consists of one or more elements composed of a kind and a
       string or numerical identifier, which identify entities. The first
       element identifies a _root entity_, the second element identifies
       a _child_ of the root entity, the third element identifies a child of the
       second entity, and so forth. The entities identified by all prefixes of
       the path are called the element's _ancestors_.
      
       A path can never be empty, and a path can have at most 100 elements.
       
      repeated .google.privacy.dlp.v2.Key.PathElement path = 2;
    • addPath

      public Key.Builder addPath(int index, Key.PathElement.Builder builderForValue)
       The entity path.
       An entity path consists of one or more elements composed of a kind and a
       string or numerical identifier, which identify entities. The first
       element identifies a _root entity_, the second element identifies
       a _child_ of the root entity, the third element identifies a child of the
       second entity, and so forth. The entities identified by all prefixes of
       the path are called the element's _ancestors_.
      
       A path can never be empty, and a path can have at most 100 elements.
       
      repeated .google.privacy.dlp.v2.Key.PathElement path = 2;
    • addAllPath

      public Key.Builder addAllPath(Iterable<? extends Key.PathElement> values)
       The entity path.
       An entity path consists of one or more elements composed of a kind and a
       string or numerical identifier, which identify entities. The first
       element identifies a _root entity_, the second element identifies
       a _child_ of the root entity, the third element identifies a child of the
       second entity, and so forth. The entities identified by all prefixes of
       the path are called the element's _ancestors_.
      
       A path can never be empty, and a path can have at most 100 elements.
       
      repeated .google.privacy.dlp.v2.Key.PathElement path = 2;
    • clearPath

      public Key.Builder clearPath()
       The entity path.
       An entity path consists of one or more elements composed of a kind and a
       string or numerical identifier, which identify entities. The first
       element identifies a _root entity_, the second element identifies
       a _child_ of the root entity, the third element identifies a child of the
       second entity, and so forth. The entities identified by all prefixes of
       the path are called the element's _ancestors_.
      
       A path can never be empty, and a path can have at most 100 elements.
       
      repeated .google.privacy.dlp.v2.Key.PathElement path = 2;
    • removePath

      public Key.Builder removePath(int index)
       The entity path.
       An entity path consists of one or more elements composed of a kind and a
       string or numerical identifier, which identify entities. The first
       element identifies a _root entity_, the second element identifies
       a _child_ of the root entity, the third element identifies a child of the
       second entity, and so forth. The entities identified by all prefixes of
       the path are called the element's _ancestors_.
      
       A path can never be empty, and a path can have at most 100 elements.
       
      repeated .google.privacy.dlp.v2.Key.PathElement path = 2;
    • getPathBuilder

      public Key.PathElement.Builder getPathBuilder(int index)
       The entity path.
       An entity path consists of one or more elements composed of a kind and a
       string or numerical identifier, which identify entities. The first
       element identifies a _root entity_, the second element identifies
       a _child_ of the root entity, the third element identifies a child of the
       second entity, and so forth. The entities identified by all prefixes of
       the path are called the element's _ancestors_.
      
       A path can never be empty, and a path can have at most 100 elements.
       
      repeated .google.privacy.dlp.v2.Key.PathElement path = 2;
    • getPathOrBuilder

      public Key.PathElementOrBuilder getPathOrBuilder(int index)
       The entity path.
       An entity path consists of one or more elements composed of a kind and a
       string or numerical identifier, which identify entities. The first
       element identifies a _root entity_, the second element identifies
       a _child_ of the root entity, the third element identifies a child of the
       second entity, and so forth. The entities identified by all prefixes of
       the path are called the element's _ancestors_.
      
       A path can never be empty, and a path can have at most 100 elements.
       
      repeated .google.privacy.dlp.v2.Key.PathElement path = 2;
      Specified by:
      getPathOrBuilder in interface KeyOrBuilder
    • getPathOrBuilderList

      public List<? extends Key.PathElementOrBuilder> getPathOrBuilderList()
       The entity path.
       An entity path consists of one or more elements composed of a kind and a
       string or numerical identifier, which identify entities. The first
       element identifies a _root entity_, the second element identifies
       a _child_ of the root entity, the third element identifies a child of the
       second entity, and so forth. The entities identified by all prefixes of
       the path are called the element's _ancestors_.
      
       A path can never be empty, and a path can have at most 100 elements.
       
      repeated .google.privacy.dlp.v2.Key.PathElement path = 2;
      Specified by:
      getPathOrBuilderList in interface KeyOrBuilder
    • addPathBuilder

      public Key.PathElement.Builder addPathBuilder()
       The entity path.
       An entity path consists of one or more elements composed of a kind and a
       string or numerical identifier, which identify entities. The first
       element identifies a _root entity_, the second element identifies
       a _child_ of the root entity, the third element identifies a child of the
       second entity, and so forth. The entities identified by all prefixes of
       the path are called the element's _ancestors_.
      
       A path can never be empty, and a path can have at most 100 elements.
       
      repeated .google.privacy.dlp.v2.Key.PathElement path = 2;
    • addPathBuilder

      public Key.PathElement.Builder addPathBuilder(int index)
       The entity path.
       An entity path consists of one or more elements composed of a kind and a
       string or numerical identifier, which identify entities. The first
       element identifies a _root entity_, the second element identifies
       a _child_ of the root entity, the third element identifies a child of the
       second entity, and so forth. The entities identified by all prefixes of
       the path are called the element's _ancestors_.
      
       A path can never be empty, and a path can have at most 100 elements.
       
      repeated .google.privacy.dlp.v2.Key.PathElement path = 2;
    • getPathBuilderList

      public List<Key.PathElement.Builder> getPathBuilderList()
       The entity path.
       An entity path consists of one or more elements composed of a kind and a
       string or numerical identifier, which identify entities. The first
       element identifies a _root entity_, the second element identifies
       a _child_ of the root entity, the third element identifies a child of the
       second entity, and so forth. The entities identified by all prefixes of
       the path are called the element's _ancestors_.
      
       A path can never be empty, and a path can have at most 100 elements.
       
      repeated .google.privacy.dlp.v2.Key.PathElement path = 2;