Class InstanceProperties.Builder (1.13.0)

public static final class InstanceProperties.Builder extends GeneratedMessageV3.Builder<InstanceProperties.Builder> implements InstancePropertiesOrBuilder

Protobuf type google.cloud.compute.v1.InstanceProperties

Static Methods

getDescriptor()

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

Methods

addAllDisks(Iterable<? extends AttachedDisk> values)

public InstanceProperties.Builder addAllDisks(Iterable<? extends AttachedDisk> values)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.compute.v1.AttachedDisk>
Returns
TypeDescription
InstanceProperties.Builder

addAllGuestAccelerators(Iterable<? extends AcceleratorConfig> values)

public InstanceProperties.Builder addAllGuestAccelerators(Iterable<? extends AcceleratorConfig> values)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.compute.v1.AcceleratorConfig>
Returns
TypeDescription
InstanceProperties.Builder

addAllNetworkInterfaces(Iterable<? extends NetworkInterface> values)

public InstanceProperties.Builder addAllNetworkInterfaces(Iterable<? extends NetworkInterface> values)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.compute.v1.NetworkInterface>
Returns
TypeDescription
InstanceProperties.Builder

addAllResourcePolicies(Iterable<String> values)

public InstanceProperties.Builder addAllResourcePolicies(Iterable<String> values)

Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported yet.

repeated string resource_policies = 22220385;

Parameter
NameDescription
valuesIterable<String>

The resourcePolicies to add.

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

addAllServiceAccounts(Iterable<? extends ServiceAccount> values)

public InstanceProperties.Builder addAllServiceAccounts(Iterable<? extends ServiceAccount> values)

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.compute.v1.ServiceAccount>
Returns
TypeDescription
InstanceProperties.Builder

addDisks(AttachedDisk value)

public InstanceProperties.Builder addDisks(AttachedDisk value)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameter
NameDescription
valueAttachedDisk
Returns
TypeDescription
InstanceProperties.Builder

addDisks(AttachedDisk.Builder builderForValue)

public InstanceProperties.Builder addDisks(AttachedDisk.Builder builderForValue)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameter
NameDescription
builderForValueAttachedDisk.Builder
Returns
TypeDescription
InstanceProperties.Builder

addDisks(int index, AttachedDisk value)

public InstanceProperties.Builder addDisks(int index, AttachedDisk value)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameters
NameDescription
indexint
valueAttachedDisk
Returns
TypeDescription
InstanceProperties.Builder

addDisks(int index, AttachedDisk.Builder builderForValue)

public InstanceProperties.Builder addDisks(int index, AttachedDisk.Builder builderForValue)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameters
NameDescription
indexint
builderForValueAttachedDisk.Builder
Returns
TypeDescription
InstanceProperties.Builder

addDisksBuilder()

public AttachedDisk.Builder addDisksBuilder()

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Returns
TypeDescription
AttachedDisk.Builder

addDisksBuilder(int index)

public AttachedDisk.Builder addDisksBuilder(int index)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameter
NameDescription
indexint
Returns
TypeDescription
AttachedDisk.Builder

addGuestAccelerators(AcceleratorConfig value)

public InstanceProperties.Builder addGuestAccelerators(AcceleratorConfig value)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameter
NameDescription
valueAcceleratorConfig
Returns
TypeDescription
InstanceProperties.Builder

addGuestAccelerators(AcceleratorConfig.Builder builderForValue)

public InstanceProperties.Builder addGuestAccelerators(AcceleratorConfig.Builder builderForValue)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameter
NameDescription
builderForValueAcceleratorConfig.Builder
Returns
TypeDescription
InstanceProperties.Builder

addGuestAccelerators(int index, AcceleratorConfig value)

public InstanceProperties.Builder addGuestAccelerators(int index, AcceleratorConfig value)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameters
NameDescription
indexint
valueAcceleratorConfig
Returns
TypeDescription
InstanceProperties.Builder

addGuestAccelerators(int index, AcceleratorConfig.Builder builderForValue)

public InstanceProperties.Builder addGuestAccelerators(int index, AcceleratorConfig.Builder builderForValue)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameters
NameDescription
indexint
builderForValueAcceleratorConfig.Builder
Returns
TypeDescription
InstanceProperties.Builder

addGuestAcceleratorsBuilder()

public AcceleratorConfig.Builder addGuestAcceleratorsBuilder()

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Returns
TypeDescription
AcceleratorConfig.Builder

addGuestAcceleratorsBuilder(int index)

public AcceleratorConfig.Builder addGuestAcceleratorsBuilder(int index)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameter
NameDescription
indexint
Returns
TypeDescription
AcceleratorConfig.Builder

addNetworkInterfaces(NetworkInterface value)

public InstanceProperties.Builder addNetworkInterfaces(NetworkInterface value)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameter
NameDescription
valueNetworkInterface
Returns
TypeDescription
InstanceProperties.Builder

addNetworkInterfaces(NetworkInterface.Builder builderForValue)

public InstanceProperties.Builder addNetworkInterfaces(NetworkInterface.Builder builderForValue)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameter
NameDescription
builderForValueNetworkInterface.Builder
Returns
TypeDescription
InstanceProperties.Builder

addNetworkInterfaces(int index, NetworkInterface value)

public InstanceProperties.Builder addNetworkInterfaces(int index, NetworkInterface value)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameters
NameDescription
indexint
valueNetworkInterface
Returns
TypeDescription
InstanceProperties.Builder

addNetworkInterfaces(int index, NetworkInterface.Builder builderForValue)

public InstanceProperties.Builder addNetworkInterfaces(int index, NetworkInterface.Builder builderForValue)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameters
NameDescription
indexint
builderForValueNetworkInterface.Builder
Returns
TypeDescription
InstanceProperties.Builder

addNetworkInterfacesBuilder()

public NetworkInterface.Builder addNetworkInterfacesBuilder()

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Returns
TypeDescription
NetworkInterface.Builder

addNetworkInterfacesBuilder(int index)

public NetworkInterface.Builder addNetworkInterfacesBuilder(int index)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameter
NameDescription
indexint
Returns
TypeDescription
NetworkInterface.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addResourcePolicies(String value)

public InstanceProperties.Builder addResourcePolicies(String value)

Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported yet.

repeated string resource_policies = 22220385;

Parameter
NameDescription
valueString

The resourcePolicies to add.

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

addResourcePoliciesBytes(ByteString value)

public InstanceProperties.Builder addResourcePoliciesBytes(ByteString value)

Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported yet.

repeated string resource_policies = 22220385;

Parameter
NameDescription
valueByteString

The bytes of the resourcePolicies to add.

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

addServiceAccounts(ServiceAccount value)

public InstanceProperties.Builder addServiceAccounts(ServiceAccount value)

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Parameter
NameDescription
valueServiceAccount
Returns
TypeDescription
InstanceProperties.Builder

addServiceAccounts(ServiceAccount.Builder builderForValue)

public InstanceProperties.Builder addServiceAccounts(ServiceAccount.Builder builderForValue)

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Parameter
NameDescription
builderForValueServiceAccount.Builder
Returns
TypeDescription
InstanceProperties.Builder

addServiceAccounts(int index, ServiceAccount value)

public InstanceProperties.Builder addServiceAccounts(int index, ServiceAccount value)

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Parameters
NameDescription
indexint
valueServiceAccount
Returns
TypeDescription
InstanceProperties.Builder

addServiceAccounts(int index, ServiceAccount.Builder builderForValue)

public InstanceProperties.Builder addServiceAccounts(int index, ServiceAccount.Builder builderForValue)

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Parameters
NameDescription
indexint
builderForValueServiceAccount.Builder
Returns
TypeDescription
InstanceProperties.Builder

addServiceAccountsBuilder()

public ServiceAccount.Builder addServiceAccountsBuilder()

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Returns
TypeDescription
ServiceAccount.Builder

addServiceAccountsBuilder(int index)

public ServiceAccount.Builder addServiceAccountsBuilder(int index)

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Parameter
NameDescription
indexint
Returns
TypeDescription
ServiceAccount.Builder

build()

public InstanceProperties build()
Returns
TypeDescription
InstanceProperties

buildPartial()

public InstanceProperties buildPartial()
Returns
TypeDescription
InstanceProperties

clear()

public InstanceProperties.Builder clear()
Returns
TypeDescription
InstanceProperties.Builder
Overrides

clearAdvancedMachineFeatures()

public InstanceProperties.Builder clearAdvancedMachineFeatures()

Controls for advanced machine-related behavior features. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.AdvancedMachineFeatures advanced_machine_features = 409646002;

Returns
TypeDescription
InstanceProperties.Builder

clearCanIpForward()

public InstanceProperties.Builder clearCanIpForward()

Enables instances created based on these properties to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.

optional bool can_ip_forward = 467731324;

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

clearConfidentialInstanceConfig()

public InstanceProperties.Builder clearConfidentialInstanceConfig()

Specifies the Confidential Instance options. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ConfidentialInstanceConfig confidential_instance_config = 490637685;

Returns
TypeDescription
InstanceProperties.Builder

clearDescription()

public InstanceProperties.Builder clearDescription()

An optional text description for the instances that are created from these properties.

optional string description = 422937596;

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

clearDisks()

public InstanceProperties.Builder clearDisks()

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Returns
TypeDescription
InstanceProperties.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearGuestAccelerators()

public InstanceProperties.Builder clearGuestAccelerators()

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Returns
TypeDescription
InstanceProperties.Builder

clearKeyRevocationActionType()

public InstanceProperties.Builder clearKeyRevocationActionType()

KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified. Check the KeyRevocationActionType enum for the list of possible values.

optional string key_revocation_action_type = 235941474;

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

clearLabels()

public InstanceProperties.Builder clearLabels()
Returns
TypeDescription
InstanceProperties.Builder

clearMachineType()

public InstanceProperties.Builder clearMachineType()

The machine type to use for instances that are created from these properties.

optional string machine_type = 227711026;

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

clearMetadata()

public InstanceProperties.Builder clearMetadata()

The metadata key/value pairs to assign to instances that are created from these properties. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.

optional .google.cloud.compute.v1.Metadata metadata = 86866735;

Returns
TypeDescription
InstanceProperties.Builder

clearMinCpuPlatform()

public InstanceProperties.Builder clearMinCpuPlatform()

Minimum cpu/platform to be used by instances. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". For more information, read Specifying a Minimum CPU Platform.

optional string min_cpu_platform = 242912759;

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

clearNetworkInterfaces()

public InstanceProperties.Builder clearNetworkInterfaces()

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Returns
TypeDescription
InstanceProperties.Builder

clearNetworkPerformanceConfig()

public InstanceProperties.Builder clearNetworkPerformanceConfig()

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.NetworkPerformanceConfig network_performance_config = 398330850;

Returns
TypeDescription
InstanceProperties.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPrivateIpv6GoogleAccess()

public InstanceProperties.Builder clearPrivateIpv6GoogleAccess()

The private IPv6 google access type for VMs. If not specified, use INHERIT_FROM_SUBNETWORK as default. Note that for MachineImage, this is not supported yet. Check the PrivateIpv6GoogleAccess enum for the list of possible values.

optional string private_ipv6_google_access = 48277006;

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

clearReservationAffinity()

public InstanceProperties.Builder clearReservationAffinity()

Specifies the reservations that instances can consume from. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ReservationAffinity reservation_affinity = 157850683;

Returns
TypeDescription
InstanceProperties.Builder

clearResourceManagerTags()

public InstanceProperties.Builder clearResourceManagerTags()
Returns
TypeDescription
InstanceProperties.Builder

clearResourcePolicies()

public InstanceProperties.Builder clearResourcePolicies()

Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported yet.

repeated string resource_policies = 22220385;

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

clearScheduling()

public InstanceProperties.Builder clearScheduling()

Specifies the scheduling options for the instances that are created from these properties.

optional .google.cloud.compute.v1.Scheduling scheduling = 386688404;

Returns
TypeDescription
InstanceProperties.Builder

clearServiceAccounts()

public InstanceProperties.Builder clearServiceAccounts()

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Returns
TypeDescription
InstanceProperties.Builder

clearShieldedInstanceConfig()

public InstanceProperties.Builder clearShieldedInstanceConfig()

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ShieldedInstanceConfig shielded_instance_config = 12862901;

Returns
TypeDescription
InstanceProperties.Builder

clearTags()

public InstanceProperties.Builder clearTags()

A list of tags to apply to the instances that are created from these properties. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.

optional .google.cloud.compute.v1.Tags tags = 3552281;

Returns
TypeDescription
InstanceProperties.Builder

clone()

public InstanceProperties.Builder clone()
Returns
TypeDescription
InstanceProperties.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

Labels to apply to instances that are created from these properties.

map<string, string> labels = 500195327;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

containsResourceManagerTags(String key)

public boolean containsResourceManagerTags(String key)

Resource manager tags to be bound to the instance. Tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. The field is ignored (both PUT & PATCH) when empty.

map<string, string> resource_manager_tags = 377671164;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getAdvancedMachineFeatures()

public AdvancedMachineFeatures getAdvancedMachineFeatures()

Controls for advanced machine-related behavior features. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.AdvancedMachineFeatures advanced_machine_features = 409646002;

Returns
TypeDescription
AdvancedMachineFeatures

The advancedMachineFeatures.

getAdvancedMachineFeaturesBuilder()

public AdvancedMachineFeatures.Builder getAdvancedMachineFeaturesBuilder()

Controls for advanced machine-related behavior features. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.AdvancedMachineFeatures advanced_machine_features = 409646002;

Returns
TypeDescription
AdvancedMachineFeatures.Builder

getAdvancedMachineFeaturesOrBuilder()

public AdvancedMachineFeaturesOrBuilder getAdvancedMachineFeaturesOrBuilder()

Controls for advanced machine-related behavior features. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.AdvancedMachineFeatures advanced_machine_features = 409646002;

Returns
TypeDescription
AdvancedMachineFeaturesOrBuilder

getCanIpForward()

public boolean getCanIpForward()

Enables instances created based on these properties to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.

optional bool can_ip_forward = 467731324;

Returns
TypeDescription
boolean

The canIpForward.

getConfidentialInstanceConfig()

public ConfidentialInstanceConfig getConfidentialInstanceConfig()

Specifies the Confidential Instance options. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ConfidentialInstanceConfig confidential_instance_config = 490637685;

Returns
TypeDescription
ConfidentialInstanceConfig

The confidentialInstanceConfig.

getConfidentialInstanceConfigBuilder()

public ConfidentialInstanceConfig.Builder getConfidentialInstanceConfigBuilder()

Specifies the Confidential Instance options. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ConfidentialInstanceConfig confidential_instance_config = 490637685;

Returns
TypeDescription
ConfidentialInstanceConfig.Builder

getConfidentialInstanceConfigOrBuilder()

public ConfidentialInstanceConfigOrBuilder getConfidentialInstanceConfigOrBuilder()

Specifies the Confidential Instance options. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ConfidentialInstanceConfig confidential_instance_config = 490637685;

Returns
TypeDescription
ConfidentialInstanceConfigOrBuilder

getDefaultInstanceForType()

public InstanceProperties getDefaultInstanceForType()
Returns
TypeDescription
InstanceProperties

getDescription()

public String getDescription()

An optional text description for the instances that are created from these properties.

optional string description = 422937596;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

An optional text description for the instances that are created from these properties.

optional string description = 422937596;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDisks(int index)

public AttachedDisk getDisks(int index)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameter
NameDescription
indexint
Returns
TypeDescription
AttachedDisk

getDisksBuilder(int index)

public AttachedDisk.Builder getDisksBuilder(int index)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameter
NameDescription
indexint
Returns
TypeDescription
AttachedDisk.Builder

getDisksBuilderList()

public List<AttachedDisk.Builder> getDisksBuilderList()

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Returns
TypeDescription
List<Builder>

getDisksCount()

public int getDisksCount()

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Returns
TypeDescription
int

getDisksList()

public List<AttachedDisk> getDisksList()

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Returns
TypeDescription
List<AttachedDisk>

getDisksOrBuilder(int index)

public AttachedDiskOrBuilder getDisksOrBuilder(int index)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameter
NameDescription
indexint
Returns
TypeDescription
AttachedDiskOrBuilder

getDisksOrBuilderList()

public List<? extends AttachedDiskOrBuilder> getDisksOrBuilderList()

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Returns
TypeDescription
List<? extends com.google.cloud.compute.v1.AttachedDiskOrBuilder>

getGuestAccelerators(int index)

public AcceleratorConfig getGuestAccelerators(int index)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameter
NameDescription
indexint
Returns
TypeDescription
AcceleratorConfig

getGuestAcceleratorsBuilder(int index)

public AcceleratorConfig.Builder getGuestAcceleratorsBuilder(int index)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameter
NameDescription
indexint
Returns
TypeDescription
AcceleratorConfig.Builder

getGuestAcceleratorsBuilderList()

public List<AcceleratorConfig.Builder> getGuestAcceleratorsBuilderList()

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Returns
TypeDescription
List<Builder>

getGuestAcceleratorsCount()

public int getGuestAcceleratorsCount()

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Returns
TypeDescription
int

getGuestAcceleratorsList()

public List<AcceleratorConfig> getGuestAcceleratorsList()

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Returns
TypeDescription
List<AcceleratorConfig>

getGuestAcceleratorsOrBuilder(int index)

public AcceleratorConfigOrBuilder getGuestAcceleratorsOrBuilder(int index)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameter
NameDescription
indexint
Returns
TypeDescription
AcceleratorConfigOrBuilder

getGuestAcceleratorsOrBuilderList()

public List<? extends AcceleratorConfigOrBuilder> getGuestAcceleratorsOrBuilderList()

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Returns
TypeDescription
List<? extends com.google.cloud.compute.v1.AcceleratorConfigOrBuilder>

getKeyRevocationActionType()

public String getKeyRevocationActionType()

KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified. Check the KeyRevocationActionType enum for the list of possible values.

optional string key_revocation_action_type = 235941474;

Returns
TypeDescription
String

The keyRevocationActionType.

getKeyRevocationActionTypeBytes()

public ByteString getKeyRevocationActionTypeBytes()

KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified. Check the KeyRevocationActionType enum for the list of possible values.

optional string key_revocation_action_type = 235941474;

Returns
TypeDescription
ByteString

The bytes for keyRevocationActionType.

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Labels to apply to instances that are created from these properties.

map<string, string> labels = 500195327;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Labels to apply to instances that are created from these properties.

map<string, string> labels = 500195327;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Labels to apply to instances that are created from these properties.

map<string, string> labels = 500195327;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Labels to apply to instances that are created from these properties.

map<string, string> labels = 500195327;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMachineType()

public String getMachineType()

The machine type to use for instances that are created from these properties.

optional string machine_type = 227711026;

Returns
TypeDescription
String

The machineType.

getMachineTypeBytes()

public ByteString getMachineTypeBytes()

The machine type to use for instances that are created from these properties.

optional string machine_type = 227711026;

Returns
TypeDescription
ByteString

The bytes for machineType.

getMetadata()

public Metadata getMetadata()

The metadata key/value pairs to assign to instances that are created from these properties. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.

optional .google.cloud.compute.v1.Metadata metadata = 86866735;

Returns
TypeDescription
Metadata

The metadata.

getMetadataBuilder()

public Metadata.Builder getMetadataBuilder()

The metadata key/value pairs to assign to instances that are created from these properties. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.

optional .google.cloud.compute.v1.Metadata metadata = 86866735;

Returns
TypeDescription
Metadata.Builder

getMetadataOrBuilder()

public MetadataOrBuilder getMetadataOrBuilder()

The metadata key/value pairs to assign to instances that are created from these properties. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.

optional .google.cloud.compute.v1.Metadata metadata = 86866735;

Returns
TypeDescription
MetadataOrBuilder

getMinCpuPlatform()

public String getMinCpuPlatform()

Minimum cpu/platform to be used by instances. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". For more information, read Specifying a Minimum CPU Platform.

optional string min_cpu_platform = 242912759;

Returns
TypeDescription
String

The minCpuPlatform.

getMinCpuPlatformBytes()

public ByteString getMinCpuPlatformBytes()

Minimum cpu/platform to be used by instances. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". For more information, read Specifying a Minimum CPU Platform.

optional string min_cpu_platform = 242912759;

Returns
TypeDescription
ByteString

The bytes for minCpuPlatform.

getMutableLabels()

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getMutableResourceManagerTags()

public Map<String,String> getMutableResourceManagerTags()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getNetworkInterfaces(int index)

public NetworkInterface getNetworkInterfaces(int index)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameter
NameDescription
indexint
Returns
TypeDescription
NetworkInterface

getNetworkInterfacesBuilder(int index)

public NetworkInterface.Builder getNetworkInterfacesBuilder(int index)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameter
NameDescription
indexint
Returns
TypeDescription
NetworkInterface.Builder

getNetworkInterfacesBuilderList()

public List<NetworkInterface.Builder> getNetworkInterfacesBuilderList()

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Returns
TypeDescription
List<Builder>

getNetworkInterfacesCount()

public int getNetworkInterfacesCount()

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Returns
TypeDescription
int

getNetworkInterfacesList()

public List<NetworkInterface> getNetworkInterfacesList()

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Returns
TypeDescription
List<NetworkInterface>

getNetworkInterfacesOrBuilder(int index)

public NetworkInterfaceOrBuilder getNetworkInterfacesOrBuilder(int index)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameter
NameDescription
indexint
Returns
TypeDescription
NetworkInterfaceOrBuilder

getNetworkInterfacesOrBuilderList()

public List<? extends NetworkInterfaceOrBuilder> getNetworkInterfacesOrBuilderList()

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Returns
TypeDescription
List<? extends com.google.cloud.compute.v1.NetworkInterfaceOrBuilder>

getNetworkPerformanceConfig()

public NetworkPerformanceConfig getNetworkPerformanceConfig()

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.NetworkPerformanceConfig network_performance_config = 398330850;

Returns
TypeDescription
NetworkPerformanceConfig

The networkPerformanceConfig.

getNetworkPerformanceConfigBuilder()

public NetworkPerformanceConfig.Builder getNetworkPerformanceConfigBuilder()

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.NetworkPerformanceConfig network_performance_config = 398330850;

Returns
TypeDescription
NetworkPerformanceConfig.Builder

getNetworkPerformanceConfigOrBuilder()

public NetworkPerformanceConfigOrBuilder getNetworkPerformanceConfigOrBuilder()

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.NetworkPerformanceConfig network_performance_config = 398330850;

Returns
TypeDescription
NetworkPerformanceConfigOrBuilder

getPrivateIpv6GoogleAccess()

public String getPrivateIpv6GoogleAccess()

The private IPv6 google access type for VMs. If not specified, use INHERIT_FROM_SUBNETWORK as default. Note that for MachineImage, this is not supported yet. Check the PrivateIpv6GoogleAccess enum for the list of possible values.

optional string private_ipv6_google_access = 48277006;

Returns
TypeDescription
String

The privateIpv6GoogleAccess.

getPrivateIpv6GoogleAccessBytes()

public ByteString getPrivateIpv6GoogleAccessBytes()

The private IPv6 google access type for VMs. If not specified, use INHERIT_FROM_SUBNETWORK as default. Note that for MachineImage, this is not supported yet. Check the PrivateIpv6GoogleAccess enum for the list of possible values.

optional string private_ipv6_google_access = 48277006;

Returns
TypeDescription
ByteString

The bytes for privateIpv6GoogleAccess.

getReservationAffinity()

public ReservationAffinity getReservationAffinity()

Specifies the reservations that instances can consume from. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ReservationAffinity reservation_affinity = 157850683;

Returns
TypeDescription
ReservationAffinity

The reservationAffinity.

getReservationAffinityBuilder()

public ReservationAffinity.Builder getReservationAffinityBuilder()

Specifies the reservations that instances can consume from. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ReservationAffinity reservation_affinity = 157850683;

Returns
TypeDescription
ReservationAffinity.Builder

getReservationAffinityOrBuilder()

public ReservationAffinityOrBuilder getReservationAffinityOrBuilder()

Specifies the reservations that instances can consume from. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ReservationAffinity reservation_affinity = 157850683;

Returns
TypeDescription
ReservationAffinityOrBuilder

getResourceManagerTags()

public Map<String,String> getResourceManagerTags()
Returns
TypeDescription
Map<String,String>

getResourceManagerTagsCount()

public int getResourceManagerTagsCount()

Resource manager tags to be bound to the instance. Tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. The field is ignored (both PUT & PATCH) when empty.

map<string, string> resource_manager_tags = 377671164;

Returns
TypeDescription
int

getResourceManagerTagsMap()

public Map<String,String> getResourceManagerTagsMap()

Resource manager tags to be bound to the instance. Tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. The field is ignored (both PUT & PATCH) when empty.

map<string, string> resource_manager_tags = 377671164;

Returns
TypeDescription
Map<String,String>

getResourceManagerTagsOrDefault(String key, String defaultValue)

public String getResourceManagerTagsOrDefault(String key, String defaultValue)

Resource manager tags to be bound to the instance. Tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. The field is ignored (both PUT & PATCH) when empty.

map<string, string> resource_manager_tags = 377671164;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getResourceManagerTagsOrThrow(String key)

public String getResourceManagerTagsOrThrow(String key)

Resource manager tags to be bound to the instance. Tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. The field is ignored (both PUT & PATCH) when empty.

map<string, string> resource_manager_tags = 377671164;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getResourcePolicies(int index)

public String getResourcePolicies(int index)

Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported yet.

repeated string resource_policies = 22220385;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The resourcePolicies at the given index.

getResourcePoliciesBytes(int index)

public ByteString getResourcePoliciesBytes(int index)

Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported yet.

repeated string resource_policies = 22220385;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the resourcePolicies at the given index.

getResourcePoliciesCount()

public int getResourcePoliciesCount()

Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported yet.

repeated string resource_policies = 22220385;

Returns
TypeDescription
int

The count of resourcePolicies.

getResourcePoliciesList()

public ProtocolStringList getResourcePoliciesList()

Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported yet.

repeated string resource_policies = 22220385;

Returns
TypeDescription
ProtocolStringList

A list containing the resourcePolicies.

getScheduling()

public Scheduling getScheduling()

Specifies the scheduling options for the instances that are created from these properties.

optional .google.cloud.compute.v1.Scheduling scheduling = 386688404;

Returns
TypeDescription
Scheduling

The scheduling.

getSchedulingBuilder()

public Scheduling.Builder getSchedulingBuilder()

Specifies the scheduling options for the instances that are created from these properties.

optional .google.cloud.compute.v1.Scheduling scheduling = 386688404;

Returns
TypeDescription
Scheduling.Builder

getSchedulingOrBuilder()

public SchedulingOrBuilder getSchedulingOrBuilder()

Specifies the scheduling options for the instances that are created from these properties.

optional .google.cloud.compute.v1.Scheduling scheduling = 386688404;

Returns
TypeDescription
SchedulingOrBuilder

getServiceAccounts(int index)

public ServiceAccount getServiceAccounts(int index)

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Parameter
NameDescription
indexint
Returns
TypeDescription
ServiceAccount

getServiceAccountsBuilder(int index)

public ServiceAccount.Builder getServiceAccountsBuilder(int index)

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Parameter
NameDescription
indexint
Returns
TypeDescription
ServiceAccount.Builder

getServiceAccountsBuilderList()

public List<ServiceAccount.Builder> getServiceAccountsBuilderList()

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Returns
TypeDescription
List<Builder>

getServiceAccountsCount()

public int getServiceAccountsCount()

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Returns
TypeDescription
int

getServiceAccountsList()

public List<ServiceAccount> getServiceAccountsList()

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Returns
TypeDescription
List<ServiceAccount>

getServiceAccountsOrBuilder(int index)

public ServiceAccountOrBuilder getServiceAccountsOrBuilder(int index)

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Parameter
NameDescription
indexint
Returns
TypeDescription
ServiceAccountOrBuilder

getServiceAccountsOrBuilderList()

public List<? extends ServiceAccountOrBuilder> getServiceAccountsOrBuilderList()

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Returns
TypeDescription
List<? extends com.google.cloud.compute.v1.ServiceAccountOrBuilder>

getShieldedInstanceConfig()

public ShieldedInstanceConfig getShieldedInstanceConfig()

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ShieldedInstanceConfig shielded_instance_config = 12862901;

Returns
TypeDescription
ShieldedInstanceConfig

The shieldedInstanceConfig.

getShieldedInstanceConfigBuilder()

public ShieldedInstanceConfig.Builder getShieldedInstanceConfigBuilder()

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ShieldedInstanceConfig shielded_instance_config = 12862901;

Returns
TypeDescription
ShieldedInstanceConfig.Builder

getShieldedInstanceConfigOrBuilder()

public ShieldedInstanceConfigOrBuilder getShieldedInstanceConfigOrBuilder()

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ShieldedInstanceConfig shielded_instance_config = 12862901;

Returns
TypeDescription
ShieldedInstanceConfigOrBuilder

getTags()

public Tags getTags()

A list of tags to apply to the instances that are created from these properties. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.

optional .google.cloud.compute.v1.Tags tags = 3552281;

Returns
TypeDescription
Tags

The tags.

getTagsBuilder()

public Tags.Builder getTagsBuilder()

A list of tags to apply to the instances that are created from these properties. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.

optional .google.cloud.compute.v1.Tags tags = 3552281;

Returns
TypeDescription
Tags.Builder

getTagsOrBuilder()

public TagsOrBuilder getTagsOrBuilder()

A list of tags to apply to the instances that are created from these properties. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.

optional .google.cloud.compute.v1.Tags tags = 3552281;

Returns
TypeDescription
TagsOrBuilder

hasAdvancedMachineFeatures()

public boolean hasAdvancedMachineFeatures()

Controls for advanced machine-related behavior features. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.AdvancedMachineFeatures advanced_machine_features = 409646002;

Returns
TypeDescription
boolean

Whether the advancedMachineFeatures field is set.

hasCanIpForward()

public boolean hasCanIpForward()

Enables instances created based on these properties to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.

optional bool can_ip_forward = 467731324;

Returns
TypeDescription
boolean

Whether the canIpForward field is set.

hasConfidentialInstanceConfig()

public boolean hasConfidentialInstanceConfig()

Specifies the Confidential Instance options. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ConfidentialInstanceConfig confidential_instance_config = 490637685;

Returns
TypeDescription
boolean

Whether the confidentialInstanceConfig field is set.

hasDescription()

public boolean hasDescription()

An optional text description for the instances that are created from these properties.

optional string description = 422937596;

Returns
TypeDescription
boolean

Whether the description field is set.

hasKeyRevocationActionType()

public boolean hasKeyRevocationActionType()

KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified. Check the KeyRevocationActionType enum for the list of possible values.

optional string key_revocation_action_type = 235941474;

Returns
TypeDescription
boolean

Whether the keyRevocationActionType field is set.

hasMachineType()

public boolean hasMachineType()

The machine type to use for instances that are created from these properties.

optional string machine_type = 227711026;

Returns
TypeDescription
boolean

Whether the machineType field is set.

hasMetadata()

public boolean hasMetadata()

The metadata key/value pairs to assign to instances that are created from these properties. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.

optional .google.cloud.compute.v1.Metadata metadata = 86866735;

Returns
TypeDescription
boolean

Whether the metadata field is set.

hasMinCpuPlatform()

public boolean hasMinCpuPlatform()

Minimum cpu/platform to be used by instances. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". For more information, read Specifying a Minimum CPU Platform.

optional string min_cpu_platform = 242912759;

Returns
TypeDescription
boolean

Whether the minCpuPlatform field is set.

hasNetworkPerformanceConfig()

public boolean hasNetworkPerformanceConfig()

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.NetworkPerformanceConfig network_performance_config = 398330850;

Returns
TypeDescription
boolean

Whether the networkPerformanceConfig field is set.

hasPrivateIpv6GoogleAccess()

public boolean hasPrivateIpv6GoogleAccess()

The private IPv6 google access type for VMs. If not specified, use INHERIT_FROM_SUBNETWORK as default. Note that for MachineImage, this is not supported yet. Check the PrivateIpv6GoogleAccess enum for the list of possible values.

optional string private_ipv6_google_access = 48277006;

Returns
TypeDescription
boolean

Whether the privateIpv6GoogleAccess field is set.

hasReservationAffinity()

public boolean hasReservationAffinity()

Specifies the reservations that instances can consume from. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ReservationAffinity reservation_affinity = 157850683;

Returns
TypeDescription
boolean

Whether the reservationAffinity field is set.

hasScheduling()

public boolean hasScheduling()

Specifies the scheduling options for the instances that are created from these properties.

optional .google.cloud.compute.v1.Scheduling scheduling = 386688404;

Returns
TypeDescription
boolean

Whether the scheduling field is set.

hasShieldedInstanceConfig()

public boolean hasShieldedInstanceConfig()

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ShieldedInstanceConfig shielded_instance_config = 12862901;

Returns
TypeDescription
boolean

Whether the shieldedInstanceConfig field is set.

hasTags()

public boolean hasTags()

A list of tags to apply to the instances that are created from these properties. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.

optional .google.cloud.compute.v1.Tags tags = 3552281;

Returns
TypeDescription
boolean

Whether the tags field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeAdvancedMachineFeatures(AdvancedMachineFeatures value)

public InstanceProperties.Builder mergeAdvancedMachineFeatures(AdvancedMachineFeatures value)

Controls for advanced machine-related behavior features. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.AdvancedMachineFeatures advanced_machine_features = 409646002;

Parameter
NameDescription
valueAdvancedMachineFeatures
Returns
TypeDescription
InstanceProperties.Builder

mergeConfidentialInstanceConfig(ConfidentialInstanceConfig value)

public InstanceProperties.Builder mergeConfidentialInstanceConfig(ConfidentialInstanceConfig value)

Specifies the Confidential Instance options. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ConfidentialInstanceConfig confidential_instance_config = 490637685;

Parameter
NameDescription
valueConfidentialInstanceConfig
Returns
TypeDescription
InstanceProperties.Builder

mergeFrom(InstanceProperties other)

public InstanceProperties.Builder mergeFrom(InstanceProperties other)
Parameter
NameDescription
otherInstanceProperties
Returns
TypeDescription
InstanceProperties.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeMetadata(Metadata value)

public InstanceProperties.Builder mergeMetadata(Metadata value)

The metadata key/value pairs to assign to instances that are created from these properties. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.

optional .google.cloud.compute.v1.Metadata metadata = 86866735;

Parameter
NameDescription
valueMetadata
Returns
TypeDescription
InstanceProperties.Builder

mergeNetworkPerformanceConfig(NetworkPerformanceConfig value)

public InstanceProperties.Builder mergeNetworkPerformanceConfig(NetworkPerformanceConfig value)

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.NetworkPerformanceConfig network_performance_config = 398330850;

Parameter
NameDescription
valueNetworkPerformanceConfig
Returns
TypeDescription
InstanceProperties.Builder

mergeReservationAffinity(ReservationAffinity value)

public InstanceProperties.Builder mergeReservationAffinity(ReservationAffinity value)

Specifies the reservations that instances can consume from. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ReservationAffinity reservation_affinity = 157850683;

Parameter
NameDescription
valueReservationAffinity
Returns
TypeDescription
InstanceProperties.Builder

mergeScheduling(Scheduling value)

public InstanceProperties.Builder mergeScheduling(Scheduling value)

Specifies the scheduling options for the instances that are created from these properties.

optional .google.cloud.compute.v1.Scheduling scheduling = 386688404;

Parameter
NameDescription
valueScheduling
Returns
TypeDescription
InstanceProperties.Builder

mergeShieldedInstanceConfig(ShieldedInstanceConfig value)

public InstanceProperties.Builder mergeShieldedInstanceConfig(ShieldedInstanceConfig value)

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ShieldedInstanceConfig shielded_instance_config = 12862901;

Parameter
NameDescription
valueShieldedInstanceConfig
Returns
TypeDescription
InstanceProperties.Builder

mergeTags(Tags value)

public InstanceProperties.Builder mergeTags(Tags value)

A list of tags to apply to the instances that are created from these properties. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.

optional .google.cloud.compute.v1.Tags tags = 3552281;

Parameter
NameDescription
valueTags
Returns
TypeDescription
InstanceProperties.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllLabels(Map<String,String> values)

public InstanceProperties.Builder putAllLabels(Map<String,String> values)

Labels to apply to instances that are created from these properties.

map<string, string> labels = 500195327;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
InstanceProperties.Builder

putAllResourceManagerTags(Map<String,String> values)

public InstanceProperties.Builder putAllResourceManagerTags(Map<String,String> values)

Resource manager tags to be bound to the instance. Tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. The field is ignored (both PUT & PATCH) when empty.

map<string, string> resource_manager_tags = 377671164;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
InstanceProperties.Builder

putLabels(String key, String value)

public InstanceProperties.Builder putLabels(String key, String value)

Labels to apply to instances that are created from these properties.

map<string, string> labels = 500195327;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
InstanceProperties.Builder

putResourceManagerTags(String key, String value)

public InstanceProperties.Builder putResourceManagerTags(String key, String value)

Resource manager tags to be bound to the instance. Tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. The field is ignored (both PUT & PATCH) when empty.

map<string, string> resource_manager_tags = 377671164;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
InstanceProperties.Builder

removeDisks(int index)

public InstanceProperties.Builder removeDisks(int index)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameter
NameDescription
indexint
Returns
TypeDescription
InstanceProperties.Builder

removeGuestAccelerators(int index)

public InstanceProperties.Builder removeGuestAccelerators(int index)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameter
NameDescription
indexint
Returns
TypeDescription
InstanceProperties.Builder

removeLabels(String key)

public InstanceProperties.Builder removeLabels(String key)

Labels to apply to instances that are created from these properties.

map<string, string> labels = 500195327;

Parameter
NameDescription
keyString
Returns
TypeDescription
InstanceProperties.Builder

removeNetworkInterfaces(int index)

public InstanceProperties.Builder removeNetworkInterfaces(int index)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameter
NameDescription
indexint
Returns
TypeDescription
InstanceProperties.Builder

removeResourceManagerTags(String key)

public InstanceProperties.Builder removeResourceManagerTags(String key)

Resource manager tags to be bound to the instance. Tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. The field is ignored (both PUT & PATCH) when empty.

map<string, string> resource_manager_tags = 377671164;

Parameter
NameDescription
keyString
Returns
TypeDescription
InstanceProperties.Builder

removeServiceAccounts(int index)

public InstanceProperties.Builder removeServiceAccounts(int index)

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Parameter
NameDescription
indexint
Returns
TypeDescription
InstanceProperties.Builder

setAdvancedMachineFeatures(AdvancedMachineFeatures value)

public InstanceProperties.Builder setAdvancedMachineFeatures(AdvancedMachineFeatures value)

Controls for advanced machine-related behavior features. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.AdvancedMachineFeatures advanced_machine_features = 409646002;

Parameter
NameDescription
valueAdvancedMachineFeatures
Returns
TypeDescription
InstanceProperties.Builder

setAdvancedMachineFeatures(AdvancedMachineFeatures.Builder builderForValue)

public InstanceProperties.Builder setAdvancedMachineFeatures(AdvancedMachineFeatures.Builder builderForValue)

Controls for advanced machine-related behavior features. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.AdvancedMachineFeatures advanced_machine_features = 409646002;

Parameter
NameDescription
builderForValueAdvancedMachineFeatures.Builder
Returns
TypeDescription
InstanceProperties.Builder

setCanIpForward(boolean value)

public InstanceProperties.Builder setCanIpForward(boolean value)

Enables instances created based on these properties to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. See the Enable IP forwarding documentation for more information.

optional bool can_ip_forward = 467731324;

Parameter
NameDescription
valueboolean

The canIpForward to set.

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

setConfidentialInstanceConfig(ConfidentialInstanceConfig value)

public InstanceProperties.Builder setConfidentialInstanceConfig(ConfidentialInstanceConfig value)

Specifies the Confidential Instance options. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ConfidentialInstanceConfig confidential_instance_config = 490637685;

Parameter
NameDescription
valueConfidentialInstanceConfig
Returns
TypeDescription
InstanceProperties.Builder

setConfidentialInstanceConfig(ConfidentialInstanceConfig.Builder builderForValue)

public InstanceProperties.Builder setConfidentialInstanceConfig(ConfidentialInstanceConfig.Builder builderForValue)

Specifies the Confidential Instance options. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ConfidentialInstanceConfig confidential_instance_config = 490637685;

Parameter
NameDescription
builderForValueConfidentialInstanceConfig.Builder
Returns
TypeDescription
InstanceProperties.Builder

setDescription(String value)

public InstanceProperties.Builder setDescription(String value)

An optional text description for the instances that are created from these properties.

optional string description = 422937596;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public InstanceProperties.Builder setDescriptionBytes(ByteString value)

An optional text description for the instances that are created from these properties.

optional string description = 422937596;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

setDisks(int index, AttachedDisk value)

public InstanceProperties.Builder setDisks(int index, AttachedDisk value)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameters
NameDescription
indexint
valueAttachedDisk
Returns
TypeDescription
InstanceProperties.Builder

setDisks(int index, AttachedDisk.Builder builderForValue)

public InstanceProperties.Builder setDisks(int index, AttachedDisk.Builder builderForValue)

An array of disks that are associated with the instances that are created from these properties.

repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;

Parameters
NameDescription
indexint
builderForValueAttachedDisk.Builder
Returns
TypeDescription
InstanceProperties.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setGuestAccelerators(int index, AcceleratorConfig value)

public InstanceProperties.Builder setGuestAccelerators(int index, AcceleratorConfig value)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameters
NameDescription
indexint
valueAcceleratorConfig
Returns
TypeDescription
InstanceProperties.Builder

setGuestAccelerators(int index, AcceleratorConfig.Builder builderForValue)

public InstanceProperties.Builder setGuestAccelerators(int index, AcceleratorConfig.Builder builderForValue)

A list of guest accelerator cards' type and count to use for instances created from these properties.

repeated .google.cloud.compute.v1.AcceleratorConfig guest_accelerators = 463595119;

Parameters
NameDescription
indexint
builderForValueAcceleratorConfig.Builder
Returns
TypeDescription
InstanceProperties.Builder

setKeyRevocationActionType(String value)

public InstanceProperties.Builder setKeyRevocationActionType(String value)

KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified. Check the KeyRevocationActionType enum for the list of possible values.

optional string key_revocation_action_type = 235941474;

Parameter
NameDescription
valueString

The keyRevocationActionType to set.

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

setKeyRevocationActionTypeBytes(ByteString value)

public InstanceProperties.Builder setKeyRevocationActionTypeBytes(ByteString value)

KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified. Check the KeyRevocationActionType enum for the list of possible values.

optional string key_revocation_action_type = 235941474;

Parameter
NameDescription
valueByteString

The bytes for keyRevocationActionType to set.

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

setMachineType(String value)

public InstanceProperties.Builder setMachineType(String value)

The machine type to use for instances that are created from these properties.

optional string machine_type = 227711026;

Parameter
NameDescription
valueString

The machineType to set.

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

setMachineTypeBytes(ByteString value)

public InstanceProperties.Builder setMachineTypeBytes(ByteString value)

The machine type to use for instances that are created from these properties.

optional string machine_type = 227711026;

Parameter
NameDescription
valueByteString

The bytes for machineType to set.

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

setMetadata(Metadata value)

public InstanceProperties.Builder setMetadata(Metadata value)

The metadata key/value pairs to assign to instances that are created from these properties. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.

optional .google.cloud.compute.v1.Metadata metadata = 86866735;

Parameter
NameDescription
valueMetadata
Returns
TypeDescription
InstanceProperties.Builder

setMetadata(Metadata.Builder builderForValue)

public InstanceProperties.Builder setMetadata(Metadata.Builder builderForValue)

The metadata key/value pairs to assign to instances that are created from these properties. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information.

optional .google.cloud.compute.v1.Metadata metadata = 86866735;

Parameter
NameDescription
builderForValueMetadata.Builder
Returns
TypeDescription
InstanceProperties.Builder

setMinCpuPlatform(String value)

public InstanceProperties.Builder setMinCpuPlatform(String value)

Minimum cpu/platform to be used by instances. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". For more information, read Specifying a Minimum CPU Platform.

optional string min_cpu_platform = 242912759;

Parameter
NameDescription
valueString

The minCpuPlatform to set.

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

setMinCpuPlatformBytes(ByteString value)

public InstanceProperties.Builder setMinCpuPlatformBytes(ByteString value)

Minimum cpu/platform to be used by instances. The instance may be scheduled on the specified or newer cpu/platform. Applicable values are the friendly names of CPU platforms, such as minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy Bridge". For more information, read Specifying a Minimum CPU Platform.

optional string min_cpu_platform = 242912759;

Parameter
NameDescription
valueByteString

The bytes for minCpuPlatform to set.

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

setNetworkInterfaces(int index, NetworkInterface value)

public InstanceProperties.Builder setNetworkInterfaces(int index, NetworkInterface value)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameters
NameDescription
indexint
valueNetworkInterface
Returns
TypeDescription
InstanceProperties.Builder

setNetworkInterfaces(int index, NetworkInterface.Builder builderForValue)

public InstanceProperties.Builder setNetworkInterfaces(int index, NetworkInterface.Builder builderForValue)

An array of network access configurations for this interface.

repeated .google.cloud.compute.v1.NetworkInterface network_interfaces = 52735243;

Parameters
NameDescription
indexint
builderForValueNetworkInterface.Builder
Returns
TypeDescription
InstanceProperties.Builder

setNetworkPerformanceConfig(NetworkPerformanceConfig value)

public InstanceProperties.Builder setNetworkPerformanceConfig(NetworkPerformanceConfig value)

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.NetworkPerformanceConfig network_performance_config = 398330850;

Parameter
NameDescription
valueNetworkPerformanceConfig
Returns
TypeDescription
InstanceProperties.Builder

setNetworkPerformanceConfig(NetworkPerformanceConfig.Builder builderForValue)

public InstanceProperties.Builder setNetworkPerformanceConfig(NetworkPerformanceConfig.Builder builderForValue)

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.NetworkPerformanceConfig network_performance_config = 398330850;

Parameter
NameDescription
builderForValueNetworkPerformanceConfig.Builder
Returns
TypeDescription
InstanceProperties.Builder

setPrivateIpv6GoogleAccess(String value)

public InstanceProperties.Builder setPrivateIpv6GoogleAccess(String value)

The private IPv6 google access type for VMs. If not specified, use INHERIT_FROM_SUBNETWORK as default. Note that for MachineImage, this is not supported yet. Check the PrivateIpv6GoogleAccess enum for the list of possible values.

optional string private_ipv6_google_access = 48277006;

Parameter
NameDescription
valueString

The privateIpv6GoogleAccess to set.

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

setPrivateIpv6GoogleAccessBytes(ByteString value)

public InstanceProperties.Builder setPrivateIpv6GoogleAccessBytes(ByteString value)

The private IPv6 google access type for VMs. If not specified, use INHERIT_FROM_SUBNETWORK as default. Note that for MachineImage, this is not supported yet. Check the PrivateIpv6GoogleAccess enum for the list of possible values.

optional string private_ipv6_google_access = 48277006;

Parameter
NameDescription
valueByteString

The bytes for privateIpv6GoogleAccess to set.

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

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

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

setReservationAffinity(ReservationAffinity value)

public InstanceProperties.Builder setReservationAffinity(ReservationAffinity value)

Specifies the reservations that instances can consume from. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ReservationAffinity reservation_affinity = 157850683;

Parameter
NameDescription
valueReservationAffinity
Returns
TypeDescription
InstanceProperties.Builder

setReservationAffinity(ReservationAffinity.Builder builderForValue)

public InstanceProperties.Builder setReservationAffinity(ReservationAffinity.Builder builderForValue)

Specifies the reservations that instances can consume from. Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ReservationAffinity reservation_affinity = 157850683;

Parameter
NameDescription
builderForValueReservationAffinity.Builder
Returns
TypeDescription
InstanceProperties.Builder

setResourcePolicies(int index, String value)

public InstanceProperties.Builder setResourcePolicies(int index, String value)

Resource policies (names, not URLs) applied to instances created from these properties. Note that for MachineImage, this is not supported yet.

repeated string resource_policies = 22220385;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The resourcePolicies to set.

Returns
TypeDescription
InstanceProperties.Builder

This builder for chaining.

setScheduling(Scheduling value)

public InstanceProperties.Builder setScheduling(Scheduling value)

Specifies the scheduling options for the instances that are created from these properties.

optional .google.cloud.compute.v1.Scheduling scheduling = 386688404;

Parameter
NameDescription
valueScheduling
Returns
TypeDescription
InstanceProperties.Builder

setScheduling(Scheduling.Builder builderForValue)

public InstanceProperties.Builder setScheduling(Scheduling.Builder builderForValue)

Specifies the scheduling options for the instances that are created from these properties.

optional .google.cloud.compute.v1.Scheduling scheduling = 386688404;

Parameter
NameDescription
builderForValueScheduling.Builder
Returns
TypeDescription
InstanceProperties.Builder

setServiceAccounts(int index, ServiceAccount value)

public InstanceProperties.Builder setServiceAccounts(int index, ServiceAccount value)

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Parameters
NameDescription
indexint
valueServiceAccount
Returns
TypeDescription
InstanceProperties.Builder

setServiceAccounts(int index, ServiceAccount.Builder builderForValue)

public InstanceProperties.Builder setServiceAccounts(int index, ServiceAccount.Builder builderForValue)

A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from these properties. Use metadata queries to obtain the access tokens for these instances.

repeated .google.cloud.compute.v1.ServiceAccount service_accounts = 277537328;

Parameters
NameDescription
indexint
builderForValueServiceAccount.Builder
Returns
TypeDescription
InstanceProperties.Builder

setShieldedInstanceConfig(ShieldedInstanceConfig value)

public InstanceProperties.Builder setShieldedInstanceConfig(ShieldedInstanceConfig value)

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ShieldedInstanceConfig shielded_instance_config = 12862901;

Parameter
NameDescription
valueShieldedInstanceConfig
Returns
TypeDescription
InstanceProperties.Builder

setShieldedInstanceConfig(ShieldedInstanceConfig.Builder builderForValue)

public InstanceProperties.Builder setShieldedInstanceConfig(ShieldedInstanceConfig.Builder builderForValue)

Note that for MachineImage, this is not supported yet.

optional .google.cloud.compute.v1.ShieldedInstanceConfig shielded_instance_config = 12862901;

Parameter
NameDescription
builderForValueShieldedInstanceConfig.Builder
Returns
TypeDescription
InstanceProperties.Builder

setTags(Tags value)

public InstanceProperties.Builder setTags(Tags value)

A list of tags to apply to the instances that are created from these properties. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.

optional .google.cloud.compute.v1.Tags tags = 3552281;

Parameter
NameDescription
valueTags
Returns
TypeDescription
InstanceProperties.Builder

setTags(Tags.Builder builderForValue)

public InstanceProperties.Builder setTags(Tags.Builder builderForValue)

A list of tags to apply to the instances that are created from these properties. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035.

optional .google.cloud.compute.v1.Tags tags = 3552281;

Parameter
NameDescription
builderForValueTags.Builder
Returns
TypeDescription
InstanceProperties.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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