SenderAuthorization Class

  • java.lang.Object
    • com.azure.resourcemanager.monitor.models.SenderAuthorization

Implements

public final class SenderAuthorization
implements JsonSerializable<SenderAuthorization>

the authorization used by the user who has performed the operation that led to this event. This captures the RBAC properties of the event. These usually include the 'action', 'role' and the 'scope'.

Constructor Summary

Constructor Description
SenderAuthorization()

Creates an instance of SenderAuthorization class.

Method Summary

Modifier and Type Method and Description
String action()

Get the action property: the permissible actions.

static SenderAuthorization fromJson(JsonReader jsonReader)

Reads an instance of SenderAuthorization from the JsonReader.

String role()

Get the role property: the role of the user.

String scope()

Get the scope property: the scope.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

SenderAuthorization withAction(String action)

Set the action property: the permissible actions.

SenderAuthorization withRole(String role)

Set the role property: the role of the user.

SenderAuthorization withScope(String scope)

Set the scope property: the scope.

Methods inherited from java.lang.Object

Constructor Details

SenderAuthorization

public SenderAuthorization()

Creates an instance of SenderAuthorization class.

Method Details

action

public String action()

Get the action property: the permissible actions. For instance: microsoft.support/supporttickets/write.

Returns:

the action value.

fromJson

public static SenderAuthorization fromJson(JsonReader jsonReader)

Reads an instance of SenderAuthorization from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

role

public String role()

Get the role property: the role of the user. For instance: Subscription Admin.

Returns:

the role value.

scope

public String scope()

Get the scope property: the scope.

Returns:

the scope value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAction

public SenderAuthorization withAction(String action)

Set the action property: the permissible actions. For instance: microsoft.support/supporttickets/write.

Parameters:

action - the action value to set.

Returns:

the SenderAuthorization object itself.

withRole

public SenderAuthorization withRole(String role)

Set the role property: the role of the user. For instance: Subscription Admin.

Parameters:

role - the role value to set.

Returns:

the SenderAuthorization object itself.

withScope

public SenderAuthorization withScope(String scope)

Set the scope property: the scope.

Parameters:

scope - the scope value to set.

Returns:

the SenderAuthorization object itself.

Applies to