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 Details

    • UserIdentity

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

    • getUsername

      public String 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

      public UserIdentity setUsername(String username)
      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

      public AutoUserSpecification 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

      public UserIdentity setAutoUser(AutoUserSpecification autoUser)
      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

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

      public static UserIdentity fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.