Package com.azure.compute.batch.models
Class UserAccount
java.lang.Object
com.azure.compute.batch.models.UserAccount
- All Implemented Interfaces:
com.azure.json.JsonSerializable<UserAccount>
public final class UserAccount
extends Object
implements com.azure.json.JsonSerializable<UserAccount>
Properties used to create a user used to execute Tasks on an Azure Batch
Compute Node.
-
Constructor Summary
ConstructorsConstructorDescriptionUserAccount(String name, String password) Creates an instance of UserAccount class. -
Method Summary
Modifier and TypeMethodDescriptionstatic UserAccountfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of UserAccount from the JsonReader.Get the elevationLevel property: The elevation level of the user Account.Get the linuxUserConfiguration property: The Linux-specific user configuration for the user Account.getName()Get the name property: The name of the user Account.Get the password property: The password for the user Account.Get the windowsUserConfiguration property: The Windows-specific user configuration for the user Account.setElevationLevel(ElevationLevel elevationLevel) Set the elevationLevel property: The elevation level of the user Account.setLinuxUserConfiguration(LinuxUserConfiguration linuxUserConfiguration) Set the linuxUserConfiguration property: The Linux-specific user configuration for the user Account.setWindowsUserConfiguration(WindowsUserConfiguration windowsUserConfiguration) Set the windowsUserConfiguration property: The Windows-specific user configuration for the user Account.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.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
-
UserAccount
Creates an instance of UserAccount class.- Parameters:
name- the name value to set.password- the password value to set.
-
-
Method Details
-
getName
Get the name property: The name of the user Account. Names can contain any Unicode characters up to a maximum length of 20.- Returns:
- the name value.
-
getPassword
Get the password property: The password for the user Account.- Returns:
- the password value.
-
getElevationLevel
Get the elevationLevel property: The elevation level of the user Account. The default value is nonAdmin.- Returns:
- the elevationLevel value.
-
setElevationLevel
Set the elevationLevel property: The elevation level of the user Account. The default value is nonAdmin.- Parameters:
elevationLevel- the elevationLevel value to set.- Returns:
- the UserAccount object itself.
-
getLinuxUserConfiguration
Get the linuxUserConfiguration property: The Linux-specific user configuration for the user Account. This property is ignored if specified on a Windows Pool. If not specified, the user is created with the default options.- Returns:
- the linuxUserConfiguration value.
-
setLinuxUserConfiguration
Set the linuxUserConfiguration property: The Linux-specific user configuration for the user Account. This property is ignored if specified on a Windows Pool. If not specified, the user is created with the default options.- Parameters:
linuxUserConfiguration- the linuxUserConfiguration value to set.- Returns:
- the UserAccount object itself.
-
getWindowsUserConfiguration
Get the windowsUserConfiguration property: The Windows-specific user configuration for the user Account. This property can only be specified if the user is on a Windows Pool. If not specified and on a Windows Pool, the user is created with the default options.- Returns:
- the windowsUserConfiguration value.
-
setWindowsUserConfiguration
Set the windowsUserConfiguration property: The Windows-specific user configuration for the user Account. This property can only be specified if the user is on a Windows Pool. If not specified and on a Windows Pool, the user is created with the default options.- Parameters:
windowsUserConfiguration- the windowsUserConfiguration value to set.- Returns:
- the UserAccount object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<UserAccount>- Throws:
IOException
-
fromJson
Reads an instance of UserAccount from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of UserAccount if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the UserAccount.
-