Class OSPolicyAssignment.LabelSet.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<OSPolicyAssignment.LabelSet.Builder>
com.google.cloud.osconfig.v1alpha.OSPolicyAssignment.LabelSet.Builder
All Implemented Interfaces:
OSPolicyAssignment.LabelSetOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
OSPolicyAssignment.LabelSet

public static final class OSPolicyAssignment.LabelSet.Builder extends com.google.protobuf.GeneratedMessage.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
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<OSPolicyAssignment.LabelSet.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<OSPolicyAssignment.LabelSet.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<OSPolicyAssignment.LabelSet.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<OSPolicyAssignment.LabelSet.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<OSPolicyAssignment.LabelSet.Builder>
    • getDefaultInstanceForType

      public OSPolicyAssignment.LabelSet getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public OSPolicyAssignment.LabelSet buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public OSPolicyAssignment.LabelSet.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<OSPolicyAssignment.LabelSet.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<OSPolicyAssignment.LabelSet.Builder>
    • mergeFrom

      public OSPolicyAssignment.LabelSet.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<OSPolicyAssignment.LabelSet.Builder>
      Throws:
      IOException
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: OSPolicyAssignment.LabelSetOrBuilder
       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;
      Specified by:
      getLabelsCount in interface OSPolicyAssignment.LabelSetOrBuilder
    • containsLabels

      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;
      Specified by:
      containsLabels in interface OSPolicyAssignment.LabelSetOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface OSPolicyAssignment.LabelSetOrBuilder
    • 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;
      Specified by:
      getLabelsMap in interface OSPolicyAssignment.LabelSetOrBuilder
    • getLabelsOrDefault

      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;
      Specified by:
      getLabelsOrDefault in interface OSPolicyAssignment.LabelSetOrBuilder
    • getLabelsOrThrow

      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;
      Specified by:
      getLabelsOrThrow in interface OSPolicyAssignment.LabelSetOrBuilder
    • clearLabels

    • removeLabels

      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;
    • getMutableLabels

      @Deprecated public Map<String,String> getMutableLabels()
      Deprecated.
      Use alternate mutation accessors instead.
    • putLabels

      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;
    • putAllLabels

      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;