Class Entity.Builder

  • All Implemented Interfaces:
    EntityOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Entity

    public static final class Entity.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Entity.Builder>
    implements EntityOrBuilder
     A Datastore data object.
    
     Must not exceed 1 MiB - 4 bytes.
     
    Protobuf type google.datastore.v1.Entity
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Entity.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Entity.Builder>
      • internalGetFieldAccessorTable

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

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

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

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

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

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

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

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

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

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

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

        public Entity.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<Entity.Builder>
      • isInitialized

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

        public Entity.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<Entity.Builder>
        Throws:
        IOException
      • hasKey

        public boolean hasKey()
         The entity's key.
        
         An entity must have a key, unless otherwise documented (for example,
         an entity in `Value.entity_value` may have no key).
         An entity's kind is its key path's last element's kind,
         or null if it has no key.
         
        .google.datastore.v1.Key key = 1;
        Specified by:
        hasKey in interface EntityOrBuilder
        Returns:
        Whether the key field is set.
      • getKey

        public Key getKey()
         The entity's key.
        
         An entity must have a key, unless otherwise documented (for example,
         an entity in `Value.entity_value` may have no key).
         An entity's kind is its key path's last element's kind,
         or null if it has no key.
         
        .google.datastore.v1.Key key = 1;
        Specified by:
        getKey in interface EntityOrBuilder
        Returns:
        The key.
      • setKey

        public Entity.Builder setKey​(Key value)
         The entity's key.
        
         An entity must have a key, unless otherwise documented (for example,
         an entity in `Value.entity_value` may have no key).
         An entity's kind is its key path's last element's kind,
         or null if it has no key.
         
        .google.datastore.v1.Key key = 1;
      • setKey

        public Entity.Builder setKey​(Key.Builder builderForValue)
         The entity's key.
        
         An entity must have a key, unless otherwise documented (for example,
         an entity in `Value.entity_value` may have no key).
         An entity's kind is its key path's last element's kind,
         or null if it has no key.
         
        .google.datastore.v1.Key key = 1;
      • mergeKey

        public Entity.Builder mergeKey​(Key value)
         The entity's key.
        
         An entity must have a key, unless otherwise documented (for example,
         an entity in `Value.entity_value` may have no key).
         An entity's kind is its key path's last element's kind,
         or null if it has no key.
         
        .google.datastore.v1.Key key = 1;
      • clearKey

        public Entity.Builder clearKey()
         The entity's key.
        
         An entity must have a key, unless otherwise documented (for example,
         an entity in `Value.entity_value` may have no key).
         An entity's kind is its key path's last element's kind,
         or null if it has no key.
         
        .google.datastore.v1.Key key = 1;
      • getKeyBuilder

        public Key.Builder getKeyBuilder()
         The entity's key.
        
         An entity must have a key, unless otherwise documented (for example,
         an entity in `Value.entity_value` may have no key).
         An entity's kind is its key path's last element's kind,
         or null if it has no key.
         
        .google.datastore.v1.Key key = 1;
      • getKeyOrBuilder

        public KeyOrBuilder getKeyOrBuilder()
         The entity's key.
        
         An entity must have a key, unless otherwise documented (for example,
         an entity in `Value.entity_value` may have no key).
         An entity's kind is its key path's last element's kind,
         or null if it has no key.
         
        .google.datastore.v1.Key key = 1;
        Specified by:
        getKeyOrBuilder in interface EntityOrBuilder
      • getPropertiesCount

        public int getPropertiesCount()
        Description copied from interface: EntityOrBuilder
         The entity's properties.
         The map's keys are property names.
         A property name matching regex `__.*__` is reserved.
         A reserved property name is forbidden in certain documented contexts.
         The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
         be empty.
         
        map<string, .google.datastore.v1.Value> properties = 3;
        Specified by:
        getPropertiesCount in interface EntityOrBuilder
      • containsProperties

        public boolean containsProperties​(String key)
         The entity's properties.
         The map's keys are property names.
         A property name matching regex `__.*__` is reserved.
         A reserved property name is forbidden in certain documented contexts.
         The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
         be empty.
         
        map<string, .google.datastore.v1.Value> properties = 3;
        Specified by:
        containsProperties in interface EntityOrBuilder
      • getPropertiesMap

        public Map<String,​Value> getPropertiesMap()
         The entity's properties.
         The map's keys are property names.
         A property name matching regex `__.*__` is reserved.
         A reserved property name is forbidden in certain documented contexts.
         The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
         be empty.
         
        map<string, .google.datastore.v1.Value> properties = 3;
        Specified by:
        getPropertiesMap in interface EntityOrBuilder
      • getPropertiesOrDefault

        public Value getPropertiesOrDefault​(String key,
                                            Value defaultValue)
         The entity's properties.
         The map's keys are property names.
         A property name matching regex `__.*__` is reserved.
         A reserved property name is forbidden in certain documented contexts.
         The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
         be empty.
         
        map<string, .google.datastore.v1.Value> properties = 3;
        Specified by:
        getPropertiesOrDefault in interface EntityOrBuilder
      • getPropertiesOrThrow

        public Value getPropertiesOrThrow​(String key)
         The entity's properties.
         The map's keys are property names.
         A property name matching regex `__.*__` is reserved.
         A reserved property name is forbidden in certain documented contexts.
         The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
         be empty.
         
        map<string, .google.datastore.v1.Value> properties = 3;
        Specified by:
        getPropertiesOrThrow in interface EntityOrBuilder
      • removeProperties

        public Entity.Builder removeProperties​(String key)
         The entity's properties.
         The map's keys are property names.
         A property name matching regex `__.*__` is reserved.
         A reserved property name is forbidden in certain documented contexts.
         The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
         be empty.
         
        map<string, .google.datastore.v1.Value> properties = 3;
      • getMutableProperties

        @Deprecated
        public Map<String,​Value> getMutableProperties()
        Deprecated.
        Use alternate mutation accessors instead.
      • putProperties

        public Entity.Builder putProperties​(String key,
                                            Value value)
         The entity's properties.
         The map's keys are property names.
         A property name matching regex `__.*__` is reserved.
         A reserved property name is forbidden in certain documented contexts.
         The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
         be empty.
         
        map<string, .google.datastore.v1.Value> properties = 3;
      • putAllProperties

        public Entity.Builder putAllProperties​(Map<String,​Value> values)
         The entity's properties.
         The map's keys are property names.
         A property name matching regex `__.*__` is reserved.
         A reserved property name is forbidden in certain documented contexts.
         The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot
         be empty.
         
        map<string, .google.datastore.v1.Value> properties = 3;
      • setUnknownFields

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

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