Class ResourceFilter.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ResourceFilter.Builder>
com.google.cloud.workloadmanager.v1.ResourceFilter.Builder
- All Implemented Interfaces:
ResourceFilterOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- ResourceFilter
public static final class ResourceFilter.Builder
extends com.google.protobuf.GeneratedMessage.Builder<ResourceFilter.Builder>
implements ResourceFilterOrBuilder
Resource filter for an evaluation defining the scope of resources to be evaluated.Protobuf type
google.cloud.workloadmanager.v1.ResourceFilter-
Method Summary
Modifier and TypeMethodDescriptionaddAllResourceIdPatterns(Iterable<String> values) The pattern to filter resources by their id For example, a pattern of ".addAllScopes(Iterable<String> values) The scopes of evaluation resource.addResourceIdPatterns(String value) The pattern to filter resources by their id For example, a pattern of ".addResourceIdPatternsBytes(com.google.protobuf.ByteString value) The pattern to filter resources by their id For example, a pattern of ".The scopes of evaluation resource.addScopesBytes(com.google.protobuf.ByteString value) The scopes of evaluation resource.build()clear()Filter compute engine resources.The pattern to filter resources by their id For example, a pattern of ".The scopes of evaluation resource.booleanLabels to filter resources by.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorFilter compute engine resources.Filter compute engine resources.Filter compute engine resources.Deprecated.intLabels to filter resources by.Labels to filter resources by.getInclusionLabelsOrDefault(String key, String defaultValue) Labels to filter resources by.Labels to filter resources by.Deprecated.getResourceIdPatterns(int index) The pattern to filter resources by their id For example, a pattern of ".com.google.protobuf.ByteStringgetResourceIdPatternsBytes(int index) The pattern to filter resources by their id For example, a pattern of ".intThe pattern to filter resources by their id For example, a pattern of ".com.google.protobuf.ProtocolStringListThe pattern to filter resources by their id For example, a pattern of ".getScopes(int index) The scopes of evaluation resource.com.google.protobuf.ByteStringgetScopesBytes(int index) The scopes of evaluation resource.intThe scopes of evaluation resource.com.google.protobuf.ProtocolStringListThe scopes of evaluation resource.booleanFilter compute engine resources.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeFrom(ResourceFilter other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Filter compute engine resources.putAllInclusionLabels(Map<String, String> values) Labels to filter resources by.putInclusionLabels(String key, String value) Labels to filter resources by.Labels to filter resources by.Filter compute engine resources.setGceInstanceFilter(GceInstanceFilter.Builder builderForValue) Filter compute engine resources.setResourceIdPatterns(int index, String value) The pattern to filter resources by their id For example, a pattern of ".The scopes of evaluation resource.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<ResourceFilter.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<ResourceFilter.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<ResourceFilter.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<ResourceFilter.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<ResourceFilter.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<ResourceFilter.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<ResourceFilter.Builder>
-
mergeFrom
public ResourceFilter.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<ResourceFilter.Builder>- Throws:
IOException
-
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:
getScopesListin interfaceResourceFilterOrBuilder- 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:
getScopesCountin interfaceResourceFilterOrBuilder- Returns:
- The count of scopes.
-
getScopes
The scopes of evaluation resource. Format: * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`repeated string scopes = 1;- Specified by:
getScopesin interfaceResourceFilterOrBuilder- 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:
getScopesBytesin interfaceResourceFilterOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the scopes at the given index.
-
setScopes
The scopes of evaluation resource. Format: * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`repeated string scopes = 1;- Parameters:
index- The index to set the value at.value- The scopes to set.- Returns:
- This builder for chaining.
-
addScopes
The scopes of evaluation resource. Format: * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`repeated string scopes = 1;- Parameters:
value- The scopes to add.- Returns:
- This builder for chaining.
-
addAllScopes
The scopes of evaluation resource. Format: * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`repeated string scopes = 1;- Parameters:
values- The scopes to add.- Returns:
- This builder for chaining.
-
clearScopes
The scopes of evaluation resource. Format: * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`repeated string scopes = 1;- Returns:
- This builder for chaining.
-
addScopesBytes
The scopes of evaluation resource. Format: * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`repeated string scopes = 1;- Parameters:
value- The bytes of the scopes to add.- Returns:
- This builder for chaining.
-
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:
getResourceIdPatternsListin interfaceResourceFilterOrBuilder- 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:
getResourceIdPatternsCountin interfaceResourceFilterOrBuilder- Returns:
- The count of resourceIdPatterns.
-
getResourceIdPatterns
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:
getResourceIdPatternsin interfaceResourceFilterOrBuilder- 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:
getResourceIdPatternsBytesin interfaceResourceFilterOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the resourceIdPatterns at the given index.
-
setResourceIdPatterns
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;- Parameters:
index- The index to set the value at.value- The resourceIdPatterns to set.- Returns:
- This builder for chaining.
-
addResourceIdPatterns
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;- Parameters:
value- The resourceIdPatterns to add.- Returns:
- This builder for chaining.
-
addAllResourceIdPatterns
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;- Parameters:
values- The resourceIdPatterns to add.- Returns:
- This builder for chaining.
-
clearResourceIdPatterns
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;- Returns:
- This builder for chaining.
-
addResourceIdPatternsBytes
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;- Parameters:
value- The bytes of the resourceIdPatterns to add.- Returns:
- This builder for chaining.
-
getInclusionLabelsCount
public int getInclusionLabelsCount()Description copied from interface:ResourceFilterOrBuilderLabels 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:
getInclusionLabelsCountin interfaceResourceFilterOrBuilder
-
containsInclusionLabels
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:
containsInclusionLabelsin interfaceResourceFilterOrBuilder
-
getInclusionLabels
Deprecated.UsegetInclusionLabelsMap()instead.- Specified by:
getInclusionLabelsin interfaceResourceFilterOrBuilder
-
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:
getInclusionLabelsMapin interfaceResourceFilterOrBuilder
-
getInclusionLabelsOrDefault
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:
getInclusionLabelsOrDefaultin interfaceResourceFilterOrBuilder
-
getInclusionLabelsOrThrow
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:
getInclusionLabelsOrThrowin interfaceResourceFilterOrBuilder
-
clearInclusionLabels
-
removeInclusionLabels
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; -
getMutableInclusionLabels
Deprecated.Use alternate mutation accessors instead. -
putInclusionLabels
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; -
putAllInclusionLabels
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; -
hasGceInstanceFilter
public boolean hasGceInstanceFilter()Filter compute engine resources.
.google.cloud.workloadmanager.v1.GceInstanceFilter gce_instance_filter = 4;- Specified by:
hasGceInstanceFilterin interfaceResourceFilterOrBuilder- Returns:
- Whether the gceInstanceFilter field is set.
-
getGceInstanceFilter
Filter compute engine resources.
.google.cloud.workloadmanager.v1.GceInstanceFilter gce_instance_filter = 4;- Specified by:
getGceInstanceFilterin interfaceResourceFilterOrBuilder- Returns:
- The gceInstanceFilter.
-
setGceInstanceFilter
Filter compute engine resources.
.google.cloud.workloadmanager.v1.GceInstanceFilter gce_instance_filter = 4; -
setGceInstanceFilter
Filter compute engine resources.
.google.cloud.workloadmanager.v1.GceInstanceFilter gce_instance_filter = 4; -
mergeGceInstanceFilter
Filter compute engine resources.
.google.cloud.workloadmanager.v1.GceInstanceFilter gce_instance_filter = 4; -
clearGceInstanceFilter
Filter compute engine resources.
.google.cloud.workloadmanager.v1.GceInstanceFilter gce_instance_filter = 4; -
getGceInstanceFilterBuilder
Filter compute engine resources.
.google.cloud.workloadmanager.v1.GceInstanceFilter gce_instance_filter = 4; -
getGceInstanceFilterOrBuilder
Filter compute engine resources.
.google.cloud.workloadmanager.v1.GceInstanceFilter gce_instance_filter = 4;- Specified by:
getGceInstanceFilterOrBuilderin interfaceResourceFilterOrBuilder
-