Package com.azure.compute.batch.models
Class UserIdentity
java.lang.Object
com.azure.compute.batch.models.UserIdentity
- All Implemented Interfaces:
com.azure.json.JsonSerializable<UserIdentity>
public final class UserIdentity
extends Object
implements com.azure.json.JsonSerializable<UserIdentity>
The definition of the user identity under which the Task is run. Specify either the userName or autoUser property,
but not both.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UserIdentityfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of UserIdentity from the JsonReader.Get the autoUser property: The auto user under which the Task is run.Get the username property: The name of the user identity under which the Task is run.setAutoUser(AutoUserSpecification autoUser) Set the autoUser property: The auto user under which the Task is run.setUsername(String username) Set the username property: The name of the user identity under which the Task is run.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
-
UserIdentity
public UserIdentity()Creates an instance of UserIdentity class.
-
-
Method Details
-
getUsername
Get the username property: The name of the user identity under which the Task is run. The userName and autoUser properties are mutually exclusive; you must specify one but not both.- Returns:
- the username value.
-
setUsername
Set the username property: The name of the user identity under which the Task is run. The userName and autoUser properties are mutually exclusive; you must specify one but not both.- Parameters:
username- the username value to set.- Returns:
- the UserIdentity object itself.
-
getAutoUser
Get the autoUser property: The auto user under which the Task is run. The userName and autoUser properties are mutually exclusive; you must specify one but not both.- Returns:
- the autoUser value.
-
setAutoUser
Set the autoUser property: The auto user under which the Task is run. The userName and autoUser properties are mutually exclusive; you must specify one but not both.- Parameters:
autoUser- the autoUser value to set.- Returns:
- the UserIdentity object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<UserIdentity>- Throws:
IOException
-
fromJson
Reads an instance of UserIdentity from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of UserIdentity 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 UserIdentity.
-