Compartir a través de


Context Class

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

Implements

public final class Context
implements JsonSerializable<Context>

The context info.

Constructor Summary

Constructor Description
Context()

Creates an instance of Context class.

Method Summary

Modifier and Type Method and Description
String contextType()

Get the contextType property: The context id type.

static Context fromJson(JsonReader jsonReader)

Reads an instance of Context from the JsonReader.

String notificationSource()

Get the notificationSource property: The source of the notification request.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Context withContextType(String contextType)

Set the contextType property: The context id type.

Context withNotificationSource(String notificationSource)

Set the notificationSource property: The source of the notification request.

Methods inherited from java.lang.Object

Constructor Details

Context

public Context()

Creates an instance of Context class.

Method Details

contextType

public String contextType()

Get the contextType property: The context id type.

Returns:

the contextType value.

fromJson

public static Context fromJson(JsonReader jsonReader)

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.

notificationSource

public String notificationSource()

Get the notificationSource property: The source of the notification request.

Returns:

the notificationSource value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

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.

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.

Applies to