Class GuestPolicies.Assignment

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment
All Implemented Interfaces:
GuestPolicies.AssignmentOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
GuestPolicies

public static final class GuestPolicies.Assignment extends com.google.protobuf.GeneratedMessage implements GuestPolicies.AssignmentOrBuilder
 An assignment represents the group or groups of VM instances that the policy
 applies to.

 If an assignment is empty, it applies to all VM instances. Otherwise, the
 targeted VM instances must meet all the criteria specified. So if both
 labels and zones are specified, the policy applies to VM instances with those
 labels and in those zones.
 
Protobuf type google.cloud.osconfig.v1beta.Assignment
See Also:
  • Field Details

    • GROUP_LABELS_FIELD_NUMBER

      public static final int GROUP_LABELS_FIELD_NUMBER
      See Also:
    • ZONES_FIELD_NUMBER

      public static final int ZONES_FIELD_NUMBER
      See Also:
    • INSTANCES_FIELD_NUMBER

      public static final int INSTANCES_FIELD_NUMBER
      See Also:
    • INSTANCE_NAME_PREFIXES_FIELD_NUMBER

      public static final int INSTANCE_NAME_PREFIXES_FIELD_NUMBER
      See Also:
    • OS_TYPES_FIELD_NUMBER

      public static final int OS_TYPES_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getGroupLabelsList

      public List<GuestPolicies.Assignment.GroupLabel> getGroupLabelsList()
       Targets instances matching at least one of these label sets. This allows
       an assignment to target disparate groups, for example "env=prod or
       env=staging".
       
      repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1;
      Specified by:
      getGroupLabelsList in interface GuestPolicies.AssignmentOrBuilder
    • getGroupLabelsOrBuilderList

      public List<? extends GuestPolicies.Assignment.GroupLabelOrBuilder> getGroupLabelsOrBuilderList()
       Targets instances matching at least one of these label sets. This allows
       an assignment to target disparate groups, for example "env=prod or
       env=staging".
       
      repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1;
      Specified by:
      getGroupLabelsOrBuilderList in interface GuestPolicies.AssignmentOrBuilder
    • getGroupLabelsCount

      public int getGroupLabelsCount()
       Targets instances matching at least one of these label sets. This allows
       an assignment to target disparate groups, for example "env=prod or
       env=staging".
       
      repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1;
      Specified by:
      getGroupLabelsCount in interface GuestPolicies.AssignmentOrBuilder
    • getGroupLabels

      public GuestPolicies.Assignment.GroupLabel getGroupLabels(int index)
       Targets instances matching at least one of these label sets. This allows
       an assignment to target disparate groups, for example "env=prod or
       env=staging".
       
      repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1;
      Specified by:
      getGroupLabels in interface GuestPolicies.AssignmentOrBuilder
    • getGroupLabelsOrBuilder

      public GuestPolicies.Assignment.GroupLabelOrBuilder getGroupLabelsOrBuilder(int index)
       Targets instances matching at least one of these label sets. This allows
       an assignment to target disparate groups, for example "env=prod or
       env=staging".
       
      repeated .google.cloud.osconfig.v1beta.Assignment.GroupLabel group_labels = 1;
      Specified by:
      getGroupLabelsOrBuilder in interface GuestPolicies.AssignmentOrBuilder
    • getZonesList

      public com.google.protobuf.ProtocolStringList getZonesList()
       Targets instances in any of these zones. Leave empty to target instances
       in any zone.
      
       Zonal targeting is uncommon and is supported to facilitate the management
       of changes by zone.
       
      repeated string zones = 2;
      Specified by:
      getZonesList in interface GuestPolicies.AssignmentOrBuilder
      Returns:
      A list containing the zones.
    • getZonesCount

      public int getZonesCount()
       Targets instances in any of these zones. Leave empty to target instances
       in any zone.
      
       Zonal targeting is uncommon and is supported to facilitate the management
       of changes by zone.
       
      repeated string zones = 2;
      Specified by:
      getZonesCount in interface GuestPolicies.AssignmentOrBuilder
      Returns:
      The count of zones.
    • getZones

      public String getZones(int index)
       Targets instances in any of these zones. Leave empty to target instances
       in any zone.
      
       Zonal targeting is uncommon and is supported to facilitate the management
       of changes by zone.
       
      repeated string zones = 2;
      Specified by:
      getZones in interface GuestPolicies.AssignmentOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The zones at the given index.
    • getZonesBytes

      public com.google.protobuf.ByteString getZonesBytes(int index)
       Targets instances in any of these zones. Leave empty to target instances
       in any zone.
      
       Zonal targeting is uncommon and is supported to facilitate the management
       of changes by zone.
       
      repeated string zones = 2;
      Specified by:
      getZonesBytes in interface GuestPolicies.AssignmentOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the zones at the given index.
    • getInstancesList

      public com.google.protobuf.ProtocolStringList getInstancesList()
       Targets any of the instances specified. Instances are specified by their
       URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
      
       Instance targeting is uncommon and is supported to facilitate the
       management of changes by the instance or to target specific VM instances
       for development and testing.
      
       Only supported for project-level policies and must reference instances
       within this project.
       
      repeated string instances = 3;
      Specified by:
      getInstancesList in interface GuestPolicies.AssignmentOrBuilder
      Returns:
      A list containing the instances.
    • getInstancesCount

      public int getInstancesCount()
       Targets any of the instances specified. Instances are specified by their
       URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
      
       Instance targeting is uncommon and is supported to facilitate the
       management of changes by the instance or to target specific VM instances
       for development and testing.
      
       Only supported for project-level policies and must reference instances
       within this project.
       
      repeated string instances = 3;
      Specified by:
      getInstancesCount in interface GuestPolicies.AssignmentOrBuilder
      Returns:
      The count of instances.
    • getInstances

      public String getInstances(int index)
       Targets any of the instances specified. Instances are specified by their
       URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
      
       Instance targeting is uncommon and is supported to facilitate the
       management of changes by the instance or to target specific VM instances
       for development and testing.
      
       Only supported for project-level policies and must reference instances
       within this project.
       
      repeated string instances = 3;
      Specified by:
      getInstances in interface GuestPolicies.AssignmentOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The instances at the given index.
    • getInstancesBytes

      public com.google.protobuf.ByteString getInstancesBytes(int index)
       Targets any of the instances specified. Instances are specified by their
       URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`.
      
       Instance targeting is uncommon and is supported to facilitate the
       management of changes by the instance or to target specific VM instances
       for development and testing.
      
       Only supported for project-level policies and must reference instances
       within this project.
       
      repeated string instances = 3;
      Specified by:
      getInstancesBytes in interface GuestPolicies.AssignmentOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the instances at the given index.
    • getInstanceNamePrefixesList

      public com.google.protobuf.ProtocolStringList getInstanceNamePrefixesList()
       Targets VM instances whose name starts with one of these prefixes.
      
       Like labels, this is another way to group VM instances when targeting
       configs, for example prefix="prod-".
      
       Only supported for project-level policies.
       
      repeated string instance_name_prefixes = 4;
      Specified by:
      getInstanceNamePrefixesList in interface GuestPolicies.AssignmentOrBuilder
      Returns:
      A list containing the instanceNamePrefixes.
    • getInstanceNamePrefixesCount

      public int getInstanceNamePrefixesCount()
       Targets VM instances whose name starts with one of these prefixes.
      
       Like labels, this is another way to group VM instances when targeting
       configs, for example prefix="prod-".
      
       Only supported for project-level policies.
       
      repeated string instance_name_prefixes = 4;
      Specified by:
      getInstanceNamePrefixesCount in interface GuestPolicies.AssignmentOrBuilder
      Returns:
      The count of instanceNamePrefixes.
    • getInstanceNamePrefixes

      public String getInstanceNamePrefixes(int index)
       Targets VM instances whose name starts with one of these prefixes.
      
       Like labels, this is another way to group VM instances when targeting
       configs, for example prefix="prod-".
      
       Only supported for project-level policies.
       
      repeated string instance_name_prefixes = 4;
      Specified by:
      getInstanceNamePrefixes in interface GuestPolicies.AssignmentOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The instanceNamePrefixes at the given index.
    • getInstanceNamePrefixesBytes

      public com.google.protobuf.ByteString getInstanceNamePrefixesBytes(int index)
       Targets VM instances whose name starts with one of these prefixes.
      
       Like labels, this is another way to group VM instances when targeting
       configs, for example prefix="prod-".
      
       Only supported for project-level policies.
       
      repeated string instance_name_prefixes = 4;
      Specified by:
      getInstanceNamePrefixesBytes in interface GuestPolicies.AssignmentOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the instanceNamePrefixes at the given index.
    • getOsTypesList

      public List<GuestPolicies.Assignment.OsType> getOsTypesList()
       Targets VM instances matching at least one of the following OS types.
      
       VM instances must match all supplied criteria for a given OsType to be
       included.
       
      repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5;
      Specified by:
      getOsTypesList in interface GuestPolicies.AssignmentOrBuilder
    • getOsTypesOrBuilderList

      public List<? extends GuestPolicies.Assignment.OsTypeOrBuilder> getOsTypesOrBuilderList()
       Targets VM instances matching at least one of the following OS types.
      
       VM instances must match all supplied criteria for a given OsType to be
       included.
       
      repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5;
      Specified by:
      getOsTypesOrBuilderList in interface GuestPolicies.AssignmentOrBuilder
    • getOsTypesCount

      public int getOsTypesCount()
       Targets VM instances matching at least one of the following OS types.
      
       VM instances must match all supplied criteria for a given OsType to be
       included.
       
      repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5;
      Specified by:
      getOsTypesCount in interface GuestPolicies.AssignmentOrBuilder
    • getOsTypes

      public GuestPolicies.Assignment.OsType getOsTypes(int index)
       Targets VM instances matching at least one of the following OS types.
      
       VM instances must match all supplied criteria for a given OsType to be
       included.
       
      repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5;
      Specified by:
      getOsTypes in interface GuestPolicies.AssignmentOrBuilder
    • getOsTypesOrBuilder

      public GuestPolicies.Assignment.OsTypeOrBuilder getOsTypesOrBuilder(int index)
       Targets VM instances matching at least one of the following OS types.
      
       VM instances must match all supplied criteria for a given OsType to be
       included.
       
      repeated .google.cloud.osconfig.v1beta.Assignment.OsType os_types = 5;
      Specified by:
      getOsTypesOrBuilder in interface GuestPolicies.AssignmentOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static GuestPolicies.Assignment parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GuestPolicies.Assignment parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GuestPolicies.Assignment parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GuestPolicies.Assignment parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GuestPolicies.Assignment parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GuestPolicies.Assignment parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static GuestPolicies.Assignment parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static GuestPolicies.Assignment parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static GuestPolicies.Assignment parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static GuestPolicies.Assignment parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static GuestPolicies.Assignment parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static GuestPolicies.Assignment parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public GuestPolicies.Assignment.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static GuestPolicies.Assignment.Builder newBuilder()
    • newBuilder

      public static GuestPolicies.Assignment.Builder newBuilder(GuestPolicies.Assignment prototype)
    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected GuestPolicies.Assignment.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static GuestPolicies.Assignment getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<GuestPolicies.Assignment> parser()
    • getParserForType

      public com.google.protobuf.Parser<GuestPolicies.Assignment> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public GuestPolicies.Assignment getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder