Class ResourceFilter

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.workloadmanager.v1.ResourceFilter
All Implemented Interfaces:
ResourceFilterOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class ResourceFilter extends com.google.protobuf.GeneratedMessage implements ResourceFilterOrBuilder
 Resource filter for an evaluation defining the scope of resources to be
 evaluated.
 
Protobuf type google.cloud.workloadmanager.v1.ResourceFilter
See Also:
  • Field Details

    • SCOPES_FIELD_NUMBER

      public static final int SCOPES_FIELD_NUMBER
      See Also:
    • RESOURCE_ID_PATTERNS_FIELD_NUMBER

      public static final int RESOURCE_ID_PATTERNS_FIELD_NUMBER
      See Also:
    • INCLUSION_LABELS_FIELD_NUMBER

      public static final int INCLUSION_LABELS_FIELD_NUMBER
      See Also:
    • GCE_INSTANCE_FILTER_FIELD_NUMBER

      public static final int GCE_INSTANCE_FILTER_FIELD_NUMBER
      See Also:
  • 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
    • getScopesList

      public com.google.protobuf.ProtocolStringList getScopesList()
       The scopes of evaluation resource.
       Format:
       * `projects/{project_id}`
       * `folders/{folder_id}`
       * `organizations/{organization_id}`
       
      repeated string scopes = 1;
      Specified by:
      getScopesList in interface ResourceFilterOrBuilder
      Returns:
      A list containing the scopes.
    • getScopesCount

      public int getScopesCount()
       The scopes of evaluation resource.
       Format:
       * `projects/{project_id}`
       * `folders/{folder_id}`
       * `organizations/{organization_id}`
       
      repeated string scopes = 1;
      Specified by:
      getScopesCount in interface ResourceFilterOrBuilder
      Returns:
      The count of scopes.
    • getScopes

      public String getScopes(int index)
       The scopes of evaluation resource.
       Format:
       * `projects/{project_id}`
       * `folders/{folder_id}`
       * `organizations/{organization_id}`
       
      repeated string scopes = 1;
      Specified by:
      getScopes in interface ResourceFilterOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The scopes at the given index.
    • getScopesBytes

      public com.google.protobuf.ByteString getScopesBytes(int index)
       The scopes of evaluation resource.
       Format:
       * `projects/{project_id}`
       * `folders/{folder_id}`
       * `organizations/{organization_id}`
       
      repeated string scopes = 1;
      Specified by:
      getScopesBytes in interface ResourceFilterOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the scopes at the given index.
    • getResourceIdPatternsList

      public com.google.protobuf.ProtocolStringList getResourceIdPatternsList()
       The pattern to filter resources by their id
       For example, a pattern of ".*prod-cluster.*" will match all resources that
       contain "prod-cluster" in their ID.
       
      repeated string resource_id_patterns = 2;
      Specified by:
      getResourceIdPatternsList in interface ResourceFilterOrBuilder
      Returns:
      A list containing the resourceIdPatterns.
    • getResourceIdPatternsCount

      public int getResourceIdPatternsCount()
       The pattern to filter resources by their id
       For example, a pattern of ".*prod-cluster.*" will match all resources that
       contain "prod-cluster" in their ID.
       
      repeated string resource_id_patterns = 2;
      Specified by:
      getResourceIdPatternsCount in interface ResourceFilterOrBuilder
      Returns:
      The count of resourceIdPatterns.
    • getResourceIdPatterns

      public String getResourceIdPatterns(int index)
       The pattern to filter resources by their id
       For example, a pattern of ".*prod-cluster.*" will match all resources that
       contain "prod-cluster" in their ID.
       
      repeated string resource_id_patterns = 2;
      Specified by:
      getResourceIdPatterns in interface ResourceFilterOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The resourceIdPatterns at the given index.
    • getResourceIdPatternsBytes

      public com.google.protobuf.ByteString getResourceIdPatternsBytes(int index)
       The pattern to filter resources by their id
       For example, a pattern of ".*prod-cluster.*" will match all resources that
       contain "prod-cluster" in their ID.
       
      repeated string resource_id_patterns = 2;
      Specified by:
      getResourceIdPatternsBytes in interface ResourceFilterOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the resourceIdPatterns at the given index.
    • getInclusionLabelsCount

      public int getInclusionLabelsCount()
      Description copied from interface: ResourceFilterOrBuilder
       Labels to filter resources by. Each key-value pair in the map must exist
       on the resource for it to be included (e.g. VM instance labels).
       For example, specifying `{ "env": "prod", "database": "nosql" }` will only
       include resources that have labels `env=prod` and `database=nosql`.
       
      map<string, string> inclusion_labels = 3;
      Specified by:
      getInclusionLabelsCount in interface ResourceFilterOrBuilder
    • containsInclusionLabels

      public boolean containsInclusionLabels(String key)
       Labels to filter resources by. Each key-value pair in the map must exist
       on the resource for it to be included (e.g. VM instance labels).
       For example, specifying `{ "env": "prod", "database": "nosql" }` will only
       include resources that have labels `env=prod` and `database=nosql`.
       
      map<string, string> inclusion_labels = 3;
      Specified by:
      containsInclusionLabels in interface ResourceFilterOrBuilder
    • getInclusionLabels

      @Deprecated public Map<String,String> getInclusionLabels()
      Deprecated.
      Specified by:
      getInclusionLabels in interface ResourceFilterOrBuilder
    • getInclusionLabelsMap

      public Map<String,String> getInclusionLabelsMap()
       Labels to filter resources by. Each key-value pair in the map must exist
       on the resource for it to be included (e.g. VM instance labels).
       For example, specifying `{ "env": "prod", "database": "nosql" }` will only
       include resources that have labels `env=prod` and `database=nosql`.
       
      map<string, string> inclusion_labels = 3;
      Specified by:
      getInclusionLabelsMap in interface ResourceFilterOrBuilder
    • getInclusionLabelsOrDefault

      public String getInclusionLabelsOrDefault(String key, String defaultValue)
       Labels to filter resources by. Each key-value pair in the map must exist
       on the resource for it to be included (e.g. VM instance labels).
       For example, specifying `{ "env": "prod", "database": "nosql" }` will only
       include resources that have labels `env=prod` and `database=nosql`.
       
      map<string, string> inclusion_labels = 3;
      Specified by:
      getInclusionLabelsOrDefault in interface ResourceFilterOrBuilder
    • getInclusionLabelsOrThrow

      public String getInclusionLabelsOrThrow(String key)
       Labels to filter resources by. Each key-value pair in the map must exist
       on the resource for it to be included (e.g. VM instance labels).
       For example, specifying `{ "env": "prod", "database": "nosql" }` will only
       include resources that have labels `env=prod` and `database=nosql`.
       
      map<string, string> inclusion_labels = 3;
      Specified by:
      getInclusionLabelsOrThrow in interface ResourceFilterOrBuilder
    • hasGceInstanceFilter

      public boolean hasGceInstanceFilter()
       Filter compute engine resources.
       
      .google.cloud.workloadmanager.v1.GceInstanceFilter gce_instance_filter = 4;
      Specified by:
      hasGceInstanceFilter in interface ResourceFilterOrBuilder
      Returns:
      Whether the gceInstanceFilter field is set.
    • getGceInstanceFilter

      public GceInstanceFilter getGceInstanceFilter()
       Filter compute engine resources.
       
      .google.cloud.workloadmanager.v1.GceInstanceFilter gce_instance_filter = 4;
      Specified by:
      getGceInstanceFilter in interface ResourceFilterOrBuilder
      Returns:
      The gceInstanceFilter.
    • getGceInstanceFilterOrBuilder

      public GceInstanceFilterOrBuilder getGceInstanceFilterOrBuilder()
       Filter compute engine resources.
       
      .google.cloud.workloadmanager.v1.GceInstanceFilter gce_instance_filter = 4;
      Specified by:
      getGceInstanceFilterOrBuilder in interface ResourceFilterOrBuilder
    • 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 ResourceFilter parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static ResourceFilter.Builder newBuilder()
    • newBuilder

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

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

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

      public static ResourceFilter getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<ResourceFilter> 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 ResourceFilter getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder