Principal Class

  • java.lang.Object
    • com.azure.resourcemanager.authorization.models.Principal

Implements

public final class Principal
implements JsonSerializable<Principal>

The name of the entity last modified it.

Constructor Summary

Constructor Description
Principal()

Creates an instance of Principal class.

Method Summary

Modifier and Type Method and Description
String displayName()

Get the displayName property: The name of the principal made changes.

String email()

Get the email property: Email of principal.

static Principal fromJson(JsonReader jsonReader)

Reads an instance of Principal from the JsonReader.

String id()

Get the id property: The id of the principal made changes.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: Type of principal such as user , group etc.

void validate()

Validates the instance.

Principal withDisplayName(String displayName)

Set the displayName property: The name of the principal made changes.

Principal withEmail(String email)

Set the email property: Email of principal.

Principal withId(String id)

Set the id property: The id of the principal made changes.

Principal withType(String type)

Set the type property: Type of principal such as user , group etc.

Methods inherited from java.lang.Object

Constructor Details

Principal

public Principal()

Creates an instance of Principal class.

Method Details

displayName

public String displayName()

Get the displayName property: The name of the principal made changes.

Returns:

the displayName value.

email

public String email()

Get the email property: Email of principal.

Returns:

the email value.

fromJson

public static Principal fromJson(JsonReader jsonReader)

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.

id

public String id()

Get the id property: The id of the principal made changes.

Returns:

the id value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: Type of principal such as user , group etc.

Returns:

the type value.

validate

public void validate()

Validates the instance.

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.

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.

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.

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.

Applies to