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 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.
    • 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.
    • role

      public String role()
      Get the role property: the role of the user. For instance: Subscription Admin.
      Returns:
      the role value.
    • 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.
    • scope

      public String scope()
      Get the scope property: the scope.
      Returns:
      the scope value.
    • withScope

      public SenderAuthorization withScope(String scope)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<SenderAuthorization>
      Throws:
      IOException
    • fromJson

      public static SenderAuthorization fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.