MicrosoftGraphAppRole Class

  • java.lang.Object
    • com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphAppRole

Implements

public final class MicrosoftGraphAppRole
implements JsonSerializable<MicrosoftGraphAppRole>

appRole.

Constructor Summary

Constructor Description
MicrosoftGraphAppRole()

Creates an instance of MicrosoftGraphAppRole class.

Method Summary

Modifier and Type Method and Description
Map<String,Object> additionalProperties()

Get the additionalProperties property: appRole.

List<String> allowedMemberTypes()

Get the allowedMemberTypes property: Specifies whether this app role can be assigned to users and groups (by setting to ['User']), to other application's (by setting to ['Application'], or both (by setting to ['User', 'Application']).

String description()

Get the description property: The description for the app role.

String displayName()

Get the displayName property: Display name for the permission that appears in the app role assignment and consent experiences.

static MicrosoftGraphAppRole fromJson(JsonReader jsonReader)

Reads an instance of MicrosoftGraphAppRole from the JsonReader.

UUID id()

Get the id property: Unique role identifier inside the appRoles collection.

Boolean isEnabled()

Get the isEnabled property: When creating or updating an app role, this must be set to true (which is the default).

String origin()

Get the origin property: Specifies if the app role is defined on the application object or on the servicePrincipal entity.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

String value()

Get the value property: Specifies the value to include in the roles claim in ID tokens and access tokens authenticating an assigned user or service principal.

MicrosoftGraphAppRole withAdditionalProperties(Map<String,Object> additionalProperties)

Set the additionalProperties property: appRole.

MicrosoftGraphAppRole withAllowedMemberTypes(List<String> allowedMemberTypes)

Set the allowedMemberTypes property: Specifies whether this app role can be assigned to users and groups (by setting to ['User']), to other application's (by setting to ['Application'], or both (by setting to ['User', 'Application']).

MicrosoftGraphAppRole withDescription(String description)

Set the description property: The description for the app role.

MicrosoftGraphAppRole withDisplayName(String displayName)

Set the displayName property: Display name for the permission that appears in the app role assignment and consent experiences.

MicrosoftGraphAppRole withId(UUID id)

Set the id property: Unique role identifier inside the appRoles collection.

MicrosoftGraphAppRole withIsEnabled(Boolean isEnabled)

Set the isEnabled property: When creating or updating an app role, this must be set to true (which is the default).

MicrosoftGraphAppRole withOrigin(String origin)

Set the origin property: Specifies if the app role is defined on the application object or on the servicePrincipal entity.

MicrosoftGraphAppRole withValue(String value)

Set the value property: Specifies the value to include in the roles claim in ID tokens and access tokens authenticating an assigned user or service principal.

Methods inherited from java.lang.Object

Constructor Details

MicrosoftGraphAppRole

public MicrosoftGraphAppRole()

Creates an instance of MicrosoftGraphAppRole class.

Method Details

additionalProperties

public Map additionalProperties()

Get the additionalProperties property: appRole.

Returns:

the additionalProperties value.

allowedMemberTypes

public List allowedMemberTypes()

Get the allowedMemberTypes property: Specifies whether this app role can be assigned to users and groups (by setting to ['User']), to other application's (by setting to ['Application'], or both (by setting to ['User', 'Application']). App roles supporting assignment to other applications' service principals are also known as application permissions. The 'Application' value is only supported for app roles defined on application entities.

Returns:

the allowedMemberTypes value.

description

public String description()

Get the description property: The description for the app role. This is displayed when the app role is being assigned and, if the app role functions as an application permission, during consent experiences.

Returns:

the description value.

displayName

public String displayName()

Get the displayName property: Display name for the permission that appears in the app role assignment and consent experiences.

Returns:

the displayName value.

fromJson

public static MicrosoftGraphAppRole fromJson(JsonReader jsonReader)

Reads an instance of MicrosoftGraphAppRole from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of MicrosoftGraphAppRole 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 MicrosoftGraphAppRole.

id

public UUID id()

Get the id property: Unique role identifier inside the appRoles collection. When creating a new app role, a new Guid identifier must be provided.

Returns:

the id value.

isEnabled

public Boolean isEnabled()

Get the isEnabled property: When creating or updating an app role, this must be set to true (which is the default). To delete a role, this must first be set to false. At that point, in a subsequent call, this role may be removed.

Returns:

the isEnabled value.

origin

public String origin()

Get the origin property: Specifies if the app role is defined on the application object or on the servicePrincipal entity. Must not be included in any POST or PATCH requests. Read-only.

Returns:

the origin value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

value

public String value()

Get the value property: Specifies the value to include in the roles claim in ID tokens and access tokens authenticating an assigned user or service principal. Must not exceed 120 characters in length. Allowed characters are : ! # $ % & ' ( ) * + , - . / : ; = ? @ [ ] ^ + _ { } ~, as well as characters in the ranges 0-9, A-Z and a-z. Any other character, including the space character, are not allowed.

Returns:

the value value.

withAdditionalProperties

public MicrosoftGraphAppRole withAdditionalProperties(Map additionalProperties)

Set the additionalProperties property: appRole.

Parameters:

additionalProperties - the additionalProperties value to set.

Returns:

the MicrosoftGraphAppRole object itself.

withAllowedMemberTypes

public MicrosoftGraphAppRole withAllowedMemberTypes(List allowedMemberTypes)

Set the allowedMemberTypes property: Specifies whether this app role can be assigned to users and groups (by setting to ['User']), to other application's (by setting to ['Application'], or both (by setting to ['User', 'Application']). App roles supporting assignment to other applications' service principals are also known as application permissions. The 'Application' value is only supported for app roles defined on application entities.

Parameters:

allowedMemberTypes - the allowedMemberTypes value to set.

Returns:

the MicrosoftGraphAppRole object itself.

withDescription

public MicrosoftGraphAppRole withDescription(String description)

Set the description property: The description for the app role. This is displayed when the app role is being assigned and, if the app role functions as an application permission, during consent experiences.

Parameters:

description - the description value to set.

Returns:

the MicrosoftGraphAppRole object itself.

withDisplayName

public MicrosoftGraphAppRole withDisplayName(String displayName)

Set the displayName property: Display name for the permission that appears in the app role assignment and consent experiences.

Parameters:

displayName - the displayName value to set.

Returns:

the MicrosoftGraphAppRole object itself.

withId

public MicrosoftGraphAppRole withId(UUID id)

Set the id property: Unique role identifier inside the appRoles collection. When creating a new app role, a new Guid identifier must be provided.

Parameters:

id - the id value to set.

Returns:

the MicrosoftGraphAppRole object itself.

withIsEnabled

public MicrosoftGraphAppRole withIsEnabled(Boolean isEnabled)

Set the isEnabled property: When creating or updating an app role, this must be set to true (which is the default). To delete a role, this must first be set to false. At that point, in a subsequent call, this role may be removed.

Parameters:

isEnabled - the isEnabled value to set.

Returns:

the MicrosoftGraphAppRole object itself.

withOrigin

public MicrosoftGraphAppRole withOrigin(String origin)

Set the origin property: Specifies if the app role is defined on the application object or on the servicePrincipal entity. Must not be included in any POST or PATCH requests. Read-only.

Parameters:

origin - the origin value to set.

Returns:

the MicrosoftGraphAppRole object itself.

withValue

public MicrosoftGraphAppRole withValue(String value)

Set the value property: Specifies the value to include in the roles claim in ID tokens and access tokens authenticating an assigned user or service principal. Must not exceed 120 characters in length. Allowed characters are : ! # $ % & ' ( ) * + , - . / : ; = ? @ [ ] ^ + _ { } ~, as well as characters in the ranges 0-9, A-Z and a-z. Any other character, including the space character, are not allowed.

Parameters:

value - the value value to set.

Returns:

the MicrosoftGraphAppRole object itself.

Applies to