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 Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ResourceSelector.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ResourceSelector.Builder>
    • internalGetFieldAccessorTable

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

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

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

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

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

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

      public ResourceSelector.Builder mergeFrom(ResourceSelector other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      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<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:
      hasGroupKind in interface ResourceSelectorOrBuilder
      Returns:
      Whether the groupKind field is set.
    • 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];
      Specified by:
      getGroupKind in interface ResourceSelectorOrBuilder
      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

      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];
    • mergeGroupKind

      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];
    • 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];
    • 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];
      Specified by:
      getGroupKindOrBuilder in interface ResourceSelectorOrBuilder
    • getName

      public 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];
      Specified by:
      getName in interface ResourceSelectorOrBuilder
      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:
      getNameBytes in interface ResourceSelectorOrBuilder
      Returns:
      The bytes for name.
    • setName

      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];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • 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];
      Returns:
      This builder for chaining.
    • setNameBytes

      public ResourceSelector.Builder setNameBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • 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](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:
      getNamespace in interface ResourceSelectorOrBuilder
      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:
      getNamespaceBytes in interface ResourceSelectorOrBuilder
      Returns:
      The bytes for namespace.
    • setNamespace

      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](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

      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](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

      public ResourceSelector.Builder setNamespaceBytes(com.google.protobuf.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](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: ResourceSelectorOrBuilder
       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:
      getLabelsCount in interface ResourceSelectorOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       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:
      containsLabels in interface ResourceSelectorOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface ResourceSelectorOrBuilder
    • getLabelsMap

      public Map<String,String> 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:
      getLabelsMap in interface ResourceSelectorOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       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:
      getLabelsOrDefault in interface ResourceSelectorOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       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:
      getLabelsOrThrow in interface ResourceSelectorOrBuilder
    • clearLabels

      public ResourceSelector.Builder clearLabels()
    • removeLabels

      public ResourceSelector.Builder removeLabels(String key)
       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 public Map<String,String> getMutableLabels()
      Deprecated.
      Use alternate mutation accessors instead.
    • putLabels

      public ResourceSelector.Builder putLabels(String key, String value)
       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

      public ResourceSelector.Builder putAllLabels(Map<String,String> values)
       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];