Class UserIdentity

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

public final class UserIdentity extends Object implements com.azure.json.JsonSerializable<UserIdentity>
Identity attributes of a lab user.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of UserIdentity class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the appId property: Set to the app Id of the client JWT making the request.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of UserIdentity from the JsonReader.
    Get the objectId property: Set to the object Id of the client JWT making the request.
    Get the principalId property: Set to the principal Id of the client JWT making the request.
    Get the principalName property: Set to the principal name / UPN of the client JWT making the request.
    Get the tenantId property: Set to the tenant ID of the client JWT making the request.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Set the appId property: Set to the app Id of the client JWT making the request.
    withObjectId(String objectId)
    Set the objectId property: Set to the object Id of the client JWT making the request.
    withPrincipalId(String principalId)
    Set the principalId property: Set to the principal Id of the client JWT making the request.
    withPrincipalName(String principalName)
    Set the principalName property: Set to the principal name / UPN of the client JWT making the request.
    withTenantId(String tenantId)
    Set the tenantId property: Set to the tenant ID of the client JWT making the request.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • UserIdentity

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

    • principalName

      public String principalName()
      Get the principalName property: Set to the principal name / UPN of the client JWT making the request.
      Returns:
      the principalName value.
    • withPrincipalName

      public UserIdentity withPrincipalName(String principalName)
      Set the principalName property: Set to the principal name / UPN of the client JWT making the request.
      Parameters:
      principalName - the principalName value to set.
      Returns:
      the UserIdentity object itself.
    • principalId

      public String principalId()
      Get the principalId property: Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
      Returns:
      the principalId value.
    • withPrincipalId

      public UserIdentity withPrincipalId(String principalId)
      Set the principalId property: Set to the principal Id of the client JWT making the request. Service principal will not have the principal Id.
      Parameters:
      principalId - the principalId value to set.
      Returns:
      the UserIdentity object itself.
    • tenantId

      public String tenantId()
      Get the tenantId property: Set to the tenant ID of the client JWT making the request.
      Returns:
      the tenantId value.
    • withTenantId

      public UserIdentity withTenantId(String tenantId)
      Set the tenantId property: Set to the tenant ID of the client JWT making the request.
      Parameters:
      tenantId - the tenantId value to set.
      Returns:
      the UserIdentity object itself.
    • objectId

      public String objectId()
      Get the objectId property: Set to the object Id of the client JWT making the request. Not all users have object Id. For CSP (reseller) scenarios for example, object Id is not available.
      Returns:
      the objectId value.
    • withObjectId

      public UserIdentity withObjectId(String objectId)
      Set the objectId property: Set to the object Id of the client JWT making the request. Not all users have object Id. For CSP (reseller) scenarios for example, object Id is not available.
      Parameters:
      objectId - the objectId value to set.
      Returns:
      the UserIdentity object itself.
    • appId

      public String appId()
      Get the appId property: Set to the app Id of the client JWT making the request.
      Returns:
      the appId value.
    • withAppId

      public UserIdentity withAppId(String appId)
      Set the appId property: Set to the app Id of the client JWT making the request.
      Parameters:
      appId - the appId value to set.
      Returns:
      the UserIdentity 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<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.