Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR] monitor/resource-manager #31

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.monitor;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonSubTypes;

/**
* The Action model.
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "odata.type")
@JsonTypeName("Action")
@JsonSubTypes({
@JsonSubTypes.Type(name = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", value = AlertingAction.class)
})
public class Action {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.monitor;

import java.util.Map;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;

/**
* An action group object for the body of patch operations.
*/
@JsonFlatten
public class ActionGroupPatchBody {
/**
* Resource tags.
*/
@JsonProperty(value = "tags")
private Map<String, String> tags;

/**
* Indicates whether this action group is enabled. If an action group is
* not enabled, then none of its actions will be activated.
*/
@JsonProperty(value = "properties.enabled")
private Boolean enabled;

/**
* Get the tags value.
*
* @return the tags value
*/
public Map<String, String> tags() {
return this.tags;
}

/**
* Set the tags value.
*
* @param tags the tags value to set
* @return the ActionGroupPatchBody object itself.
*/
public ActionGroupPatchBody withTags(Map<String, String> tags) {
this.tags = tags;
return this;
}

/**
* Get the enabled value.
*
* @return the enabled value
*/
public Boolean enabled() {
return this.enabled;
}

/**
* Set the enabled value.
*
* @param enabled the enabled value to set
* @return the ActionGroupPatchBody object itself.
*/
public ActionGroupPatchBody withEnabled(Boolean enabled) {
this.enabled = enabled;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.monitor;

import java.util.Map;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;

/**
* An activity log alert object for the body of patch operations.
*/
@JsonFlatten
public class ActivityLogAlertPatchBody {
/**
* Resource tags.
*/
@JsonProperty(value = "tags")
private Map<String, String> tags;

/**
* Indicates whether this activity log alert is enabled. If an activity log
* alert is not enabled, then none of its actions will be activated.
*/
@JsonProperty(value = "properties.enabled")
private Boolean enabled;

/**
* Get the tags value.
*
* @return the tags value
*/
public Map<String, String> tags() {
return this.tags;
}

/**
* Set the tags value.
*
* @param tags the tags value to set
* @return the ActivityLogAlertPatchBody object itself.
*/
public ActivityLogAlertPatchBody withTags(Map<String, String> tags) {
this.tags = tags;
return this;
}

/**
* Get the enabled value.
*
* @return the enabled value
*/
public Boolean enabled() {
return this.enabled;
}

/**
* Set the enabled value.
*
* @param enabled the enabled value to set
* @return the ActivityLogAlertPatchBody object itself.
*/
public ActivityLogAlertPatchBody withEnabled(Boolean enabled) {
this.enabled = enabled;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.monitor;

import java.util.Map;
import java.util.List;
import org.joda.time.DateTime;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;

/**
* The alert rule object for patch operations.
*/
@JsonFlatten
public class AlertRuleResourcePatch {
/**
* Resource tags.
*/
@JsonProperty(value = "tags")
private Map<String, String> tags;

/**
* the name of the alert rule.
*/
@JsonProperty(value = "properties.name", required = true)
private String name;

/**
* the description of the alert rule that will be included in the alert
* email.
*/
@JsonProperty(value = "properties.description")
private String description;

/**
* the flag that indicates whether the alert rule is enabled.
*/
@JsonProperty(value = "properties.isEnabled", required = true)
private boolean isEnabled;

/**
* the condition that results in the alert rule being activated.
*/
@JsonProperty(value = "properties.condition", required = true)
private RuleCondition condition;

/**
* the array of actions that are performed when the alert rule becomes
* active, and when an alert condition is resolved.
*/
@JsonProperty(value = "properties.actions")
private List<RuleAction> actions;

/**
* Last time the rule was updated in ISO8601 format.
*/
@JsonProperty(value = "properties.lastUpdatedTime", access = JsonProperty.Access.WRITE_ONLY)
private DateTime lastUpdatedTime;

/**
* Get the tags value.
*
* @return the tags value
*/
public Map<String, String> tags() {
return this.tags;
}

/**
* Set the tags value.
*
* @param tags the tags value to set
* @return the AlertRuleResourcePatch object itself.
*/
public AlertRuleResourcePatch withTags(Map<String, String> tags) {
this.tags = tags;
return this;
}

/**
* Get the name value.
*
* @return the name value
*/
public String name() {
return this.name;
}

/**
* Set the name value.
*
* @param name the name value to set
* @return the AlertRuleResourcePatch object itself.
*/
public AlertRuleResourcePatch withName(String name) {
this.name = name;
return this;
}

/**
* Get the description value.
*
* @return the description value
*/
public String description() {
return this.description;
}

/**
* Set the description value.
*
* @param description the description value to set
* @return the AlertRuleResourcePatch object itself.
*/
public AlertRuleResourcePatch withDescription(String description) {
this.description = description;
return this;
}

/**
* Get the isEnabled value.
*
* @return the isEnabled value
*/
public boolean isEnabled() {
return this.isEnabled;
}

/**
* Set the isEnabled value.
*
* @param isEnabled the isEnabled value to set
* @return the AlertRuleResourcePatch object itself.
*/
public AlertRuleResourcePatch withIsEnabled(boolean isEnabled) {
this.isEnabled = isEnabled;
return this;
}

/**
* Get the condition value.
*
* @return the condition value
*/
public RuleCondition condition() {
return this.condition;
}

/**
* Set the condition value.
*
* @param condition the condition value to set
* @return the AlertRuleResourcePatch object itself.
*/
public AlertRuleResourcePatch withCondition(RuleCondition condition) {
this.condition = condition;
return this;
}

/**
* Get the actions value.
*
* @return the actions value
*/
public List<RuleAction> actions() {
return this.actions;
}

/**
* Set the actions value.
*
* @param actions the actions value to set
* @return the AlertRuleResourcePatch object itself.
*/
public AlertRuleResourcePatch withActions(List<RuleAction> actions) {
this.actions = actions;
return this;
}

/**
* Get the lastUpdatedTime value.
*
* @return the lastUpdatedTime value
*/
public DateTime lastUpdatedTime() {
return this.lastUpdatedTime;
}

}
Loading