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

public final class Principal extends Object implements com.azure.json.JsonSerializable<Principal>
The name of the entity last modified it.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    Get the displayName property: The name of the principal made changes.
    Get the email property: Email of principal.
    static Principal
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of Principal from the JsonReader.
    id()
    Get the id property: The id of the principal made changes.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    Get the type property: Type of principal such as user , group etc.
    void
    Validates the instance.
    withDisplayName(String displayName)
    Set the displayName property: The name of the principal made changes.
    Set the email property: Email of principal.
    Set the id property: The id of the principal made changes.
    Set the type property: Type of principal such as user , group etc.

    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

    • Principal

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

    • id

      public String id()
      Get the id property: The id of the principal made changes.
      Returns:
      the id value.
    • withId

      public Principal withId(String id)
      Set the id property: The id of the principal made changes.
      Parameters:
      id - the id value to set.
      Returns:
      the Principal object itself.
    • displayName

      public String displayName()
      Get the displayName property: The name of the principal made changes.
      Returns:
      the displayName value.
    • withDisplayName

      public Principal withDisplayName(String displayName)
      Set the displayName property: The name of the principal made changes.
      Parameters:
      displayName - the displayName value to set.
      Returns:
      the Principal object itself.
    • type

      public String type()
      Get the type property: Type of principal such as user , group etc.
      Returns:
      the type value.
    • withType

      public Principal withType(String type)
      Set the type property: Type of principal such as user , group etc.
      Parameters:
      type - the type value to set.
      Returns:
      the Principal object itself.
    • email

      public String email()
      Get the email property: Email of principal.
      Returns:
      the email value.
    • withEmail

      public Principal withEmail(String email)
      Set the email property: Email of principal.
      Parameters:
      email - the email value to set.
      Returns:
      the Principal 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<Principal>
      Throws:
      IOException
    • fromJson

      public static Principal fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of Principal from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of Principal 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 Principal.