shiver.me.timbers.aws.cloudwatch.AlarmMetricStat Maven / Gradle / Ivy
package shiver.me.timbers.aws.cloudwatch;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import shiver.me.timbers.aws.Property;
/**
* AlarmMetricStat
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metricstat.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"Metric",
"Period",
"Stat",
"Unit"
})
public class AlarmMetricStat implements Property
{
/**
* AlarmMetric
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metric.html
*
*/
@JsonProperty("Metric")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metric.html")
private Property metric;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metricstat.html#cfn-cloudwatch-alarm-metricstat-period
*
*/
@JsonProperty("Period")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metricstat.html#cfn-cloudwatch-alarm-metricstat-period")
private Number period;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metricstat.html#cfn-cloudwatch-alarm-metricstat-stat
*
*/
@JsonProperty("Stat")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metricstat.html#cfn-cloudwatch-alarm-metricstat-stat")
private CharSequence stat;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metricstat.html#cfn-cloudwatch-alarm-metricstat-unit
*
*/
@JsonProperty("Unit")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metricstat.html#cfn-cloudwatch-alarm-metricstat-unit")
private CharSequence unit;
/**
* AlarmMetric
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metric.html
*
*/
@JsonIgnore
public Property getMetric() {
return metric;
}
/**
* AlarmMetric
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metric.html
*
*/
@JsonIgnore
public void setMetric(Property metric) {
this.metric = metric;
}
public AlarmMetricStat withMetric(Property metric) {
this.metric = metric;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metricstat.html#cfn-cloudwatch-alarm-metricstat-period
*
*/
@JsonIgnore
public Number getPeriod() {
return period;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metricstat.html#cfn-cloudwatch-alarm-metricstat-period
*
*/
@JsonIgnore
public void setPeriod(Number period) {
this.period = period;
}
public AlarmMetricStat withPeriod(Number period) {
this.period = period;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metricstat.html#cfn-cloudwatch-alarm-metricstat-stat
*
*/
@JsonIgnore
public CharSequence getStat() {
return stat;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metricstat.html#cfn-cloudwatch-alarm-metricstat-stat
*
*/
@JsonIgnore
public void setStat(CharSequence stat) {
this.stat = stat;
}
public AlarmMetricStat withStat(CharSequence stat) {
this.stat = stat;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metricstat.html#cfn-cloudwatch-alarm-metricstat-unit
*
*/
@JsonIgnore
public CharSequence getUnit() {
return unit;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metricstat.html#cfn-cloudwatch-alarm-metricstat-unit
*
*/
@JsonIgnore
public void setUnit(CharSequence unit) {
this.unit = unit;
}
public AlarmMetricStat withUnit(CharSequence unit) {
this.unit = unit;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("metric", metric).append("period", period).append("stat", stat).append("unit", unit).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(period).append(stat).append(unit).append(metric).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof AlarmMetricStat) == false) {
return false;
}
AlarmMetricStat rhs = ((AlarmMetricStat) other);
return new EqualsBuilder().append(period, rhs.period).append(stat, rhs.stat).append(unit, rhs.unit).append(metric, rhs.metric).isEquals();
}
}