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] Added metrics baseline API #3251

Merged
merged 3 commits into from
Apr 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/**
* 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.JsonProperty;

/**
* Represents a baseline metadata value.
*/
public class BaselineMetadata {
/**
* Name of the baseline metadata.
*/
@JsonProperty(value = "name", required = true)
private String name;

/**
* Value of the baseline metadata.
*/
@JsonProperty(value = "value", required = true)
private String value;

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

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

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

/**
* Set value of the baseline metadata.
*
* @param value the value value to set
* @return the BaselineMetadata object itself.
*/
public BaselineMetadata withValue(String value) {
this.value = value;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* 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.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for BaselineSensitivity.
*/
public final class BaselineSensitivity extends ExpandableStringEnum<BaselineSensitivity> {
/** Static value Low for BaselineSensitivity. */
public static final BaselineSensitivity LOW = fromString("Low");

/** Static value Medium for BaselineSensitivity. */
public static final BaselineSensitivity MEDIUM = fromString("Medium");

/** Static value High for BaselineSensitivity. */
public static final BaselineSensitivity HIGH = fromString("High");

/**
* Creates or finds a BaselineSensitivity from its string representation.
* @param name a name to look for
* @return the corresponding BaselineSensitivity
*/
@JsonCreator
public static BaselineSensitivity fromString(String name) {
return fromString(name, BaselineSensitivity.class);
}

/**
* @return known BaselineSensitivity values
*/
public static Collection<BaselineSensitivity> values() {
return values(BaselineSensitivity.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

package com.microsoft.azure.management.monitor;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
Expand All @@ -19,27 +20,27 @@
@JsonTypeName("Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction")
public class LogToMetricAction extends Action {
/**
* Severity of the alert.
* Criteria of Metric.
*/
@JsonProperty(value = "criteria", required = true)
private Criteria criteria;
private List<Criteria> criteria;

/**
* Get severity of the alert.
* Get criteria of Metric.
*
* @return the criteria value
*/
public Criteria criteria() {
public List<Criteria> criteria() {
return this.criteria;
}

/**
* Set severity of the alert.
* Set criteria of Metric.
*
* @param criteria the criteria value to set
* @return the LogToMetricAction object itself.
*/
public LogToMetricAction withCriteria(Criteria criteria) {
public LogToMetricAction withCriteria(List<Criteria> criteria) {
this.criteria = criteria;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/**
* 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.JsonProperty;

/**
* The metric dimension name and value.
*/
public class MetricSingleDimension {
/**
* Name of the dimension.
*/
@JsonProperty(value = "name", required = true)
private String name;

/**
* Value of the dimension.
*/
@JsonProperty(value = "value", required = true)
private String value;

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

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

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

/**
* Set value of the dimension.
*
* @param value the value value to set
* @return the MetricSingleDimension object itself.
*/
public MetricSingleDimension withValue(String value) {
this.value = value;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/**
* 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.List;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The baseline values for a single sensitivity value.
*/
public class SingleBaseline {
/**
* the sensitivity of the baseline. Possible values include: 'Low',
* 'Medium', 'High'.
*/
@JsonProperty(value = "sensitivity", required = true)
private BaselineSensitivity sensitivity;

/**
* The low thresholds of the baseline.
*/
@JsonProperty(value = "lowThresholds", required = true)
private List<Double> lowThresholds;

/**
* The high thresholds of the baseline.
*/
@JsonProperty(value = "highThresholds", required = true)
private List<Double> highThresholds;

/**
* Get the sensitivity of the baseline. Possible values include: 'Low', 'Medium', 'High'.
*
* @return the sensitivity value
*/
public BaselineSensitivity sensitivity() {
return this.sensitivity;
}

/**
* Set the sensitivity of the baseline. Possible values include: 'Low', 'Medium', 'High'.
*
* @param sensitivity the sensitivity value to set
* @return the SingleBaseline object itself.
*/
public SingleBaseline withSensitivity(BaselineSensitivity sensitivity) {
this.sensitivity = sensitivity;
return this;
}

/**
* Get the low thresholds of the baseline.
*
* @return the lowThresholds value
*/
public List<Double> lowThresholds() {
return this.lowThresholds;
}

/**
* Set the low thresholds of the baseline.
*
* @param lowThresholds the lowThresholds value to set
* @return the SingleBaseline object itself.
*/
public SingleBaseline withLowThresholds(List<Double> lowThresholds) {
this.lowThresholds = lowThresholds;
return this;
}

/**
* Get the high thresholds of the baseline.
*
* @return the highThresholds value
*/
public List<Double> highThresholds() {
return this.highThresholds;
}

/**
* Set the high thresholds of the baseline.
*
* @param highThresholds the highThresholds value to set
* @return the SingleBaseline object itself.
*/
public SingleBaseline withHighThresholds(List<Double> highThresholds) {
this.highThresholds = highThresholds;
return this;
}

}
Loading