Class PatchJobs.PatchInstanceFilter.Builder (2.19.0)

public static final class PatchJobs.PatchInstanceFilter.Builder extends GeneratedMessageV3.Builder<PatchJobs.PatchInstanceFilter.Builder> implements PatchJobs.PatchInstanceFilterOrBuilder

A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones.

Protobuf type google.cloud.osconfig.v1beta.PatchInstanceFilter

Static Methods

getDescriptor()

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

Methods

addAllGroupLabels(Iterable<? extends PatchJobs.PatchInstanceFilter.GroupLabel> values)

public PatchJobs.PatchInstanceFilter.Builder addAllGroupLabels(Iterable<? extends PatchJobs.PatchInstanceFilter.GroupLabel> values)

Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging".

repeated .google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabel>
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

addAllInstanceNamePrefixes(Iterable<String> values)

public PatchJobs.PatchInstanceFilter.Builder addAllInstanceNamePrefixes(Iterable<String> values)

Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix="prod-".

repeated string instance_name_prefixes = 5;

Parameter
NameDescription
valuesIterable<String>

The instanceNamePrefixes to add.

Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

This builder for chaining.

addAllInstances(Iterable<String> values)

public PatchJobs.PatchInstanceFilter.Builder addAllInstances(Iterable<String> values)

Targets any of the VM instances specified. Instances are specified by their URI in the form zones/[ZONE]/instances/[INSTANCE_NAME], projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME], or https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]

repeated string instances = 4;

Parameter
NameDescription
valuesIterable<String>

The instances to add.

Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

This builder for chaining.

addAllZones(Iterable<String> values)

public PatchJobs.PatchInstanceFilter.Builder addAllZones(Iterable<String> values)

Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.

repeated string zones = 3;

Parameter
NameDescription
valuesIterable<String>

The zones to add.

Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

This builder for chaining.

addGroupLabels(PatchJobs.PatchInstanceFilter.GroupLabel value)

public PatchJobs.PatchInstanceFilter.Builder addGroupLabels(PatchJobs.PatchInstanceFilter.GroupLabel value)

Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging".

repeated .google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2;

Parameter
NameDescription
valuePatchJobs.PatchInstanceFilter.GroupLabel
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

addGroupLabels(PatchJobs.PatchInstanceFilter.GroupLabel.Builder builderForValue)

public PatchJobs.PatchInstanceFilter.Builder addGroupLabels(PatchJobs.PatchInstanceFilter.GroupLabel.Builder builderForValue)

Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging".

repeated .google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2;

Parameter
NameDescription
builderForValuePatchJobs.PatchInstanceFilter.GroupLabel.Builder
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

addGroupLabels(int index, PatchJobs.PatchInstanceFilter.GroupLabel value)

public PatchJobs.PatchInstanceFilter.Builder addGroupLabels(int index, PatchJobs.PatchInstanceFilter.GroupLabel value)

Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging".

repeated .google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2;

Parameters
NameDescription
indexint
valuePatchJobs.PatchInstanceFilter.GroupLabel
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

addGroupLabels(int index, PatchJobs.PatchInstanceFilter.GroupLabel.Builder builderForValue)

public PatchJobs.PatchInstanceFilter.Builder addGroupLabels(int index, PatchJobs.PatchInstanceFilter.GroupLabel.Builder builderForValue)

Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging".

repeated .google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2;

Parameters
NameDescription
indexint
builderForValuePatchJobs.PatchInstanceFilter.GroupLabel.Builder
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

addGroupLabelsBuilder()

public PatchJobs.PatchInstanceFilter.GroupLabel.Builder addGroupLabelsBuilder()

Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging".

repeated .google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2;

Returns
TypeDescription
PatchJobs.PatchInstanceFilter.GroupLabel.Builder

addGroupLabelsBuilder(int index)

public PatchJobs.PatchInstanceFilter.GroupLabel.Builder addGroupLabelsBuilder(int index)

Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging".

repeated .google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.GroupLabel.Builder

addInstanceNamePrefixes(String value)

public PatchJobs.PatchInstanceFilter.Builder addInstanceNamePrefixes(String value)

Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix="prod-".

repeated string instance_name_prefixes = 5;

Parameter
NameDescription
valueString

The instanceNamePrefixes to add.

Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

This builder for chaining.

addInstanceNamePrefixesBytes(ByteString value)

public PatchJobs.PatchInstanceFilter.Builder addInstanceNamePrefixesBytes(ByteString value)

Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix="prod-".

repeated string instance_name_prefixes = 5;

Parameter
NameDescription
valueByteString

The bytes of the instanceNamePrefixes to add.

Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

This builder for chaining.

addInstances(String value)

public PatchJobs.PatchInstanceFilter.Builder addInstances(String value)

Targets any of the VM instances specified. Instances are specified by their URI in the form zones/[ZONE]/instances/[INSTANCE_NAME], projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME], or https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]

repeated string instances = 4;

Parameter
NameDescription
valueString

The instances to add.

Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

This builder for chaining.

addInstancesBytes(ByteString value)

public PatchJobs.PatchInstanceFilter.Builder addInstancesBytes(ByteString value)

Targets any of the VM instances specified. Instances are specified by their URI in the form zones/[ZONE]/instances/[INSTANCE_NAME], projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME], or https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]

repeated string instances = 4;

Parameter
NameDescription
valueByteString

The bytes of the instances to add.

Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public PatchJobs.PatchInstanceFilter.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder
Overrides

addZones(String value)

public PatchJobs.PatchInstanceFilter.Builder addZones(String value)

Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.

repeated string zones = 3;

Parameter
NameDescription
valueString

The zones to add.

Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

This builder for chaining.

addZonesBytes(ByteString value)

public PatchJobs.PatchInstanceFilter.Builder addZonesBytes(ByteString value)

Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.

repeated string zones = 3;

Parameter
NameDescription
valueByteString

The bytes of the zones to add.

Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

This builder for chaining.

build()

public PatchJobs.PatchInstanceFilter build()
Returns
TypeDescription
PatchJobs.PatchInstanceFilter

buildPartial()

public PatchJobs.PatchInstanceFilter buildPartial()
Returns
TypeDescription
PatchJobs.PatchInstanceFilter

clear()

public PatchJobs.PatchInstanceFilter.Builder clear()
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder
Overrides

clearAll()

public PatchJobs.PatchInstanceFilter.Builder clearAll()

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

bool all = 1;

Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public PatchJobs.PatchInstanceFilter.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder
Overrides

clearGroupLabels()

public PatchJobs.PatchInstanceFilter.Builder clearGroupLabels()

Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging".

repeated .google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2;

Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

clearInstanceNamePrefixes()

public PatchJobs.PatchInstanceFilter.Builder clearInstanceNamePrefixes()

Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix="prod-".

repeated string instance_name_prefixes = 5;

Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

This builder for chaining.

clearInstances()

public PatchJobs.PatchInstanceFilter.Builder clearInstances()

Targets any of the VM instances specified. Instances are specified by their URI in the form zones/[ZONE]/instances/[INSTANCE_NAME], projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME], or https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]

repeated string instances = 4;

Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public PatchJobs.PatchInstanceFilter.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder
Overrides

clearZones()

public PatchJobs.PatchInstanceFilter.Builder clearZones()

Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.

repeated string zones = 3;

Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

This builder for chaining.

clone()

public PatchJobs.PatchInstanceFilter.Builder clone()
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder
Overrides

getAll()

public boolean getAll()

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

bool all = 1;

Returns
TypeDescription
boolean

The all.

getDefaultInstanceForType()

public PatchJobs.PatchInstanceFilter getDefaultInstanceForType()
Returns
TypeDescription
PatchJobs.PatchInstanceFilter

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getGroupLabels(int index)

public PatchJobs.PatchInstanceFilter.GroupLabel getGroupLabels(int index)

Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging".

repeated .google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.GroupLabel

getGroupLabelsBuilder(int index)

public PatchJobs.PatchInstanceFilter.GroupLabel.Builder getGroupLabelsBuilder(int index)

Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging".

repeated .google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.GroupLabel.Builder

getGroupLabelsBuilderList()

public List<PatchJobs.PatchInstanceFilter.GroupLabel.Builder> getGroupLabelsBuilderList()

Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging".

repeated .google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2;

Returns
TypeDescription
List<Builder>

getGroupLabelsCount()

public int getGroupLabelsCount()

Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging".

repeated .google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2;

Returns
TypeDescription
int

getGroupLabelsList()

public List<PatchJobs.PatchInstanceFilter.GroupLabel> getGroupLabelsList()

Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging".

repeated .google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2;

Returns
TypeDescription
List<GroupLabel>

getGroupLabelsOrBuilder(int index)

public PatchJobs.PatchInstanceFilter.GroupLabelOrBuilder getGroupLabelsOrBuilder(int index)

Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging".

repeated .google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.GroupLabelOrBuilder

getGroupLabelsOrBuilderList()

public List<? extends PatchJobs.PatchInstanceFilter.GroupLabelOrBuilder> getGroupLabelsOrBuilderList()

Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging".

repeated .google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2;

Returns
TypeDescription
List<? extends com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.GroupLabelOrBuilder>

getInstanceNamePrefixes(int index)

public String getInstanceNamePrefixes(int index)

Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix="prod-".

repeated string instance_name_prefixes = 5;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The instanceNamePrefixes at the given index.

getInstanceNamePrefixesBytes(int index)

public ByteString getInstanceNamePrefixesBytes(int index)

Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix="prod-".

repeated string instance_name_prefixes = 5;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the instanceNamePrefixes at the given index.

getInstanceNamePrefixesCount()

public int getInstanceNamePrefixesCount()

Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix="prod-".

repeated string instance_name_prefixes = 5;

Returns
TypeDescription
int

The count of instanceNamePrefixes.

getInstanceNamePrefixesList()

public ProtocolStringList getInstanceNamePrefixesList()

Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix="prod-".

repeated string instance_name_prefixes = 5;

Returns
TypeDescription
ProtocolStringList

A list containing the instanceNamePrefixes.

getInstances(int index)

public String getInstances(int index)

Targets any of the VM instances specified. Instances are specified by their URI in the form zones/[ZONE]/instances/[INSTANCE_NAME], projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME], or https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]

repeated string instances = 4;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The instances at the given index.

getInstancesBytes(int index)

public ByteString getInstancesBytes(int index)

Targets any of the VM instances specified. Instances are specified by their URI in the form zones/[ZONE]/instances/[INSTANCE_NAME], projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME], or https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]

repeated string instances = 4;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the instances at the given index.

getInstancesCount()

public int getInstancesCount()

Targets any of the VM instances specified. Instances are specified by their URI in the form zones/[ZONE]/instances/[INSTANCE_NAME], projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME], or https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]

repeated string instances = 4;

Returns
TypeDescription
int

The count of instances.

getInstancesList()

public ProtocolStringList getInstancesList()

Targets any of the VM instances specified. Instances are specified by their URI in the form zones/[ZONE]/instances/[INSTANCE_NAME], projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME], or https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]

repeated string instances = 4;

Returns
TypeDescription
ProtocolStringList

A list containing the instances.

getZones(int index)

public String getZones(int index)

Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.

repeated string zones = 3;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The zones at the given index.

getZonesBytes(int index)

public ByteString getZonesBytes(int index)

Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.

repeated string zones = 3;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the zones at the given index.

getZonesCount()

public int getZonesCount()

Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.

repeated string zones = 3;

Returns
TypeDescription
int

The count of zones.

getZonesList()

public ProtocolStringList getZonesList()

Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.

repeated string zones = 3;

Returns
TypeDescription
ProtocolStringList

A list containing the zones.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(PatchJobs.PatchInstanceFilter other)

public PatchJobs.PatchInstanceFilter.Builder mergeFrom(PatchJobs.PatchInstanceFilter other)
Parameter
NameDescription
otherPatchJobs.PatchInstanceFilter
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public PatchJobs.PatchInstanceFilter.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public PatchJobs.PatchInstanceFilter.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final PatchJobs.PatchInstanceFilter.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder
Overrides

removeGroupLabels(int index)

public PatchJobs.PatchInstanceFilter.Builder removeGroupLabels(int index)

Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging".

repeated .google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

setAll(boolean value)

public PatchJobs.PatchInstanceFilter.Builder setAll(boolean value)

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

bool all = 1;

Parameter
NameDescription
valueboolean

The all to set.

Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public PatchJobs.PatchInstanceFilter.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder
Overrides

setGroupLabels(int index, PatchJobs.PatchInstanceFilter.GroupLabel value)

public PatchJobs.PatchInstanceFilter.Builder setGroupLabels(int index, PatchJobs.PatchInstanceFilter.GroupLabel value)

Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging".

repeated .google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2;

Parameters
NameDescription
indexint
valuePatchJobs.PatchInstanceFilter.GroupLabel
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

setGroupLabels(int index, PatchJobs.PatchInstanceFilter.GroupLabel.Builder builderForValue)

public PatchJobs.PatchInstanceFilter.Builder setGroupLabels(int index, PatchJobs.PatchInstanceFilter.GroupLabel.Builder builderForValue)

Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging".

repeated .google.cloud.osconfig.v1beta.PatchInstanceFilter.GroupLabel group_labels = 2;

Parameters
NameDescription
indexint
builderForValuePatchJobs.PatchInstanceFilter.GroupLabel.Builder
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

setInstanceNamePrefixes(int index, String value)

public PatchJobs.PatchInstanceFilter.Builder setInstanceNamePrefixes(int index, String value)

Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix="prod-".

repeated string instance_name_prefixes = 5;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The instanceNamePrefixes to set.

Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

This builder for chaining.

setInstances(int index, String value)

public PatchJobs.PatchInstanceFilter.Builder setInstances(int index, String value)

Targets any of the VM instances specified. Instances are specified by their URI in the form zones/[ZONE]/instances/[INSTANCE_NAME], projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME], or https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]

repeated string instances = 4;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The instances to set.

Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public PatchJobs.PatchInstanceFilter.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final PatchJobs.PatchInstanceFilter.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder
Overrides

setZones(int index, String value)

public PatchJobs.PatchInstanceFilter.Builder setZones(int index, String value)

Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.

repeated string zones = 3;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The zones to set.

Returns
TypeDescription
PatchJobs.PatchInstanceFilter.Builder

This builder for chaining.