Class ResourceSelector

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.gkebackup.v1.ResourceSelector
All Implemented Interfaces:
ResourceSelectorOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class ResourceSelector extends com.google.protobuf.GeneratedMessage 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
See Also:
  • Field Details

  • 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
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • 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.
    • 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.
    • 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.
    • 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
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static ResourceSelector parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ResourceSelector parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ResourceSelector parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ResourceSelector parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ResourceSelector parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ResourceSelector parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static ResourceSelector parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ResourceSelector parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ResourceSelector parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static ResourceSelector parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ResourceSelector parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static ResourceSelector parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

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

      public static ResourceSelector.Builder newBuilder()
    • newBuilder

      public static ResourceSelector.Builder newBuilder(ResourceSelector prototype)
    • toBuilder

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

      protected ResourceSelector.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static ResourceSelector getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<ResourceSelector> parser()
    • getParserForType

      public com.google.protobuf.Parser<ResourceSelector> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

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