Class ShareSettings.Builder (1.64.0)

public static final class ShareSettings.Builder extends GeneratedMessageV3.Builder<ShareSettings.Builder> implements ShareSettingsOrBuilder

The share setting for reservations and sole tenancy node groups.

Protobuf type google.cloud.compute.v1.ShareSettings

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ShareSettings build()
Returns
Type Description
ShareSettings

buildPartial()

public ShareSettings buildPartial()
Returns
Type Description
ShareSettings

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearProjectMap()

public ShareSettings.Builder clearProjectMap()
Returns
Type Description
ShareSettings.Builder

clearShareType()

public ShareSettings.Builder clearShareType()

Type of sharing for this shared-reservation Check the ShareType enum for the list of possible values.

optional string share_type = 359533466;

Returns
Type Description
ShareSettings.Builder

This builder for chaining.

clone()

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

containsProjectMap(String key)

public boolean containsProjectMap(String key)

A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS.

map<string, .google.cloud.compute.v1.ShareSettingsProjectConfig> project_map = 134212406;

Parameter
Name Description
key String
Returns
Type Description
boolean

getDefaultInstanceForType()

public ShareSettings getDefaultInstanceForType()
Returns
Type Description
ShareSettings

getDescriptorForType()

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

getMutableProjectMap() (deprecated)

public Map<String,ShareSettingsProjectConfig> getMutableProjectMap()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,ShareSettingsProjectConfig>

getProjectMap() (deprecated)

public Map<String,ShareSettingsProjectConfig> getProjectMap()

Use #getProjectMapMap() instead.

Returns
Type Description
Map<String,ShareSettingsProjectConfig>

getProjectMapCount()

public int getProjectMapCount()

A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS.

map<string, .google.cloud.compute.v1.ShareSettingsProjectConfig> project_map = 134212406;

Returns
Type Description
int

getProjectMapMap()

public Map<String,ShareSettingsProjectConfig> getProjectMapMap()

A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS.

map<string, .google.cloud.compute.v1.ShareSettingsProjectConfig> project_map = 134212406;

Returns
Type Description
Map<String,ShareSettingsProjectConfig>

getProjectMapOrDefault(String key, ShareSettingsProjectConfig defaultValue)

public ShareSettingsProjectConfig getProjectMapOrDefault(String key, ShareSettingsProjectConfig defaultValue)

A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS.

map<string, .google.cloud.compute.v1.ShareSettingsProjectConfig> project_map = 134212406;

Parameters
Name Description
key String
defaultValue ShareSettingsProjectConfig
Returns
Type Description
ShareSettingsProjectConfig

getProjectMapOrThrow(String key)

public ShareSettingsProjectConfig getProjectMapOrThrow(String key)

A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS.

map<string, .google.cloud.compute.v1.ShareSettingsProjectConfig> project_map = 134212406;

Parameter
Name Description
key String
Returns
Type Description
ShareSettingsProjectConfig

getShareType()

public String getShareType()

Type of sharing for this shared-reservation Check the ShareType enum for the list of possible values.

optional string share_type = 359533466;

Returns
Type Description
String

The shareType.

getShareTypeBytes()

public ByteString getShareTypeBytes()

Type of sharing for this shared-reservation Check the ShareType enum for the list of possible values.

optional string share_type = 359533466;

Returns
Type Description
ByteString

The bytes for shareType.

hasShareType()

public boolean hasShareType()

Type of sharing for this shared-reservation Check the ShareType enum for the list of possible values.

optional string share_type = 359533466;

Returns
Type Description
boolean

Whether the shareType field is set.

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ShareSettings other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllProjectMap(Map<String,ShareSettingsProjectConfig> values)

public ShareSettings.Builder putAllProjectMap(Map<String,ShareSettingsProjectConfig> values)

A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS.

map<string, .google.cloud.compute.v1.ShareSettingsProjectConfig> project_map = 134212406;

Parameter
Name Description
values Map<String,ShareSettingsProjectConfig>
Returns
Type Description
ShareSettings.Builder

putProjectMap(String key, ShareSettingsProjectConfig value)

public ShareSettings.Builder putProjectMap(String key, ShareSettingsProjectConfig value)

A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS.

map<string, .google.cloud.compute.v1.ShareSettingsProjectConfig> project_map = 134212406;

Parameters
Name Description
key String
value ShareSettingsProjectConfig
Returns
Type Description
ShareSettings.Builder

putProjectMapBuilderIfAbsent(String key)

public ShareSettingsProjectConfig.Builder putProjectMapBuilderIfAbsent(String key)

A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS.

map<string, .google.cloud.compute.v1.ShareSettingsProjectConfig> project_map = 134212406;

Parameter
Name Description
key String
Returns
Type Description
ShareSettingsProjectConfig.Builder

removeProjectMap(String key)

public ShareSettings.Builder removeProjectMap(String key)

A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS.

map<string, .google.cloud.compute.v1.ShareSettingsProjectConfig> project_map = 134212406;

Parameter
Name Description
key String
Returns
Type Description
ShareSettings.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setShareType(String value)

public ShareSettings.Builder setShareType(String value)

Type of sharing for this shared-reservation Check the ShareType enum for the list of possible values.

optional string share_type = 359533466;

Parameter
Name Description
value String

The shareType to set.

Returns
Type Description
ShareSettings.Builder

This builder for chaining.

setShareTypeBytes(ByteString value)

public ShareSettings.Builder setShareTypeBytes(ByteString value)

Type of sharing for this shared-reservation Check the ShareType enum for the list of possible values.

optional string share_type = 359533466;

Parameter
Name Description
value ByteString

The bytes for shareType to set.

Returns
Type Description
ShareSettings.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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