Class Context
java.lang.Object
com.azure.resourcemanager.monitor.models.Context
- All Implemented Interfaces:
com.azure.json.JsonSerializable<Context>
The context info.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet 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
validate()
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
Get the notificationSource property: The source of the notification request.- Returns:
- the notificationSource value.
-
withNotificationSource
Set the notificationSource property: The source of the notification request.- Parameters:
notificationSource
- the notificationSource value to set.- Returns:
- the Context object itself.
-
contextType
Get the contextType property: The context id type.- Returns:
- the contextType value.
-
withContextType
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
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<Context>
- Throws:
IOException
-
fromJson
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.
-