Class SshPublicKey
java.lang.Object
com.azure.resourcemanager.storage.models.SshPublicKey
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SshPublicKey>
public final class SshPublicKey
extends Object
implements com.azure.json.JsonSerializable<SshPublicKey>
The SshPublicKey model.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the description property: Optional.static SshPublicKeyfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SshPublicKey from the JsonReader.key()Get the key property: Ssh public key base64 encoded.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withDescription(String description) Set the description property: Optional.Set the key property: Ssh public key base64 encoded.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
SshPublicKey
public SshPublicKey()Creates an instance of SshPublicKey class.
-
-
Method Details
-
description
Get the description property: Optional. It is used to store the function/usage of the key.- Returns:
- the description value.
-
withDescription
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.
-
key
Get the key property: Ssh public key base64 encoded. The format should be: '<keyType> <keyData>', e.g. ssh-rsa AAAABBBB.- Returns:
- the key value.
-
withKey
Set the key property: Ssh public key base64 encoded. The format should be: '<keyType> <keyData>', e.g. ssh-rsa AAAABBBB.- Parameters:
key- the key value to set.- Returns:
- the SshPublicKey object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SshPublicKey>- Throws:
IOException
-
fromJson
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.
-