public final class ResourceSelector extends GeneratedMessageV3 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.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
GROUP_KIND_FIELD_NUMBER
public static final int GROUP_KIND_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
NAMESPACE_FIELD_NUMBER
public static final int NAMESPACE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static ResourceSelector getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static ResourceSelector.Builder newBuilder()
newBuilder(ResourceSelector prototype)
public static ResourceSelector.Builder newBuilder(ResourceSelector prototype)
public static ResourceSelector parseDelimitedFrom(InputStream input)
public static ResourceSelector parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static ResourceSelector parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static ResourceSelector parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static ResourceSelector parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ResourceSelector parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ResourceSelector parseFrom(CodedInputStream input)
public static ResourceSelector parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static ResourceSelector parseFrom(InputStream input)
public static ResourceSelector parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static ResourceSelector parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static ResourceSelector parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<ResourceSelector> parser()
Methods
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
|
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
getDefaultInstanceForType()
public ResourceSelector getDefaultInstanceForType()
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];
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 |
|
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.
|
getParserForType()
public Parser<ResourceSelector> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
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.
|
hashCode()
Returns |
Type |
Description |
int |
|
Overrides
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.internalGetMapFieldReflection(int)
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public ResourceSelector.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected ResourceSelector.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public ResourceSelector.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides