Class ShareSettings.Builder (1.93.0)

public static final class ShareSettings.Builder extends GeneratedMessage.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

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

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.

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 GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.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

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

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.