
com.azure.resourcemanager.eventgrid.models.MonitorAlertEventSubscriptionDestination Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-eventgrid Show documentation
Show all versions of azure-resourcemanager-eventgrid Show documentation
This package contains Microsoft Azure SDK for EventGrid Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure EventGrid Management Client. Package tag package-2021-10-preview.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.eventgrid.models;
import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.eventgrid.fluent.models.MonitorAlertEventSubscriptionDestinationProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeId;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.util.List;
/**
* Information about the Monitor Alert destination for an event subscription.
*/
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
property = "endpointType",
defaultImpl = MonitorAlertEventSubscriptionDestination.class,
visible = true)
@JsonTypeName("MonitorAlert")
@Fluent
public final class MonitorAlertEventSubscriptionDestination extends EventSubscriptionDestination {
/*
* Type of the endpoint for the event subscription destination.
*/
@JsonTypeId
@JsonProperty(value = "endpointType", required = true)
private EndpointType endpointType = EndpointType.MONITOR_ALERT;
/*
* Monitor Alert properties of the event subscription destination.
*/
@JsonProperty(value = "properties")
private MonitorAlertEventSubscriptionDestinationProperties innerProperties;
/**
* Creates an instance of MonitorAlertEventSubscriptionDestination class.
*/
public MonitorAlertEventSubscriptionDestination() {
}
/**
* Get the endpointType property: Type of the endpoint for the event subscription destination.
*
* @return the endpointType value.
*/
@Override
public EndpointType endpointType() {
return this.endpointType;
}
/**
* Get the innerProperties property: Monitor Alert properties of the event subscription destination.
*
* @return the innerProperties value.
*/
private MonitorAlertEventSubscriptionDestinationProperties innerProperties() {
return this.innerProperties;
}
/**
* Get the severity property: The severity that will be attached to every Alert fired through this event
* subscription.
* This field must be provided.
*
* @return the severity value.
*/
public MonitorAlertSeverity severity() {
return this.innerProperties() == null ? null : this.innerProperties().severity();
}
/**
* Set the severity property: The severity that will be attached to every Alert fired through this event
* subscription.
* This field must be provided.
*
* @param severity the severity value to set.
* @return the MonitorAlertEventSubscriptionDestination object itself.
*/
public MonitorAlertEventSubscriptionDestination withSeverity(MonitorAlertSeverity severity) {
if (this.innerProperties() == null) {
this.innerProperties = new MonitorAlertEventSubscriptionDestinationProperties();
}
this.innerProperties().withSeverity(severity);
return this;
}
/**
* Get the description property: The description that will be attached to every Alert fired through this event
* subscription.
*
* @return the description value.
*/
public String description() {
return this.innerProperties() == null ? null : this.innerProperties().description();
}
/**
* Set the description property: The description that will be attached to every Alert fired through this event
* subscription.
*
* @param description the description value to set.
* @return the MonitorAlertEventSubscriptionDestination object itself.
*/
public MonitorAlertEventSubscriptionDestination withDescription(String description) {
if (this.innerProperties() == null) {
this.innerProperties = new MonitorAlertEventSubscriptionDestinationProperties();
}
this.innerProperties().withDescription(description);
return this;
}
/**
* Get the actionGroups property: The list of ARM Ids of Action Groups that will be triggered on every Alert fired
* through this event subscription.
* Each resource ARM Id should follow this pattern:
* /subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Insights/actionGroups/{ActionGroupName}.
*
* @return the actionGroups value.
*/
public List actionGroups() {
return this.innerProperties() == null ? null : this.innerProperties().actionGroups();
}
/**
* Set the actionGroups property: The list of ARM Ids of Action Groups that will be triggered on every Alert fired
* through this event subscription.
* Each resource ARM Id should follow this pattern:
* /subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Insights/actionGroups/{ActionGroupName}.
*
* @param actionGroups the actionGroups value to set.
* @return the MonitorAlertEventSubscriptionDestination object itself.
*/
public MonitorAlertEventSubscriptionDestination withActionGroups(List actionGroups) {
if (this.innerProperties() == null) {
this.innerProperties = new MonitorAlertEventSubscriptionDestinationProperties();
}
this.innerProperties().withActionGroups(actionGroups);
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
public void validate() {
super.validate();
if (innerProperties() != null) {
innerProperties().validate();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy