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.v1.OSPolicyAssignment.LabelSet
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
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()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public OSPolicyAssignment.LabelSet.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public OSPolicyAssignment.LabelSet build()
buildPartial()
public OSPolicyAssignment.LabelSet buildPartial()
clear()
public OSPolicyAssignment.LabelSet.Builder clear()
Overrides
clearField(Descriptors.FieldDescriptor field)
public OSPolicyAssignment.LabelSet.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearLabels()
public OSPolicyAssignment.LabelSet.Builder clearLabels()
clearOneof(Descriptors.OneofDescriptor oneof)
public OSPolicyAssignment.LabelSet.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clone()
public OSPolicyAssignment.LabelSet.Builder clone()
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 |
---|
Name | Description |
key | String
|
getDefaultInstanceForType()
public OSPolicyAssignment.LabelSet getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getLabels() (deprecated)
public Map<String,String> getLabels()
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 |
---|
Type | Description |
int | |
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;
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;
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 |
---|
Name | Description |
key | String
|
getMutableLabels() (deprecated)
public Map<String,String> getMutableLabels()
Use alternate mutation accessors instead.
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(OSPolicyAssignment.LabelSet other)
public OSPolicyAssignment.LabelSet.Builder mergeFrom(OSPolicyAssignment.LabelSet other)
public OSPolicyAssignment.LabelSet.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public OSPolicyAssignment.LabelSet.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final OSPolicyAssignment.LabelSet.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
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;
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;
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 |
---|
Name | Description |
key | String
|
setField(Descriptors.FieldDescriptor field, Object value)
public OSPolicyAssignment.LabelSet.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public OSPolicyAssignment.LabelSet.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final OSPolicyAssignment.LabelSet.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides