Class SSHKey.Builder (0.40.0)

public static final class SSHKey.Builder extends GeneratedMessageV3.Builder<SSHKey.Builder> implements SSHKeyOrBuilder

An SSH key, used for authorizing with the interactive serial console feature.

Protobuf type google.cloud.baremetalsolution.v2.SSHKey

Implements

SSHKeyOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SSHKey build()
Returns
TypeDescription
SSHKey

buildPartial()

public SSHKey buildPartial()
Returns
TypeDescription
SSHKey

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public SSHKey.Builder clearName()

Output only. The name of this SSH key. Currently, the only valid value for the location is "global".

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
SSHKey.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPublicKey()

public SSHKey.Builder clearPublicKey()

The public SSH key. This must be in OpenSSH .authorized_keys format.

string public_key = 2;

Returns
TypeDescription
SSHKey.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public SSHKey getDefaultInstanceForType()
Returns
TypeDescription
SSHKey

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getName()

public String getName()

Output only. The name of this SSH key. Currently, the only valid value for the location is "global".

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The name of this SSH key. Currently, the only valid value for the location is "global".

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for name.

getPublicKey()

public String getPublicKey()

The public SSH key. This must be in OpenSSH .authorized_keys format.

string public_key = 2;

Returns
TypeDescription
String

The publicKey.

getPublicKeyBytes()

public ByteString getPublicKeyBytes()

The public SSH key. This must be in OpenSSH .authorized_keys format.

string public_key = 2;

Returns
TypeDescription
ByteString

The bytes for publicKey.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SSHKey other)

public SSHKey.Builder mergeFrom(SSHKey other)
Parameter
NameDescription
otherSSHKey
Returns
TypeDescription
SSHKey.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public SSHKey.Builder setName(String value)

Output only. The name of this SSH key. Currently, the only valid value for the location is "global".

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
SSHKey.Builder

This builder for chaining.

setNameBytes(ByteString value)

public SSHKey.Builder setNameBytes(ByteString value)

Output only. The name of this SSH key. Currently, the only valid value for the location is "global".

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
SSHKey.Builder

This builder for chaining.

setPublicKey(String value)

public SSHKey.Builder setPublicKey(String value)

The public SSH key. This must be in OpenSSH .authorized_keys format.

string public_key = 2;

Parameter
NameDescription
valueString

The publicKey to set.

Returns
TypeDescription
SSHKey.Builder

This builder for chaining.

setPublicKeyBytes(ByteString value)

public SSHKey.Builder setPublicKeyBytes(ByteString value)

The public SSH key. This must be in OpenSSH .authorized_keys format.

string public_key = 2;

Parameter
NameDescription
valueByteString

The bytes for publicKey to set.

Returns
TypeDescription
SSHKey.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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