Class OSPolicyAssignment.LabelSet (2.7.0)

public static final class OSPolicyAssignment.LabelSet extends GeneratedMessageV3 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 Fields

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static OSPolicyAssignment.LabelSet getDefaultInstance()
Returns
TypeDescription
OSPolicyAssignment.LabelSet

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static OSPolicyAssignment.LabelSet.Builder newBuilder()
Returns
TypeDescription
OSPolicyAssignment.LabelSet.Builder

newBuilder(OSPolicyAssignment.LabelSet prototype)

public static OSPolicyAssignment.LabelSet.Builder newBuilder(OSPolicyAssignment.LabelSet prototype)
Parameter
NameDescription
prototypeOSPolicyAssignment.LabelSet
Returns
TypeDescription
OSPolicyAssignment.LabelSet.Builder

parseDelimitedFrom(InputStream input)

public static OSPolicyAssignment.LabelSet parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
OSPolicyAssignment.LabelSet
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicyAssignment.LabelSet parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicyAssignment.LabelSet
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static OSPolicyAssignment.LabelSet parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
OSPolicyAssignment.LabelSet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static OSPolicyAssignment.LabelSet parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicyAssignment.LabelSet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static OSPolicyAssignment.LabelSet parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
OSPolicyAssignment.LabelSet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static OSPolicyAssignment.LabelSet parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicyAssignment.LabelSet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static OSPolicyAssignment.LabelSet parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
OSPolicyAssignment.LabelSet
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicyAssignment.LabelSet parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicyAssignment.LabelSet
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static OSPolicyAssignment.LabelSet parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
OSPolicyAssignment.LabelSet
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicyAssignment.LabelSet parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicyAssignment.LabelSet
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static OSPolicyAssignment.LabelSet parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
OSPolicyAssignment.LabelSet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static OSPolicyAssignment.LabelSet parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OSPolicyAssignment.LabelSet
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<OSPolicyAssignment.LabelSet> parser()
Returns
TypeDescription
Parser<LabelSet>

Methods

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
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public OSPolicyAssignment.LabelSet getDefaultInstanceForType()
Returns
TypeDescription
OSPolicyAssignment.LabelSet

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

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
TypeDescription
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;

Returns
TypeDescription
Map<String,String>

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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

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
NameDescription
keyString
Returns
TypeDescription
String

getParserForType()

public Parser<OSPolicyAssignment.LabelSet> getParserForType()
Returns
TypeDescription
Parser<LabelSet>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public OSPolicyAssignment.LabelSet.Builder newBuilderForType()
Returns
TypeDescription
OSPolicyAssignment.LabelSet.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected OSPolicyAssignment.LabelSet.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
OSPolicyAssignment.LabelSet.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public OSPolicyAssignment.LabelSet.Builder toBuilder()
Returns
TypeDescription
OSPolicyAssignment.LabelSet.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException