Class PatchJobs.PatchInstanceFilter.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<PatchJobs.PatchInstanceFilter.Builder>
com.google.cloud.osconfig.v1beta.PatchJobs.PatchInstanceFilter.Builder
All Implemented Interfaces:
PatchJobs.PatchInstanceFilterOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
PatchJobs.PatchInstanceFilter

public static final class PatchJobs.PatchInstanceFilter.Builder extends com.google.protobuf.GeneratedMessage.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
  • 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.Builder<PatchJobs.PatchInstanceFilter.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<PatchJobs.PatchInstanceFilter.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<PatchJobs.PatchInstanceFilter.Builder>
    • getDefaultInstanceForType

      public PatchJobs.PatchInstanceFilter getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public PatchJobs.PatchInstanceFilter buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public PatchJobs.PatchInstanceFilter.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<PatchJobs.PatchInstanceFilter.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<PatchJobs.PatchInstanceFilter.Builder>
    • mergeFrom

      public PatchJobs.PatchInstanceFilter.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<PatchJobs.PatchInstanceFilter.Builder>
      Throws:
      IOException
    • getAll

      public boolean getAll()
       Target all VM instances in the project. If true, no other criteria is
       permitted.
       
      bool all = 1;
      Specified by:
      getAll in interface PatchJobs.PatchInstanceFilterOrBuilder
      Returns:
      The all.
    • setAll

      public PatchJobs.PatchInstanceFilter.Builder setAll(boolean value)
       Target all VM instances in the project. If true, no other criteria is
       permitted.
       
      bool all = 1;
      Parameters:
      value - The all to set.
      Returns:
      This builder for chaining.
    • clearAll

       Target all VM instances in the project. If true, no other criteria is
       permitted.
       
      bool all = 1;
      Returns:
      This builder for chaining.
    • 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;
      Specified by:
      getGroupLabelsList in interface PatchJobs.PatchInstanceFilterOrBuilder
    • 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;
      Specified by:
      getGroupLabelsCount in interface PatchJobs.PatchInstanceFilterOrBuilder
    • getGroupLabels

      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;
      Specified by:
      getGroupLabels in interface PatchJobs.PatchInstanceFilterOrBuilder
    • setGroupLabels

       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;
    • setGroupLabels

       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;
    • addGroupLabels

       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;
    • addGroupLabels

       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;
    • addGroupLabels

       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;
    • addGroupLabels

       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;
    • addAllGroupLabels

       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;
    • 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;
    • removeGroupLabels

      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;
    • getGroupLabelsBuilder

      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;
    • getGroupLabelsOrBuilder

      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;
      Specified by:
      getGroupLabelsOrBuilder in interface PatchJobs.PatchInstanceFilterOrBuilder
    • 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;
      Specified by:
      getGroupLabelsOrBuilderList in interface PatchJobs.PatchInstanceFilterOrBuilder
    • 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;
    • addGroupLabelsBuilder

      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;
    • 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;
    • getZonesList

      public com.google.protobuf.ProtocolStringList getZonesList()
       Targets VM instances in ANY of these zones. Leave empty to target VM
       instances in any zone.
       
      repeated string zones = 3;
      Specified by:
      getZonesList in interface PatchJobs.PatchInstanceFilterOrBuilder
      Returns:
      A list containing the zones.
    • 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;
      Specified by:
      getZonesCount in interface PatchJobs.PatchInstanceFilterOrBuilder
      Returns:
      The count of zones.
    • getZones

      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;
      Specified by:
      getZones in interface PatchJobs.PatchInstanceFilterOrBuilder
      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 VM instances in ANY of these zones. Leave empty to target VM
       instances in any zone.
       
      repeated string zones = 3;
      Specified by:
      getZonesBytes in interface PatchJobs.PatchInstanceFilterOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the zones at the given index.
    • setZones

      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:
      index - The index to set the value at.
      value - The zones to set.
      Returns:
      This builder for chaining.
    • addZones

       Targets VM instances in ANY of these zones. Leave empty to target VM
       instances in any zone.
       
      repeated string zones = 3;
      Parameters:
      value - The zones to add.
      Returns:
      This builder for chaining.
    • addAllZones

       Targets VM instances in ANY of these zones. Leave empty to target VM
       instances in any zone.
       
      repeated string zones = 3;
      Parameters:
      values - The zones to add.
      Returns:
      This builder for chaining.
    • clearZones

       Targets VM instances in ANY of these zones. Leave empty to target VM
       instances in any zone.
       
      repeated string zones = 3;
      Returns:
      This builder for chaining.
    • addZonesBytes

      public PatchJobs.PatchInstanceFilter.Builder addZonesBytes(com.google.protobuf.ByteString value)
       Targets VM instances in ANY of these zones. Leave empty to target VM
       instances in any zone.
       
      repeated string zones = 3;
      Parameters:
      value - The bytes of the zones to add.
      Returns:
      This builder for chaining.
    • getInstancesList

      public com.google.protobuf.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;
      Specified by:
      getInstancesList in interface PatchJobs.PatchInstanceFilterOrBuilder
      Returns:
      A list containing the instances.
    • 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;
      Specified by:
      getInstancesCount in interface PatchJobs.PatchInstanceFilterOrBuilder
      Returns:
      The count of instances.
    • getInstances

      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;
      Specified by:
      getInstances in interface PatchJobs.PatchInstanceFilterOrBuilder
      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 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;
      Specified by:
      getInstancesBytes in interface PatchJobs.PatchInstanceFilterOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the instances at the given index.
    • setInstances

      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:
      index - The index to set the value at.
      value - The instances to set.
      Returns:
      This builder for chaining.
    • addInstances

      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;
      Parameters:
      value - The instances to add.
      Returns:
      This builder for chaining.
    • addAllInstances

      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;
      Parameters:
      values - The instances to add.
      Returns:
      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:
      This builder for chaining.
    • addInstancesBytes

      public PatchJobs.PatchInstanceFilter.Builder addInstancesBytes(com.google.protobuf.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;
      Parameters:
      value - The bytes of the instances to add.
      Returns:
      This builder for chaining.
    • getInstanceNamePrefixesList

      public com.google.protobuf.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;
      Specified by:
      getInstanceNamePrefixesList in interface PatchJobs.PatchInstanceFilterOrBuilder
      Returns:
      A list containing the instanceNamePrefixes.
    • 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;
      Specified by:
      getInstanceNamePrefixesCount in interface PatchJobs.PatchInstanceFilterOrBuilder
      Returns:
      The count of instanceNamePrefixes.
    • getInstanceNamePrefixes

      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;
      Specified by:
      getInstanceNamePrefixes in interface PatchJobs.PatchInstanceFilterOrBuilder
      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 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;
      Specified by:
      getInstanceNamePrefixesBytes in interface PatchJobs.PatchInstanceFilterOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the instanceNamePrefixes at the given index.
    • setInstanceNamePrefixes

      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:
      index - The index to set the value at.
      value - The instanceNamePrefixes to set.
      Returns:
      This builder for chaining.
    • addInstanceNamePrefixes

      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;
      Parameters:
      value - The instanceNamePrefixes to add.
      Returns:
      This builder for chaining.
    • addAllInstanceNamePrefixes

      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;
      Parameters:
      values - The instanceNamePrefixes to add.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • addInstanceNamePrefixesBytes

      public PatchJobs.PatchInstanceFilter.Builder addInstanceNamePrefixesBytes(com.google.protobuf.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;
      Parameters:
      value - The bytes of the instanceNamePrefixes to add.
      Returns:
      This builder for chaining.