Class InstanceSettings.Builder (1.53.0)

public static final class InstanceSettings.Builder extends GeneratedMessageV3.Builder<InstanceSettings.Builder> implements InstanceSettingsOrBuilder

Represents a Instance Settings resource. You can use instance settings to configure default settings for Compute Engine VM instances. For example, you can use it to configure default machine type of Compute Engine VM instances.

Protobuf type google.cloud.compute.v1.InstanceSettings

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public InstanceSettings.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
InstanceSettings.Builder
Overrides

build()

public InstanceSettings build()
Returns
Type Description
InstanceSettings

buildPartial()

public InstanceSettings buildPartial()
Returns
Type Description
InstanceSettings

clear()

public InstanceSettings.Builder clear()
Returns
Type Description
InstanceSettings.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public InstanceSettings.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
InstanceSettings.Builder
Overrides

clearFingerprint()

public InstanceSettings.Builder clearFingerprint()

Specifies a fingerprint for instance settings, which is essentially a hash of the instance settings resource's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance settings resource. You must always provide an up-to-date fingerprint hash in order to update or change the resource, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource.

optional string fingerprint = 234678500;

Returns
Type Description
InstanceSettings.Builder

This builder for chaining.

clearKind()

public InstanceSettings.Builder clearKind()

[Output Only] Type of the resource. Always compute#instance_settings for instance settings.

optional string kind = 3292052;

Returns
Type Description
InstanceSettings.Builder

This builder for chaining.

clearMetadata()

public InstanceSettings.Builder clearMetadata()

The metadata key/value pairs assigned to all the instances in the corresponding scope.

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

Returns
Type Description
InstanceSettings.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public InstanceSettings.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
InstanceSettings.Builder
Overrides

clearZone()

public InstanceSettings.Builder clearZone()

[Output Only] URL of the zone where the resource resides You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

optional string zone = 3744684;

Returns
Type Description
InstanceSettings.Builder

This builder for chaining.

clone()

public InstanceSettings.Builder clone()
Returns
Type Description
InstanceSettings.Builder
Overrides

getDefaultInstanceForType()

public InstanceSettings getDefaultInstanceForType()
Returns
Type Description
InstanceSettings

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getFingerprint()

public String getFingerprint()

Specifies a fingerprint for instance settings, which is essentially a hash of the instance settings resource's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance settings resource. You must always provide an up-to-date fingerprint hash in order to update or change the resource, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource.

optional string fingerprint = 234678500;

Returns
Type Description
String

The fingerprint.

getFingerprintBytes()

public ByteString getFingerprintBytes()

Specifies a fingerprint for instance settings, which is essentially a hash of the instance settings resource's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance settings resource. You must always provide an up-to-date fingerprint hash in order to update or change the resource, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource.

optional string fingerprint = 234678500;

Returns
Type Description
ByteString

The bytes for fingerprint.

getKind()

public String getKind()

[Output Only] Type of the resource. Always compute#instance_settings for instance settings.

optional string kind = 3292052;

Returns
Type Description
String

The kind.

getKindBytes()

public ByteString getKindBytes()

[Output Only] Type of the resource. Always compute#instance_settings for instance settings.

optional string kind = 3292052;

Returns
Type Description
ByteString

The bytes for kind.

getMetadata()

public InstanceSettingsMetadata getMetadata()

The metadata key/value pairs assigned to all the instances in the corresponding scope.

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

Returns
Type Description
InstanceSettingsMetadata

The metadata.

getMetadataBuilder()

public InstanceSettingsMetadata.Builder getMetadataBuilder()

The metadata key/value pairs assigned to all the instances in the corresponding scope.

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

Returns
Type Description
InstanceSettingsMetadata.Builder

getMetadataOrBuilder()

public InstanceSettingsMetadataOrBuilder getMetadataOrBuilder()

The metadata key/value pairs assigned to all the instances in the corresponding scope.

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

Returns
Type Description
InstanceSettingsMetadataOrBuilder

getZone()

public String getZone()

[Output Only] URL of the zone where the resource resides You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

optional string zone = 3744684;

Returns
Type Description
String

The zone.

getZoneBytes()

public ByteString getZoneBytes()

[Output Only] URL of the zone where the resource resides You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

optional string zone = 3744684;

Returns
Type Description
ByteString

The bytes for zone.

hasFingerprint()

public boolean hasFingerprint()

Specifies a fingerprint for instance settings, which is essentially a hash of the instance settings resource's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance settings resource. You must always provide an up-to-date fingerprint hash in order to update or change the resource, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource.

optional string fingerprint = 234678500;

Returns
Type Description
boolean

Whether the fingerprint field is set.

hasKind()

public boolean hasKind()

[Output Only] Type of the resource. Always compute#instance_settings for instance settings.

optional string kind = 3292052;

Returns
Type Description
boolean

Whether the kind field is set.

hasMetadata()

public boolean hasMetadata()

The metadata key/value pairs assigned to all the instances in the corresponding scope.

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

Returns
Type Description
boolean

Whether the metadata field is set.

hasZone()

public boolean hasZone()

[Output Only] URL of the zone where the resource resides You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

optional string zone = 3744684;

Returns
Type Description
boolean

Whether the zone field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(InstanceSettings other)

public InstanceSettings.Builder mergeFrom(InstanceSettings other)
Parameter
Name Description
other InstanceSettings
Returns
Type Description
InstanceSettings.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public InstanceSettings.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
InstanceSettings.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public InstanceSettings.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
InstanceSettings.Builder
Overrides

mergeMetadata(InstanceSettingsMetadata value)

public InstanceSettings.Builder mergeMetadata(InstanceSettingsMetadata value)

The metadata key/value pairs assigned to all the instances in the corresponding scope.

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

Parameter
Name Description
value InstanceSettingsMetadata
Returns
Type Description
InstanceSettings.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final InstanceSettings.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
InstanceSettings.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public InstanceSettings.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
InstanceSettings.Builder
Overrides

setFingerprint(String value)

public InstanceSettings.Builder setFingerprint(String value)

Specifies a fingerprint for instance settings, which is essentially a hash of the instance settings resource's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance settings resource. You must always provide an up-to-date fingerprint hash in order to update or change the resource, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource.

optional string fingerprint = 234678500;

Parameter
Name Description
value String

The fingerprint to set.

Returns
Type Description
InstanceSettings.Builder

This builder for chaining.

setFingerprintBytes(ByteString value)

public InstanceSettings.Builder setFingerprintBytes(ByteString value)

Specifies a fingerprint for instance settings, which is essentially a hash of the instance settings resource's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance settings resource. You must always provide an up-to-date fingerprint hash in order to update or change the resource, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource.

optional string fingerprint = 234678500;

Parameter
Name Description
value ByteString

The bytes for fingerprint to set.

Returns
Type Description
InstanceSettings.Builder

This builder for chaining.

setKind(String value)

public InstanceSettings.Builder setKind(String value)

[Output Only] Type of the resource. Always compute#instance_settings for instance settings.

optional string kind = 3292052;

Parameter
Name Description
value String

The kind to set.

Returns
Type Description
InstanceSettings.Builder

This builder for chaining.

setKindBytes(ByteString value)

public InstanceSettings.Builder setKindBytes(ByteString value)

[Output Only] Type of the resource. Always compute#instance_settings for instance settings.

optional string kind = 3292052;

Parameter
Name Description
value ByteString

The bytes for kind to set.

Returns
Type Description
InstanceSettings.Builder

This builder for chaining.

setMetadata(InstanceSettingsMetadata value)

public InstanceSettings.Builder setMetadata(InstanceSettingsMetadata value)

The metadata key/value pairs assigned to all the instances in the corresponding scope.

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

Parameter
Name Description
value InstanceSettingsMetadata
Returns
Type Description
InstanceSettings.Builder

setMetadata(InstanceSettingsMetadata.Builder builderForValue)

public InstanceSettings.Builder setMetadata(InstanceSettingsMetadata.Builder builderForValue)

The metadata key/value pairs assigned to all the instances in the corresponding scope.

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

Parameter
Name Description
builderForValue InstanceSettingsMetadata.Builder
Returns
Type Description
InstanceSettings.Builder

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

public InstanceSettings.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
InstanceSettings.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final InstanceSettings.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
InstanceSettings.Builder
Overrides

setZone(String value)

public InstanceSettings.Builder setZone(String value)

[Output Only] URL of the zone where the resource resides You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

optional string zone = 3744684;

Parameter
Name Description
value String

The zone to set.

Returns
Type Description
InstanceSettings.Builder

This builder for chaining.

setZoneBytes(ByteString value)

public InstanceSettings.Builder setZoneBytes(ByteString value)

[Output Only] URL of the zone where the resource resides You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

optional string zone = 3744684;

Parameter
Name Description
value ByteString

The bytes for zone to set.

Returns
Type Description
InstanceSettings.Builder

This builder for chaining.