Send feedback
Class OSPolicyAssignment.LabelSet.Builder (2.4.3)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.4.3 keyboard_arrow_down
public static final class OSPolicyAssignment . LabelSet . Builder extends GeneratedMessageV3 . Builder<OSPolicyAssignment . LabelSet . Builder > implements OSPolicyAssignment . LabelSetOrBuilder
Message representing label set.
A label is a key value pair set for a VM.
A LabelSet is a set of labels.
Labels within a LabelSet are ANDed. In other words, a LabelSet is
applicable for a VM only if it matches all the labels in the
LabelSet.
Example: A LabelSet with 2 labels: env=prod
and type=webserver
will
only be applicable for those VMs with both labels
present.
Protobuf type google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet
Static Methods
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public OSPolicyAssignment . LabelSet . Builder addRepeatedField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
build()
public OSPolicyAssignment . LabelSet build ()
Returns
buildPartial()
public OSPolicyAssignment . LabelSet buildPartial ()
Returns
clear()
public OSPolicyAssignment . LabelSet . Builder clear ()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public OSPolicyAssignment . LabelSet . Builder clearField ( Descriptors . FieldDescriptor field )
Parameter
Returns
Overrides
clearLabels()
public OSPolicyAssignment . LabelSet . Builder clearLabels ()
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public OSPolicyAssignment . LabelSet . Builder clearOneof ( Descriptors . OneofDescriptor oneof )
Parameter
Returns
Overrides
clone()
public OSPolicyAssignment . LabelSet . Builder clone ()
Returns
Overrides
containsLabels(String key)
public boolean containsLabels ( String key )
Labels are identified by key/value pairs in this map.
A VM should contain all the key/value pairs specified in this
map to be selected.
map<string, string> labels = 1;
Parameter
Returns
getDefaultInstanceForType()
public OSPolicyAssignment . LabelSet getDefaultInstanceForType ()
Returns
getDescriptorForType()
public Descriptors . Descriptor getDescriptorForType ()
Returns
Overrides
getLabels()
public Map<String , String > getLabels ()
Returns
getLabelsCount()
public int getLabelsCount ()
Labels are identified by key/value pairs in this map.
A VM should contain all the key/value pairs specified in this
map to be selected.
map<string, string> labels = 1;
Returns
getLabelsMap()
public Map<String , String > getLabelsMap ()
Labels are identified by key/value pairs in this map.
A VM should contain all the key/value pairs specified in this
map to be selected.
map<string, string> labels = 1;
Returns
getLabelsOrDefault(String key, String defaultValue)
public String getLabelsOrDefault ( String key , String defaultValue )
Labels are identified by key/value pairs in this map.
A VM should contain all the key/value pairs specified in this
map to be selected.
map<string, string> labels = 1;
Parameters
Returns
getLabelsOrThrow(String key)
public String getLabelsOrThrow ( String key )
Labels are identified by key/value pairs in this map.
A VM should contain all the key/value pairs specified in this
map to be selected.
map<string, string> labels = 1;
Parameter
Returns
getMutableLabels()
public Map<String , String > getMutableLabels ()
Use alternate mutation accessors instead.
Returns
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField ( int number )
Parameter
Returns
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField ( int number )
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized ()
Returns
Overrides
mergeFrom(OSPolicyAssignment.LabelSet other)
public OSPolicyAssignment . LabelSet . Builder mergeFrom ( OSPolicyAssignment . LabelSet other )
Parameter
Returns
public OSPolicyAssignment . LabelSet . Builder mergeFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public OSPolicyAssignment . LabelSet . Builder mergeFrom ( Message other )
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final OSPolicyAssignment . LabelSet . Builder mergeUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
Overrides
putAllLabels(Map<String,String> values)
public OSPolicyAssignment . LabelSet . Builder putAllLabels ( Map<String , String > values )
Labels are identified by key/value pairs in this map.
A VM should contain all the key/value pairs specified in this
map to be selected.
map<string, string> labels = 1;
Parameter
Returns
putLabels(String key, String value)
public OSPolicyAssignment . LabelSet . Builder putLabels ( String key , String value )
Labels are identified by key/value pairs in this map.
A VM should contain all the key/value pairs specified in this
map to be selected.
map<string, string> labels = 1;
Parameters
Returns
removeLabels(String key)
public OSPolicyAssignment . LabelSet . Builder removeLabels ( String key )
Labels are identified by key/value pairs in this map.
A VM should contain all the key/value pairs specified in this
map to be selected.
map<string, string> labels = 1;
Parameter
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public OSPolicyAssignment . LabelSet . Builder setField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public OSPolicyAssignment . LabelSet . Builder setRepeatedField ( Descriptors . FieldDescriptor field , int index , Object value )
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final OSPolicyAssignment . LabelSet . Builder setUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-27 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-27 UTC."],[],[]]