AutoscaleNotification Class

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

Implements

public final class AutoscaleNotification
implements JsonSerializable<AutoscaleNotification>

Autoscale notification.

Constructor Summary

Constructor Description
AutoscaleNotification()

Creates an instance of AutoscaleNotification class.

Method Summary

Modifier and Type Method and Description
EmailNotification email()

Get the email property: the email notification.

static AutoscaleNotification fromJson(JsonReader jsonReader)

Reads an instance of AutoscaleNotification from the JsonReader.

String operation()

Get the operation property: the operation associated with the notification and its value must be "scale".

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

List<WebhookNotification> webhooks()

Get the webhooks property: the collection of webhook notifications.

AutoscaleNotification withEmail(EmailNotification email)

Set the email property: the email notification.

AutoscaleNotification withOperation(String operation)

Set the operation property: the operation associated with the notification and its value must be "scale".

AutoscaleNotification withWebhooks(List<WebhookNotification> webhooks)

Set the webhooks property: the collection of webhook notifications.

Methods inherited from java.lang.Object

Constructor Details

AutoscaleNotification

public AutoscaleNotification()

Creates an instance of AutoscaleNotification class.

Method Details

email

public EmailNotification email()

Get the email property: the email notification.

Returns:

the email value.

fromJson

public static AutoscaleNotification fromJson(JsonReader jsonReader)

Reads an instance of AutoscaleNotification from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of AutoscaleNotification if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

operation

public String operation()

Get the operation property: the operation associated with the notification and its value must be "scale".

Returns:

the operation value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

webhooks

public List webhooks()

Get the webhooks property: the collection of webhook notifications.

Returns:

the webhooks value.

withEmail

public AutoscaleNotification withEmail(EmailNotification email)

Set the email property: the email notification.

Parameters:

email - the email value to set.

Returns:

the AutoscaleNotification object itself.

withOperation

public AutoscaleNotification withOperation(String operation)

Set the operation property: the operation associated with the notification and its value must be "scale".

Parameters:

operation - the operation value to set.

Returns:

the AutoscaleNotification object itself.

withWebhooks

public AutoscaleNotification withWebhooks(List webhooks)

Set the webhooks property: the collection of webhook notifications.

Parameters:

webhooks - the webhooks value to set.

Returns:

the AutoscaleNotification object itself.

Applies to