public static final class GuestPolicies.Assignment extends GeneratedMessageV3 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
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
GROUP_LABELS_FIELD_NUMBER
public static final int GROUP_LABELS_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
INSTANCES_FIELD_NUMBER
public static final int INSTANCES_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
INSTANCE_NAME_PREFIXES_FIELD_NUMBER
public static final int INSTANCE_NAME_PREFIXES_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
OS_TYPES_FIELD_NUMBER
public static final int OS_TYPES_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
ZONES_FIELD_NUMBER
public static final int ZONES_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static GuestPolicies.Assignment getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static GuestPolicies.Assignment.Builder newBuilder()
newBuilder(GuestPolicies.Assignment prototype)
public static GuestPolicies.Assignment.Builder newBuilder(GuestPolicies.Assignment prototype)
public static GuestPolicies.Assignment parseDelimitedFrom(InputStream input)
public static GuestPolicies.Assignment parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static GuestPolicies.Assignment parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static GuestPolicies.Assignment parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static GuestPolicies.Assignment parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static GuestPolicies.Assignment parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static GuestPolicies.Assignment parseFrom(CodedInputStream input)
public static GuestPolicies.Assignment parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static GuestPolicies.Assignment parseFrom(InputStream input)
public static GuestPolicies.Assignment parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static GuestPolicies.Assignment parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static GuestPolicies.Assignment parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<GuestPolicies.Assignment> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
getDefaultInstanceForType()
public GuestPolicies.Assignment getDefaultInstanceForType()
getGroupLabels(int index)
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;
Parameter |
---|
Name | Description |
index | int
|
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;
Returns |
---|
Type | Description |
int | |
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;
getGroupLabelsOrBuilder(int index)
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;
Parameter |
---|
Name | Description |
index | int
|
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;
Returns |
---|
Type | Description |
List<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.GroupLabelOrBuilder> | |
getInstanceNamePrefixes(int index)
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;
Parameter |
---|
Name | Description |
index | int
The index of the element to return.
|
Returns |
---|
Type | Description |
String | The instanceNamePrefixes at the given index.
|
getInstanceNamePrefixesBytes(int index)
public 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;
Parameter |
---|
Name | Description |
index | int
The index of the value to return.
|
Returns |
---|
Type | Description |
ByteString | The bytes of the instanceNamePrefixes at the given index.
|
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;
Returns |
---|
Type | Description |
int | The count of instanceNamePrefixes.
|
getInstanceNamePrefixesList()
public 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;
getInstances(int index)
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;
Parameter |
---|
Name | Description |
index | int
The index of the element to return.
|
Returns |
---|
Type | Description |
String | The instances at the given index.
|
getInstancesBytes(int index)
public 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;
Parameter |
---|
Name | Description |
index | int
The index of the value to return.
|
Returns |
---|
Type | Description |
ByteString | The bytes of the instances at the given index.
|
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;
Returns |
---|
Type | Description |
int | The count of instances.
|
getInstancesList()
public 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;
getOsTypes(int index)
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;
Parameter |
---|
Name | Description |
index | int
|
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;
Returns |
---|
Type | Description |
int | |
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;
getOsTypesOrBuilder(int index)
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;
Parameter |
---|
Name | Description |
index | int
|
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;
Returns |
---|
Type | Description |
List<? extends com.google.cloud.osconfig.v1beta.GuestPolicies.Assignment.OsTypeOrBuilder> | |
getParserForType()
public Parser<GuestPolicies.Assignment> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
getZones(int index)
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;
Parameter |
---|
Name | Description |
index | int
The index of the element to return.
|
Returns |
---|
Type | Description |
String | The zones at the given index.
|
getZonesBytes(int index)
public 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;
Parameter |
---|
Name | Description |
index | int
The index of the value to return.
|
Returns |
---|
Type | Description |
ByteString | The bytes of the zones at the given index.
|
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;
Returns |
---|
Type | Description |
int | The count of zones.
|
getZonesList()
public 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;
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public GuestPolicies.Assignment.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected GuestPolicies.Assignment.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public GuestPolicies.Assignment.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides