Package com.google.cloud.gkebackup.v1
Class ResourceSelector.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ResourceSelector.Builder>
com.google.cloud.gkebackup.v1.ResourceSelector.Builder
- All Implemented Interfaces:
ResourceSelectorOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- ResourceSelector
public static final class ResourceSelector.Builder
extends com.google.protobuf.GeneratedMessage.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-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Optional.Optional.Optional.booleancontainsLabels(String key) Optional.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorOptional.Optional.Optional.Deprecated.intOptional.Optional.getLabelsOrDefault(String key, String defaultValue) Optional.getLabelsOrThrow(String key) Optional.Deprecated.getName()Optional.com.google.protobuf.ByteStringOptional.Optional.com.google.protobuf.ByteStringOptional.booleanOptional.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeFrom(ResourceSelector other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Optional.putAllLabels(Map<String, String> values) Optional.Optional.removeLabels(String key) Optional.Optional.setGroupKind(RestoreConfig.GroupKind.Builder builderForValue) Optional.Optional.setNameBytes(com.google.protobuf.ByteString value) Optional.setNamespace(String value) Optional.setNamespaceBytes(com.google.protobuf.ByteString value) Optional.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<ResourceSelector.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<ResourceSelector.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<ResourceSelector.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<ResourceSelector.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<ResourceSelector.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ResourceSelector.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<ResourceSelector.Builder>
-
mergeFrom
public ResourceSelector.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ResourceSelector.Builder>- Throws:
IOException
-
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];- Specified by:
hasGroupKindin interfaceResourceSelectorOrBuilder- Returns:
- Whether the groupKind field is set.
-
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];- Specified by:
getGroupKindin interfaceResourceSelectorOrBuilder- Returns:
- The groupKind.
-
setGroupKind
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
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]; -
mergeGroupKind
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]; -
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]; -
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
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];- Specified by:
getGroupKindOrBuilderin interfaceResourceSelectorOrBuilder
-
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];- Specified by:
getNamein interfaceResourceSelectorOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.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];- Specified by:
getNameBytesin interfaceResourceSelectorOrBuilder- Returns:
- The bytes for name.
-
setName
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];- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
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];- Returns:
- This builder for chaining.
-
setNameBytes
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];- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
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](https://pkg.go.dev/k8s.io/api/core/v1#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];- Specified by:
getNamespacein interfaceResourceSelectorOrBuilder- Returns:
- The namespace.
-
getNamespaceBytes
public com.google.protobuf.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](https://pkg.go.dev/k8s.io/api/core/v1#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];- Specified by:
getNamespaceBytesin interfaceResourceSelectorOrBuilder- Returns:
- The bytes for namespace.
-
setNamespace
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](https://pkg.go.dev/k8s.io/api/core/v1#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];- Parameters:
value- The namespace to set.- Returns:
- This builder for chaining.
-
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](https://pkg.go.dev/k8s.io/api/core/v1#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:
- This builder for chaining.
-
setNamespaceBytes
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](https://pkg.go.dev/k8s.io/api/core/v1#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];- Parameters:
value- The bytes for namespace to set.- Returns:
- This builder for chaining.
-
getLabelsCount
public int getLabelsCount()Description copied from interface:ResourceSelectorOrBuilderOptional. Selects resources using Kubernetes [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/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];- Specified by:
getLabelsCountin interfaceResourceSelectorOrBuilder
-
containsLabels
Optional. Selects resources using Kubernetes [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/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];- Specified by:
containsLabelsin interfaceResourceSelectorOrBuilder
-
getLabels
Deprecated.UsegetLabelsMap()instead.- Specified by:
getLabelsin interfaceResourceSelectorOrBuilder
-
getLabelsMap
Optional. Selects resources using Kubernetes [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/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];- Specified by:
getLabelsMapin interfaceResourceSelectorOrBuilder
-
getLabelsOrDefault
Optional. Selects resources using Kubernetes [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/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];- Specified by:
getLabelsOrDefaultin interfaceResourceSelectorOrBuilder
-
getLabelsOrThrow
Optional. Selects resources using Kubernetes [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/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];- Specified by:
getLabelsOrThrowin interfaceResourceSelectorOrBuilder
-
clearLabels
-
removeLabels
Optional. Selects resources using Kubernetes [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/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]; -
getMutableLabels
Deprecated.Use alternate mutation accessors instead. -
putLabels
Optional. Selects resources using Kubernetes [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/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]; -
putAllLabels
Optional. Selects resources using Kubernetes [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/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];
-