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 -
Method Summary
Modifier and TypeMethodDescriptionappId()
Get the appId property: Set to the app Id of the client JWT making the request.static UserIdentity
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of UserIdentity from the JsonReader.objectId()
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.tenantId()
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
validate()
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
Get the principalName property: Set to the principal name / UPN of the client JWT making the request.- Returns:
- the principalName value.
-
withPrincipalName
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
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
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
Get the tenantId property: Set to the tenant ID of the client JWT making the request.- Returns:
- the tenantId value.
-
withTenantId
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
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
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
Get the appId property: Set to the app Id of the client JWT making the request.- Returns:
- the appId value.
-
withAppId
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
- Specified by:
toJson
in 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.
-