Teilen über


Credentials Class

  • java.lang.Object
    • com.azure.resourcemanager.labservices.models.Credentials

Implements

public final class Credentials
implements JsonSerializable<Credentials>

Credentials for a user on a lab VM.

Constructor Summary

Constructor Description
Credentials()

Creates an instance of Credentials class.

Method Summary

Modifier and Type Method and Description
static Credentials fromJson(JsonReader jsonReader)

Reads an instance of Credentials from the JsonReader.

String password()

Get the password property: The password for the user.

JsonWriter toJson(JsonWriter jsonWriter)
String username()

Get the username property: The username to use when signing in to lab VMs.

void validate()

Validates the instance.

Credentials withPassword(String password)

Set the password property: The password for the user.

Credentials withUsername(String username)

Set the username property: The username to use when signing in to lab VMs.

Methods inherited from java.lang.Object

Constructor Details

Credentials

public Credentials()

Creates an instance of Credentials class.

Method Details

fromJson

public static Credentials fromJson(JsonReader jsonReader)

Reads an instance of Credentials from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

password

public String password()

Get the password property: The password for the user. This is required for the TemplateVM createOption.

Returns:

the password value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

username

public String username()

Get the username property: The username to use when signing in to lab VMs.

Returns:

the username value.

validate

public void validate()

Validates the instance.

withPassword

public Credentials withPassword(String password)

Set the password property: The password for the user. This is required for the TemplateVM createOption.

Parameters:

password - the password value to set.

Returns:

the Credentials object itself.

withUsername

public Credentials withUsername(String username)

Set the username property: The username to use when signing in to lab VMs.

Parameters:

username - the username value to set.

Returns:

the Credentials object itself.

Applies to