Class EntityFilter.Builder (2.18.5)

public static final class EntityFilter.Builder extends GeneratedMessageV3.Builder<EntityFilter.Builder> implements EntityFilterOrBuilder

Identifies a subset of entities in a project. This is specified as combinations of kinds and namespaces (either or both of which may be all, as described in the following examples). Example usage:

Entire project: kinds=[], namespace_ids=[]

Kinds Foo and Bar in all namespaces: kinds=['Foo', 'Bar'], namespace_ids=[]

Kinds Foo and Bar only in the default namespace: kinds=['Foo', 'Bar'], namespace_ids=['']

Kinds Foo and Bar in both the default and Baz namespaces: kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz']

The entire Baz namespace: kinds=[], namespace_ids=['Baz']

Protobuf type google.datastore.admin.v1.EntityFilter

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllKinds(Iterable<String> values)

public EntityFilter.Builder addAllKinds(Iterable<String> values)

If empty, then this represents all kinds.

repeated string kinds = 1;

Parameter
NameDescription
valuesIterable<String>

The kinds to add.

Returns
TypeDescription
EntityFilter.Builder

This builder for chaining.

addAllNamespaceIds(Iterable<String> values)

public EntityFilter.Builder addAllNamespaceIds(Iterable<String> values)

An empty list represents all namespaces. This is the preferred usage for projects that don't use namespaces.

An empty string element represents the default namespace. This should be used if the project has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique.

repeated string namespace_ids = 2;

Parameter
NameDescription
valuesIterable<String>

The namespaceIds to add.

Returns
TypeDescription
EntityFilter.Builder

This builder for chaining.

addKinds(String value)

public EntityFilter.Builder addKinds(String value)

If empty, then this represents all kinds.

repeated string kinds = 1;

Parameter
NameDescription
valueString

The kinds to add.

Returns
TypeDescription
EntityFilter.Builder

This builder for chaining.

addKindsBytes(ByteString value)

public EntityFilter.Builder addKindsBytes(ByteString value)

If empty, then this represents all kinds.

repeated string kinds = 1;

Parameter
NameDescription
valueByteString

The bytes of the kinds to add.

Returns
TypeDescription
EntityFilter.Builder

This builder for chaining.

addNamespaceIds(String value)

public EntityFilter.Builder addNamespaceIds(String value)

An empty list represents all namespaces. This is the preferred usage for projects that don't use namespaces.

An empty string element represents the default namespace. This should be used if the project has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique.

repeated string namespace_ids = 2;

Parameter
NameDescription
valueString

The namespaceIds to add.

Returns
TypeDescription
EntityFilter.Builder

This builder for chaining.

addNamespaceIdsBytes(ByteString value)

public EntityFilter.Builder addNamespaceIdsBytes(ByteString value)

An empty list represents all namespaces. This is the preferred usage for projects that don't use namespaces.

An empty string element represents the default namespace. This should be used if the project has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique.

repeated string namespace_ids = 2;

Parameter
NameDescription
valueByteString

The bytes of the namespaceIds to add.

Returns
TypeDescription
EntityFilter.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public EntityFilter.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
EntityFilter.Builder
Overrides

build()

public EntityFilter build()
Returns
TypeDescription
EntityFilter

buildPartial()

public EntityFilter buildPartial()
Returns
TypeDescription
EntityFilter

clear()

public EntityFilter.Builder clear()
Returns
TypeDescription
EntityFilter.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public EntityFilter.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
EntityFilter.Builder
Overrides

clearKinds()

public EntityFilter.Builder clearKinds()

If empty, then this represents all kinds.

repeated string kinds = 1;

Returns
TypeDescription
EntityFilter.Builder

This builder for chaining.

clearNamespaceIds()

public EntityFilter.Builder clearNamespaceIds()

An empty list represents all namespaces. This is the preferred usage for projects that don't use namespaces.

An empty string element represents the default namespace. This should be used if the project has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique.

repeated string namespace_ids = 2;

Returns
TypeDescription
EntityFilter.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public EntityFilter.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
EntityFilter.Builder
Overrides

clone()

public EntityFilter.Builder clone()
Returns
TypeDescription
EntityFilter.Builder
Overrides

getDefaultInstanceForType()

public EntityFilter getDefaultInstanceForType()
Returns
TypeDescription
EntityFilter

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getKinds(int index)

public String getKinds(int index)

If empty, then this represents all kinds.

repeated string kinds = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The kinds at the given index.

getKindsBytes(int index)

public ByteString getKindsBytes(int index)

If empty, then this represents all kinds.

repeated string kinds = 1;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the kinds at the given index.

getKindsCount()

public int getKindsCount()

If empty, then this represents all kinds.

repeated string kinds = 1;

Returns
TypeDescription
int

The count of kinds.

getKindsList()

public ProtocolStringList getKindsList()

If empty, then this represents all kinds.

repeated string kinds = 1;

Returns
TypeDescription
ProtocolStringList

A list containing the kinds.

getNamespaceIds(int index)

public String getNamespaceIds(int index)

An empty list represents all namespaces. This is the preferred usage for projects that don't use namespaces.

An empty string element represents the default namespace. This should be used if the project has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique.

repeated string namespace_ids = 2;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The namespaceIds at the given index.

getNamespaceIdsBytes(int index)

public ByteString getNamespaceIdsBytes(int index)

An empty list represents all namespaces. This is the preferred usage for projects that don't use namespaces.

An empty string element represents the default namespace. This should be used if the project has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique.

repeated string namespace_ids = 2;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the namespaceIds at the given index.

getNamespaceIdsCount()

public int getNamespaceIdsCount()

An empty list represents all namespaces. This is the preferred usage for projects that don't use namespaces.

An empty string element represents the default namespace. This should be used if the project has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique.

repeated string namespace_ids = 2;

Returns
TypeDescription
int

The count of namespaceIds.

getNamespaceIdsList()

public ProtocolStringList getNamespaceIdsList()

An empty list represents all namespaces. This is the preferred usage for projects that don't use namespaces.

An empty string element represents the default namespace. This should be used if the project has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique.

repeated string namespace_ids = 2;

Returns
TypeDescription
ProtocolStringList

A list containing the namespaceIds.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(EntityFilter other)

public EntityFilter.Builder mergeFrom(EntityFilter other)
Parameter
NameDescription
otherEntityFilter
Returns
TypeDescription
EntityFilter.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public EntityFilter.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EntityFilter.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public EntityFilter.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
EntityFilter.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final EntityFilter.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
EntityFilter.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public EntityFilter.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
EntityFilter.Builder
Overrides

setKinds(int index, String value)

public EntityFilter.Builder setKinds(int index, String value)

If empty, then this represents all kinds.

repeated string kinds = 1;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The kinds to set.

Returns
TypeDescription
EntityFilter.Builder

This builder for chaining.

setNamespaceIds(int index, String value)

public EntityFilter.Builder setNamespaceIds(int index, String value)

An empty list represents all namespaces. This is the preferred usage for projects that don't use namespaces.

An empty string element represents the default namespace. This should be used if the project has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique.

repeated string namespace_ids = 2;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The namespaceIds to set.

Returns
TypeDescription
EntityFilter.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public EntityFilter.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
EntityFilter.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final EntityFilter.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
EntityFilter.Builder
Overrides