Class PatchJobs.PatchInstanceFilter.Builder (2.5.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-".