Class ShareSettings.Builder (1.23.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ShareSettings build()
Returns
TypeDescription
ShareSettings

buildPartial()

public ShareSettings buildPartial()
Returns
TypeDescription
ShareSettings

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearProjectMap()

public ShareSettings.Builder clearProjectMap()
Returns
TypeDescription
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
TypeDescription
ShareSettings.Builder

This builder for chaining.

clone()

public ShareSettings.Builder clone()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public ShareSettings getDefaultInstanceForType()
Returns
TypeDescription
ShareSettings

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMutableProjectMap()

public Map<String,ShareSettingsProjectConfig> getMutableProjectMap()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,ShareSettingsProjectConfig>

getProjectMap()

public Map<String,ShareSettingsProjectConfig> getProjectMap()

Use #getProjectMapMap() instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValueShareSettingsProjectConfig
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the shareType 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

mergeFrom(ShareSettings other)

public ShareSettings.Builder mergeFrom(ShareSettings other)
Parameter
NameDescription
otherShareSettings
Returns
TypeDescription
ShareSettings.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ShareSettings.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuesMap<String,ShareSettingsProjectConfig>
Returns
TypeDescription
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
NameDescription
keyString
valueShareSettingsProjectConfig
Returns
TypeDescription
ShareSettings.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
NameDescription
keyString
Returns
TypeDescription
ShareSettings.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

public ShareSettings.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The shareType to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for shareType to set.

Returns
TypeDescription
ShareSettings.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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