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
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
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