java.lang.Object
com.azure.resourcemanager.monitor.models.Context
All Implemented Interfaces:
com.azure.json.JsonSerializable<Context>

public final class Context extends Object implements com.azure.json.JsonSerializable<Context>
The context info.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of Context class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the contextType property: The context id type.
    static Context
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of Context from the JsonReader.
    Get the notificationSource property: The source of the notification request.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withContextType(String contextType)
    Set the contextType property: The context id type.
    withNotificationSource(String notificationSource)
    Set the notificationSource property: The source of the notification request.

    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

    • Context

      public Context()
      Creates an instance of Context class.
  • Method Details

    • notificationSource

      public String notificationSource()
      Get the notificationSource property: The source of the notification request.
      Returns:
      the notificationSource value.
    • withNotificationSource

      public Context withNotificationSource(String notificationSource)
      Set the notificationSource property: The source of the notification request.
      Parameters:
      notificationSource - the notificationSource value to set.
      Returns:
      the Context object itself.
    • contextType

      public String contextType()
      Get the contextType property: The context id type.
      Returns:
      the contextType value.
    • withContextType

      public Context withContextType(String contextType)
      Set the contextType property: The context id type.
      Parameters:
      contextType - the contextType value to set.
      Returns:
      the Context 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<Context>
      Throws:
      IOException
    • fromJson

      public static Context fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of Context from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of Context 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 Context.