Class VirtualMachineSshCredentials

java.lang.Object
com.azure.resourcemanager.machinelearning.models.VirtualMachineSshCredentials
All Implemented Interfaces:
com.azure.json.JsonSerializable<VirtualMachineSshCredentials>

public final class VirtualMachineSshCredentials extends Object implements com.azure.json.JsonSerializable<VirtualMachineSshCredentials>
Admin credentials for virtual machine.
  • Constructor Details

    • VirtualMachineSshCredentials

      public VirtualMachineSshCredentials()
      Creates an instance of VirtualMachineSshCredentials class.
  • Method Details

    • username

      public String username()
      Get the username property: Username of admin account.
      Returns:
      the username value.
    • withUsername

      public VirtualMachineSshCredentials withUsername(String username)
      Set the username property: Username of admin account.
      Parameters:
      username - the username value to set.
      Returns:
      the VirtualMachineSshCredentials object itself.
    • password

      public String password()
      Get the password property: Password of admin account.
      Returns:
      the password value.
    • withPassword

      public VirtualMachineSshCredentials withPassword(String password)
      Set the password property: Password of admin account.
      Parameters:
      password - the password value to set.
      Returns:
      the VirtualMachineSshCredentials object itself.
    • publicKeyData

      public String publicKeyData()
      Get the publicKeyData property: Public key data.
      Returns:
      the publicKeyData value.
    • withPublicKeyData

      public VirtualMachineSshCredentials withPublicKeyData(String publicKeyData)
      Set the publicKeyData property: Public key data.
      Parameters:
      publicKeyData - the publicKeyData value to set.
      Returns:
      the VirtualMachineSshCredentials object itself.
    • privateKeyData

      public String privateKeyData()
      Get the privateKeyData property: Private key data.
      Returns:
      the privateKeyData value.
    • withPrivateKeyData

      public VirtualMachineSshCredentials withPrivateKeyData(String privateKeyData)
      Set the privateKeyData property: Private key data.
      Parameters:
      privateKeyData - the privateKeyData value to set.
      Returns:
      the VirtualMachineSshCredentials object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<VirtualMachineSshCredentials>
      Throws:
      IOException
    • fromJson

      public static VirtualMachineSshCredentials fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of VirtualMachineSshCredentials from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of VirtualMachineSshCredentials 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 VirtualMachineSshCredentials.