Class SSHKey.Builder (0.83.0)

public static final class SSHKey.Builder extends GeneratedMessage.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
Type Description
Descriptor

Methods

build()

public SSHKey build()
Returns
Type Description
SSHKey

buildPartial()

public SSHKey buildPartial()
Returns
Type Description
SSHKey

clear()

public SSHKey.Builder clear()
Returns
Type Description
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
Type Description
SSHKey.Builder

This builder for chaining.

clearPublicKey()

public SSHKey.Builder clearPublicKey()

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

string public_key = 2;

Returns
Type Description
SSHKey.Builder

This builder for chaining.

getDefaultInstanceForType()

public SSHKey getDefaultInstanceForType()
Returns
Type Description
SSHKey

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
String

The publicKey.

getPublicKeyBytes()

public ByteString getPublicKeyBytes()

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

string public_key = 2;

Returns
Type Description
ByteString

The bytes for publicKey.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SSHKey other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public SSHKey.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
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
Name Description
value String

The name to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
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
Name Description
value String

The publicKey to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for publicKey to set.

Returns
Type Description
SSHKey.Builder

This builder for chaining.