Class SenderAuthorization
java.lang.Object
com.azure.resourcemanager.monitor.models.SenderAuthorization
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SenderAuthorization>
public final class SenderAuthorization
extends Object
implements com.azure.json.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaction()
Get the action property: the permissible actions.static SenderAuthorization
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of SenderAuthorization from the JsonReader.role()
Get the role property: the role of the user.scope()
Get the scope property: the scope.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withAction
(String action) Set the action property: the permissible actions.Set the role property: the role of the user.Set the scope property: the scope.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
-
SenderAuthorization
public SenderAuthorization()Creates an instance of SenderAuthorization class.
-
-
Method Details
-
action
Get the action property: the permissible actions. For instance: microsoft.support/supporttickets/write.- Returns:
- the action value.
-
withAction
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.
-
role
Get the role property: the role of the user. For instance: Subscription Admin.- Returns:
- the role value.
-
withRole
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.
-
scope
Get the scope property: the scope.- Returns:
- the scope value.
-
withScope
Set the scope property: the scope.- Parameters:
scope
- the scope value to set.- Returns:
- the SenderAuthorization 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<SenderAuthorization>
- Throws:
IOException
-
fromJson
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.
-