SshPublicKey Class

  • java.lang.Object
    • com.azure.resourcemanager.storage.models.SshPublicKey

Implements

public final class SshPublicKey
implements JsonSerializable<SshPublicKey>

The SshPublicKey model.

Constructor Summary

Constructor Description
SshPublicKey()

Creates an instance of SshPublicKey class.

Method Summary

Modifier and Type Method and Description
String description()

Get the description property: Optional.

static SshPublicKey fromJson(JsonReader jsonReader)

Reads an instance of SshPublicKey from the JsonReader.

String key()

Get the key property: Ssh public key base64 encoded.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

SshPublicKey withDescription(String description)

Set the description property: Optional.

SshPublicKey withKey(String key)

Set the key property: Ssh public key base64 encoded.

Methods inherited from java.lang.Object

Constructor Details

SshPublicKey

public SshPublicKey()

Creates an instance of SshPublicKey class.

Method Details

description

public String description()

Get the description property: Optional. It is used to store the function/usage of the key.

Returns:

the description value.

fromJson

public static SshPublicKey fromJson(JsonReader jsonReader)

Reads an instance of SshPublicKey from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of SshPublicKey if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the SshPublicKey.

key

public String key()

Get the key property: Ssh public key base64 encoded. The format should be: ' ', e.g. ssh-rsa AAAABBBB.

Returns:

the key value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withDescription

public SshPublicKey withDescription(String description)

Set the description property: Optional. It is used to store the function/usage of the key.

Parameters:

description - the description value to set.

Returns:

the SshPublicKey object itself.

withKey

public SshPublicKey withKey(String key)

Set the key property: Ssh public key base64 encoded. The format should be: ' ', e.g. ssh-rsa AAAABBBB.

Parameters:

key - the key value to set.

Returns:

the SshPublicKey object itself.

Applies to