Class OSPolicyAssignment.InstanceFilter (2.48.0)

public static final class OSPolicyAssignment.InstanceFilter extends GeneratedMessageV3 implements OSPolicyAssignment.InstanceFilterOrBuilder

Filters to select target VMs for an assignment.

If more than one filter criteria is specified below, a VM will be selected if and only if it satisfies all of them.

Protobuf type google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > OSPolicyAssignment.InstanceFilter

Static Fields

ALL_FIELD_NUMBER

public static final int ALL_FIELD_NUMBER
Field Value
Type Description
int

EXCLUSION_LABELS_FIELD_NUMBER

public static final int EXCLUSION_LABELS_FIELD_NUMBER
Field Value
Type Description
int

INCLUSION_LABELS_FIELD_NUMBER

public static final int INCLUSION_LABELS_FIELD_NUMBER
Field Value
Type Description
int

INVENTORIES_FIELD_NUMBER

public static final int INVENTORIES_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static OSPolicyAssignment.InstanceFilter getDefaultInstance()
Returns
Type Description
OSPolicyAssignment.InstanceFilter

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static OSPolicyAssignment.InstanceFilter.Builder newBuilder()
Returns
Type Description
OSPolicyAssignment.InstanceFilter.Builder

newBuilder(OSPolicyAssignment.InstanceFilter prototype)

public static OSPolicyAssignment.InstanceFilter.Builder newBuilder(OSPolicyAssignment.InstanceFilter prototype)
Parameter
Name Description
prototype OSPolicyAssignment.InstanceFilter
Returns
Type Description
OSPolicyAssignment.InstanceFilter.Builder

parseDelimitedFrom(InputStream input)

public static OSPolicyAssignment.InstanceFilter parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
OSPolicyAssignment.InstanceFilter
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicyAssignment.InstanceFilter parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OSPolicyAssignment.InstanceFilter
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static OSPolicyAssignment.InstanceFilter parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
OSPolicyAssignment.InstanceFilter
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static OSPolicyAssignment.InstanceFilter parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OSPolicyAssignment.InstanceFilter
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static OSPolicyAssignment.InstanceFilter parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
OSPolicyAssignment.InstanceFilter
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static OSPolicyAssignment.InstanceFilter parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OSPolicyAssignment.InstanceFilter
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static OSPolicyAssignment.InstanceFilter parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
OSPolicyAssignment.InstanceFilter
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicyAssignment.InstanceFilter parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OSPolicyAssignment.InstanceFilter
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static OSPolicyAssignment.InstanceFilter parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
OSPolicyAssignment.InstanceFilter
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OSPolicyAssignment.InstanceFilter parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OSPolicyAssignment.InstanceFilter
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static OSPolicyAssignment.InstanceFilter parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
OSPolicyAssignment.InstanceFilter
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static OSPolicyAssignment.InstanceFilter parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OSPolicyAssignment.InstanceFilter
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<OSPolicyAssignment.InstanceFilter> parser()
Returns
Type Description
Parser<InstanceFilter>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAll()

public boolean getAll()

Target all VMs in the project. If true, no other criteria is permitted.

bool all = 1;

Returns
Type Description
boolean

The all.

getDefaultInstanceForType()

public OSPolicyAssignment.InstanceFilter getDefaultInstanceForType()
Returns
Type Description
OSPolicyAssignment.InstanceFilter

getExclusionLabels(int index)

public OSPolicyAssignment.LabelSet getExclusionLabels(int index)

List of label sets used for VM exclusion.

If the list has more than one label set, the VM is excluded if any of the label sets are applicable for the VM.

repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet exclusion_labels = 3;

Parameter
Name Description
index int
Returns
Type Description
OSPolicyAssignment.LabelSet

getExclusionLabelsCount()

public int getExclusionLabelsCount()

List of label sets used for VM exclusion.

If the list has more than one label set, the VM is excluded if any of the label sets are applicable for the VM.

repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet exclusion_labels = 3;

Returns
Type Description
int

getExclusionLabelsList()

public List<OSPolicyAssignment.LabelSet> getExclusionLabelsList()

List of label sets used for VM exclusion.

If the list has more than one label set, the VM is excluded if any of the label sets are applicable for the VM.

repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet exclusion_labels = 3;

Returns
Type Description
List<LabelSet>

getExclusionLabelsOrBuilder(int index)

public OSPolicyAssignment.LabelSetOrBuilder getExclusionLabelsOrBuilder(int index)

List of label sets used for VM exclusion.

If the list has more than one label set, the VM is excluded if any of the label sets are applicable for the VM.

repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet exclusion_labels = 3;

Parameter
Name Description
index int
Returns
Type Description
OSPolicyAssignment.LabelSetOrBuilder

getExclusionLabelsOrBuilderList()

public List<? extends OSPolicyAssignment.LabelSetOrBuilder> getExclusionLabelsOrBuilderList()

List of label sets used for VM exclusion.

If the list has more than one label set, the VM is excluded if any of the label sets are applicable for the VM.

repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet exclusion_labels = 3;

Returns
Type Description
List<? extends com.google.cloud.osconfig.v1.OSPolicyAssignment.LabelSetOrBuilder>

getInclusionLabels(int index)

public OSPolicyAssignment.LabelSet getInclusionLabels(int index)

List of label sets used for VM inclusion.

If the list has more than one LabelSet, the VM is included if any of the label sets are applicable for the VM.

repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet inclusion_labels = 2;

Parameter
Name Description
index int
Returns
Type Description
OSPolicyAssignment.LabelSet

getInclusionLabelsCount()

public int getInclusionLabelsCount()

List of label sets used for VM inclusion.

If the list has more than one LabelSet, the VM is included if any of the label sets are applicable for the VM.

repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet inclusion_labels = 2;

Returns
Type Description
int

getInclusionLabelsList()

public List<OSPolicyAssignment.LabelSet> getInclusionLabelsList()

List of label sets used for VM inclusion.

If the list has more than one LabelSet, the VM is included if any of the label sets are applicable for the VM.

repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet inclusion_labels = 2;

Returns
Type Description
List<LabelSet>

getInclusionLabelsOrBuilder(int index)

public OSPolicyAssignment.LabelSetOrBuilder getInclusionLabelsOrBuilder(int index)

List of label sets used for VM inclusion.

If the list has more than one LabelSet, the VM is included if any of the label sets are applicable for the VM.

repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet inclusion_labels = 2;

Parameter
Name Description
index int
Returns
Type Description
OSPolicyAssignment.LabelSetOrBuilder

getInclusionLabelsOrBuilderList()

public List<? extends OSPolicyAssignment.LabelSetOrBuilder> getInclusionLabelsOrBuilderList()

List of label sets used for VM inclusion.

If the list has more than one LabelSet, the VM is included if any of the label sets are applicable for the VM.

repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet inclusion_labels = 2;

Returns
Type Description
List<? extends com.google.cloud.osconfig.v1.OSPolicyAssignment.LabelSetOrBuilder>

getInventories(int index)

public OSPolicyAssignment.InstanceFilter.Inventory getInventories(int index)

List of inventories to select VMs.

A VM is selected if its inventory data matches at least one of the following inventories.

repeated .google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory inventories = 4;

Parameter
Name Description
index int
Returns
Type Description
OSPolicyAssignment.InstanceFilter.Inventory

getInventoriesCount()

public int getInventoriesCount()

List of inventories to select VMs.

A VM is selected if its inventory data matches at least one of the following inventories.

repeated .google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory inventories = 4;

Returns
Type Description
int

getInventoriesList()

public List<OSPolicyAssignment.InstanceFilter.Inventory> getInventoriesList()

List of inventories to select VMs.

A VM is selected if its inventory data matches at least one of the following inventories.

repeated .google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory inventories = 4;

Returns
Type Description
List<Inventory>

getInventoriesOrBuilder(int index)

public OSPolicyAssignment.InstanceFilter.InventoryOrBuilder getInventoriesOrBuilder(int index)

List of inventories to select VMs.

A VM is selected if its inventory data matches at least one of the following inventories.

repeated .google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory inventories = 4;

Parameter
Name Description
index int
Returns
Type Description
OSPolicyAssignment.InstanceFilter.InventoryOrBuilder

getInventoriesOrBuilderList()

public List<? extends OSPolicyAssignment.InstanceFilter.InventoryOrBuilder> getInventoriesOrBuilderList()

List of inventories to select VMs.

A VM is selected if its inventory data matches at least one of the following inventories.

repeated .google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory inventories = 4;

Returns
Type Description
List<? extends com.google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.InventoryOrBuilder>

getParserForType()

public Parser<OSPolicyAssignment.InstanceFilter> getParserForType()
Returns
Type Description
Parser<InstanceFilter>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public OSPolicyAssignment.InstanceFilter.Builder newBuilderForType()
Returns
Type Description
OSPolicyAssignment.InstanceFilter.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected OSPolicyAssignment.InstanceFilter.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
OSPolicyAssignment.InstanceFilter.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public OSPolicyAssignment.InstanceFilter.Builder toBuilder()
Returns
Type Description
OSPolicyAssignment.InstanceFilter.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException