public static final class ResourceSelector.Builder extends GeneratedMessageV3.Builder<ResourceSelector.Builder> implements ResourceSelectorOrBuilder
Defines a selector to identify a single or a group of resources.
Conditions in the selector are optional, but at least one field
should be set to a non-empty value. If a condition is not specified,
no restrictions will be applied on that dimension.
If more than one condition is specified, a resource will be selected
if and only if all conditions are met.
Protobuf type google.cloud.gkebackup.v1.ResourceSelector
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public ResourceSelector.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public ResourceSelector build()
buildPartial()
public ResourceSelector buildPartial()
clear()
public ResourceSelector.Builder clear()
Overrides
clearField(Descriptors.FieldDescriptor field)
public ResourceSelector.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearGroupKind()
public ResourceSelector.Builder clearGroupKind()
Optional. Selects resources using their Kubernetes GroupKinds. If
specified, only resources of provided GroupKind will be selected.
.google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kind = 1 [(.google.api.field_behavior) = OPTIONAL];
clearLabels()
public ResourceSelector.Builder clearLabels()
clearName()
public ResourceSelector.Builder clearName()
Optional. Selects resources using their resource names. If specified,
only resources with the provided name will be selected.
string name = 2 [(.google.api.field_behavior) = OPTIONAL];
clearNamespace()
public ResourceSelector.Builder clearNamespace()
Optional. Selects resources using their namespaces. This only applies to
namespace scoped resources and cannot be used for selecting
cluster scoped resources. If specified, only resources in the provided
namespace will be selected. If not specified, the filter will apply to
both cluster scoped and namespace scoped resources (e.g. name or label).
The Namespace resource
itself will be restored if and only if any resources within the namespace
are restored.
string namespace = 3 [(.google.api.field_behavior) = OPTIONAL];
clearOneof(Descriptors.OneofDescriptor oneof)
public ResourceSelector.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clone()
public ResourceSelector.Builder clone()
Overrides
containsLabels(String key)
public boolean containsLabels(String key)
Optional. Selects resources using Kubernetes
labels.
If specified, a resource will be selected if and only if the resource
has all of the provided labels and all the label values match.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
Name |
Description |
key |
String
|
getDefaultInstanceForType()
public ResourceSelector getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getGroupKind()
public RestoreConfig.GroupKind getGroupKind()
Optional. Selects resources using their Kubernetes GroupKinds. If
specified, only resources of provided GroupKind will be selected.
.google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kind = 1 [(.google.api.field_behavior) = OPTIONAL];
getGroupKindBuilder()
public RestoreConfig.GroupKind.Builder getGroupKindBuilder()
Optional. Selects resources using their Kubernetes GroupKinds. If
specified, only resources of provided GroupKind will be selected.
.google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kind = 1 [(.google.api.field_behavior) = OPTIONAL];
getGroupKindOrBuilder()
public RestoreConfig.GroupKindOrBuilder getGroupKindOrBuilder()
Optional. Selects resources using their Kubernetes GroupKinds. If
specified, only resources of provided GroupKind will be selected.
.google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kind = 1 [(.google.api.field_behavior) = OPTIONAL];
getLabels() (deprecated)
public Map<String,String> getLabels()
getLabelsCount()
public int getLabelsCount()
Optional. Selects resources using Kubernetes
labels.
If specified, a resource will be selected if and only if the resource
has all of the provided labels and all the label values match.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
int |
|
getLabelsMap()
public Map<String,String> getLabelsMap()
Optional. Selects resources using Kubernetes
labels.
If specified, a resource will be selected if and only if the resource
has all of the provided labels and all the label values match.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
getLabelsOrDefault(String key, String defaultValue)
public String getLabelsOrDefault(String key, String defaultValue)
Optional. Selects resources using Kubernetes
labels.
If specified, a resource will be selected if and only if the resource
has all of the provided labels and all the label values match.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
String |
|
getLabelsOrThrow(String key)
public String getLabelsOrThrow(String key)
Optional. Selects resources using Kubernetes
labels.
If specified, a resource will be selected if and only if the resource
has all of the provided labels and all the label values match.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
Name |
Description |
key |
String
|
Returns |
Type |
Description |
String |
|
getMutableLabels() (deprecated)
public Map<String,String> getMutableLabels()
Use alternate mutation accessors instead.
getName()
Optional. Selects resources using their resource names. If specified,
only resources with the provided name will be selected.
string name = 2 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
String |
The name.
|
getNameBytes()
public ByteString getNameBytes()
Optional. Selects resources using their resource names. If specified,
only resources with the provided name will be selected.
string name = 2 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
ByteString |
The bytes for name.
|
getNamespace()
public String getNamespace()
Optional. Selects resources using their namespaces. This only applies to
namespace scoped resources and cannot be used for selecting
cluster scoped resources. If specified, only resources in the provided
namespace will be selected. If not specified, the filter will apply to
both cluster scoped and namespace scoped resources (e.g. name or label).
The Namespace resource
itself will be restored if and only if any resources within the namespace
are restored.
string namespace = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
String |
The namespace.
|
getNamespaceBytes()
public ByteString getNamespaceBytes()
Optional. Selects resources using their namespaces. This only applies to
namespace scoped resources and cannot be used for selecting
cluster scoped resources. If specified, only resources in the provided
namespace will be selected. If not specified, the filter will apply to
both cluster scoped and namespace scoped resources (e.g. name or label).
The Namespace resource
itself will be restored if and only if any resources within the namespace
are restored.
string namespace = 3 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
ByteString |
The bytes for namespace.
|
hasGroupKind()
public boolean hasGroupKind()
Optional. Selects resources using their Kubernetes GroupKinds. If
specified, only resources of provided GroupKind will be selected.
.google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kind = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
boolean |
Whether the groupKind field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter |
Name |
Description |
number |
int
|
Returns |
Type |
Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
internalGetMutableMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter |
Name |
Description |
number |
int
|
Returns |
Type |
Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(ResourceSelector other)
public ResourceSelector.Builder mergeFrom(ResourceSelector other)
public ResourceSelector.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public ResourceSelector.Builder mergeFrom(Message other)
Parameter |
Name |
Description |
other |
Message
|
Overrides
mergeGroupKind(RestoreConfig.GroupKind value)
public ResourceSelector.Builder mergeGroupKind(RestoreConfig.GroupKind value)
Optional. Selects resources using their Kubernetes GroupKinds. If
specified, only resources of provided GroupKind will be selected.
.google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kind = 1 [(.google.api.field_behavior) = OPTIONAL];
mergeUnknownFields(UnknownFieldSet unknownFields)
public final ResourceSelector.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
putAllLabels(Map<String,String> values)
public ResourceSelector.Builder putAllLabels(Map<String,String> values)
Optional. Selects resources using Kubernetes
labels.
If specified, a resource will be selected if and only if the resource
has all of the provided labels and all the label values match.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
putLabels(String key, String value)
public ResourceSelector.Builder putLabels(String key, String value)
Optional. Selects resources using Kubernetes
labels.
If specified, a resource will be selected if and only if the resource
has all of the provided labels and all the label values match.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
removeLabels(String key)
public ResourceSelector.Builder removeLabels(String key)
Optional. Selects resources using Kubernetes
labels.
If specified, a resource will be selected if and only if the resource
has all of the provided labels and all the label values match.
map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
Name |
Description |
key |
String
|
setField(Descriptors.FieldDescriptor field, Object value)
public ResourceSelector.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setGroupKind(RestoreConfig.GroupKind value)
public ResourceSelector.Builder setGroupKind(RestoreConfig.GroupKind value)
Optional. Selects resources using their Kubernetes GroupKinds. If
specified, only resources of provided GroupKind will be selected.
.google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kind = 1 [(.google.api.field_behavior) = OPTIONAL];
setGroupKind(RestoreConfig.GroupKind.Builder builderForValue)
public ResourceSelector.Builder setGroupKind(RestoreConfig.GroupKind.Builder builderForValue)
Optional. Selects resources using their Kubernetes GroupKinds. If
specified, only resources of provided GroupKind will be selected.
.google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kind = 1 [(.google.api.field_behavior) = OPTIONAL];
setName(String value)
public ResourceSelector.Builder setName(String value)
Optional. Selects resources using their resource names. If specified,
only resources with the provided name will be selected.
string name = 2 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
Name |
Description |
value |
String
The name to set.
|
setNameBytes(ByteString value)
public ResourceSelector.Builder setNameBytes(ByteString value)
Optional. Selects resources using their resource names. If specified,
only resources with the provided name will be selected.
string name = 2 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
Name |
Description |
value |
ByteString
The bytes for name to set.
|
setNamespace(String value)
public ResourceSelector.Builder setNamespace(String value)
Optional. Selects resources using their namespaces. This only applies to
namespace scoped resources and cannot be used for selecting
cluster scoped resources. If specified, only resources in the provided
namespace will be selected. If not specified, the filter will apply to
both cluster scoped and namespace scoped resources (e.g. name or label).
The Namespace resource
itself will be restored if and only if any resources within the namespace
are restored.
string namespace = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
Name |
Description |
value |
String
The namespace to set.
|
setNamespaceBytes(ByteString value)
public ResourceSelector.Builder setNamespaceBytes(ByteString value)
Optional. Selects resources using their namespaces. This only applies to
namespace scoped resources and cannot be used for selecting
cluster scoped resources. If specified, only resources in the provided
namespace will be selected. If not specified, the filter will apply to
both cluster scoped and namespace scoped resources (e.g. name or label).
The Namespace resource
itself will be restored if and only if any resources within the namespace
are restored.
string namespace = 3 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
Name |
Description |
value |
ByteString
The bytes for namespace to set.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public ResourceSelector.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final ResourceSelector.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides