All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.cloudwatch.model.GetInsightRuleReportResult Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon CloudWatch module holds the client classes that are used for communicating with Amazon CloudWatch Service

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.cloudwatch.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 
 * @see AWS
 *      API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetInsightRuleReportResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {

    /**
     * 

* An array of the strings used as the keys for this rule. The keys are the dimensions used to classify * contributors. If the rule contains more than one key, then each unique combination of values for the keys is * counted as a unique contributor. *

*/ private com.amazonaws.internal.SdkInternalList keyLabels; /** *

* Specifies whether this rule aggregates contributor data by COUNT or SUM. *

*/ private String aggregationStatistic; /** *

* The sum of the values from all individual contributors that match the rule. *

*/ private Double aggregateValue; /** *

* An approximate count of the unique contributors found by this rule in this time period. *

*/ private Long approximateUniqueCount; /** *

* An array of the unique contributors found by this rule in this time period. If the rule contains multiple keys, * each combination of values for the keys counts as a unique contributor. *

*/ private com.amazonaws.internal.SdkInternalList contributors; /** *

* A time series of metric data points that matches the time period in the rule request. *

*/ private com.amazonaws.internal.SdkInternalList metricDatapoints; /** *

* An array of the strings used as the keys for this rule. The keys are the dimensions used to classify * contributors. If the rule contains more than one key, then each unique combination of values for the keys is * counted as a unique contributor. *

* * @return An array of the strings used as the keys for this rule. The keys are the dimensions used to classify * contributors. If the rule contains more than one key, then each unique combination of values for the keys * is counted as a unique contributor. */ public java.util.List getKeyLabels() { if (keyLabels == null) { keyLabels = new com.amazonaws.internal.SdkInternalList(); } return keyLabels; } /** *

* An array of the strings used as the keys for this rule. The keys are the dimensions used to classify * contributors. If the rule contains more than one key, then each unique combination of values for the keys is * counted as a unique contributor. *

* * @param keyLabels * An array of the strings used as the keys for this rule. The keys are the dimensions used to classify * contributors. If the rule contains more than one key, then each unique combination of values for the keys * is counted as a unique contributor. */ public void setKeyLabels(java.util.Collection keyLabels) { if (keyLabels == null) { this.keyLabels = null; return; } this.keyLabels = new com.amazonaws.internal.SdkInternalList(keyLabels); } /** *

* An array of the strings used as the keys for this rule. The keys are the dimensions used to classify * contributors. If the rule contains more than one key, then each unique combination of values for the keys is * counted as a unique contributor. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setKeyLabels(java.util.Collection)} or {@link #withKeyLabels(java.util.Collection)} if you want to * override the existing values. *

* * @param keyLabels * An array of the strings used as the keys for this rule. The keys are the dimensions used to classify * contributors. If the rule contains more than one key, then each unique combination of values for the keys * is counted as a unique contributor. * @return Returns a reference to this object so that method calls can be chained together. */ public GetInsightRuleReportResult withKeyLabels(String... keyLabels) { if (this.keyLabels == null) { setKeyLabels(new com.amazonaws.internal.SdkInternalList(keyLabels.length)); } for (String ele : keyLabels) { this.keyLabels.add(ele); } return this; } /** *

* An array of the strings used as the keys for this rule. The keys are the dimensions used to classify * contributors. If the rule contains more than one key, then each unique combination of values for the keys is * counted as a unique contributor. *

* * @param keyLabels * An array of the strings used as the keys for this rule. The keys are the dimensions used to classify * contributors. If the rule contains more than one key, then each unique combination of values for the keys * is counted as a unique contributor. * @return Returns a reference to this object so that method calls can be chained together. */ public GetInsightRuleReportResult withKeyLabels(java.util.Collection keyLabels) { setKeyLabels(keyLabels); return this; } /** *

* Specifies whether this rule aggregates contributor data by COUNT or SUM. *

* * @param aggregationStatistic * Specifies whether this rule aggregates contributor data by COUNT or SUM. */ public void setAggregationStatistic(String aggregationStatistic) { this.aggregationStatistic = aggregationStatistic; } /** *

* Specifies whether this rule aggregates contributor data by COUNT or SUM. *

* * @return Specifies whether this rule aggregates contributor data by COUNT or SUM. */ public String getAggregationStatistic() { return this.aggregationStatistic; } /** *

* Specifies whether this rule aggregates contributor data by COUNT or SUM. *

* * @param aggregationStatistic * Specifies whether this rule aggregates contributor data by COUNT or SUM. * @return Returns a reference to this object so that method calls can be chained together. */ public GetInsightRuleReportResult withAggregationStatistic(String aggregationStatistic) { setAggregationStatistic(aggregationStatistic); return this; } /** *

* The sum of the values from all individual contributors that match the rule. *

* * @param aggregateValue * The sum of the values from all individual contributors that match the rule. */ public void setAggregateValue(Double aggregateValue) { this.aggregateValue = aggregateValue; } /** *

* The sum of the values from all individual contributors that match the rule. *

* * @return The sum of the values from all individual contributors that match the rule. */ public Double getAggregateValue() { return this.aggregateValue; } /** *

* The sum of the values from all individual contributors that match the rule. *

* * @param aggregateValue * The sum of the values from all individual contributors that match the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public GetInsightRuleReportResult withAggregateValue(Double aggregateValue) { setAggregateValue(aggregateValue); return this; } /** *

* An approximate count of the unique contributors found by this rule in this time period. *

* * @param approximateUniqueCount * An approximate count of the unique contributors found by this rule in this time period. */ public void setApproximateUniqueCount(Long approximateUniqueCount) { this.approximateUniqueCount = approximateUniqueCount; } /** *

* An approximate count of the unique contributors found by this rule in this time period. *

* * @return An approximate count of the unique contributors found by this rule in this time period. */ public Long getApproximateUniqueCount() { return this.approximateUniqueCount; } /** *

* An approximate count of the unique contributors found by this rule in this time period. *

* * @param approximateUniqueCount * An approximate count of the unique contributors found by this rule in this time period. * @return Returns a reference to this object so that method calls can be chained together. */ public GetInsightRuleReportResult withApproximateUniqueCount(Long approximateUniqueCount) { setApproximateUniqueCount(approximateUniqueCount); return this; } /** *

* An array of the unique contributors found by this rule in this time period. If the rule contains multiple keys, * each combination of values for the keys counts as a unique contributor. *

* * @return An array of the unique contributors found by this rule in this time period. If the rule contains multiple * keys, each combination of values for the keys counts as a unique contributor. */ public java.util.List getContributors() { if (contributors == null) { contributors = new com.amazonaws.internal.SdkInternalList(); } return contributors; } /** *

* An array of the unique contributors found by this rule in this time period. If the rule contains multiple keys, * each combination of values for the keys counts as a unique contributor. *

* * @param contributors * An array of the unique contributors found by this rule in this time period. If the rule contains multiple * keys, each combination of values for the keys counts as a unique contributor. */ public void setContributors(java.util.Collection contributors) { if (contributors == null) { this.contributors = null; return; } this.contributors = new com.amazonaws.internal.SdkInternalList(contributors); } /** *

* An array of the unique contributors found by this rule in this time period. If the rule contains multiple keys, * each combination of values for the keys counts as a unique contributor. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setContributors(java.util.Collection)} or {@link #withContributors(java.util.Collection)} if you want to * override the existing values. *

* * @param contributors * An array of the unique contributors found by this rule in this time period. If the rule contains multiple * keys, each combination of values for the keys counts as a unique contributor. * @return Returns a reference to this object so that method calls can be chained together. */ public GetInsightRuleReportResult withContributors(InsightRuleContributor... contributors) { if (this.contributors == null) { setContributors(new com.amazonaws.internal.SdkInternalList(contributors.length)); } for (InsightRuleContributor ele : contributors) { this.contributors.add(ele); } return this; } /** *

* An array of the unique contributors found by this rule in this time period. If the rule contains multiple keys, * each combination of values for the keys counts as a unique contributor. *

* * @param contributors * An array of the unique contributors found by this rule in this time period. If the rule contains multiple * keys, each combination of values for the keys counts as a unique contributor. * @return Returns a reference to this object so that method calls can be chained together. */ public GetInsightRuleReportResult withContributors(java.util.Collection contributors) { setContributors(contributors); return this; } /** *

* A time series of metric data points that matches the time period in the rule request. *

* * @return A time series of metric data points that matches the time period in the rule request. */ public java.util.List getMetricDatapoints() { if (metricDatapoints == null) { metricDatapoints = new com.amazonaws.internal.SdkInternalList(); } return metricDatapoints; } /** *

* A time series of metric data points that matches the time period in the rule request. *

* * @param metricDatapoints * A time series of metric data points that matches the time period in the rule request. */ public void setMetricDatapoints(java.util.Collection metricDatapoints) { if (metricDatapoints == null) { this.metricDatapoints = null; return; } this.metricDatapoints = new com.amazonaws.internal.SdkInternalList(metricDatapoints); } /** *

* A time series of metric data points that matches the time period in the rule request. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setMetricDatapoints(java.util.Collection)} or {@link #withMetricDatapoints(java.util.Collection)} if you * want to override the existing values. *

* * @param metricDatapoints * A time series of metric data points that matches the time period in the rule request. * @return Returns a reference to this object so that method calls can be chained together. */ public GetInsightRuleReportResult withMetricDatapoints(InsightRuleMetricDatapoint... metricDatapoints) { if (this.metricDatapoints == null) { setMetricDatapoints(new com.amazonaws.internal.SdkInternalList(metricDatapoints.length)); } for (InsightRuleMetricDatapoint ele : metricDatapoints) { this.metricDatapoints.add(ele); } return this; } /** *

* A time series of metric data points that matches the time period in the rule request. *

* * @param metricDatapoints * A time series of metric data points that matches the time period in the rule request. * @return Returns a reference to this object so that method calls can be chained together. */ public GetInsightRuleReportResult withMetricDatapoints(java.util.Collection metricDatapoints) { setMetricDatapoints(metricDatapoints); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getKeyLabels() != null) sb.append("KeyLabels: ").append(getKeyLabels()).append(","); if (getAggregationStatistic() != null) sb.append("AggregationStatistic: ").append(getAggregationStatistic()).append(","); if (getAggregateValue() != null) sb.append("AggregateValue: ").append(getAggregateValue()).append(","); if (getApproximateUniqueCount() != null) sb.append("ApproximateUniqueCount: ").append(getApproximateUniqueCount()).append(","); if (getContributors() != null) sb.append("Contributors: ").append(getContributors()).append(","); if (getMetricDatapoints() != null) sb.append("MetricDatapoints: ").append(getMetricDatapoints()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetInsightRuleReportResult == false) return false; GetInsightRuleReportResult other = (GetInsightRuleReportResult) obj; if (other.getKeyLabels() == null ^ this.getKeyLabels() == null) return false; if (other.getKeyLabels() != null && other.getKeyLabels().equals(this.getKeyLabels()) == false) return false; if (other.getAggregationStatistic() == null ^ this.getAggregationStatistic() == null) return false; if (other.getAggregationStatistic() != null && other.getAggregationStatistic().equals(this.getAggregationStatistic()) == false) return false; if (other.getAggregateValue() == null ^ this.getAggregateValue() == null) return false; if (other.getAggregateValue() != null && other.getAggregateValue().equals(this.getAggregateValue()) == false) return false; if (other.getApproximateUniqueCount() == null ^ this.getApproximateUniqueCount() == null) return false; if (other.getApproximateUniqueCount() != null && other.getApproximateUniqueCount().equals(this.getApproximateUniqueCount()) == false) return false; if (other.getContributors() == null ^ this.getContributors() == null) return false; if (other.getContributors() != null && other.getContributors().equals(this.getContributors()) == false) return false; if (other.getMetricDatapoints() == null ^ this.getMetricDatapoints() == null) return false; if (other.getMetricDatapoints() != null && other.getMetricDatapoints().equals(this.getMetricDatapoints()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getKeyLabels() == null) ? 0 : getKeyLabels().hashCode()); hashCode = prime * hashCode + ((getAggregationStatistic() == null) ? 0 : getAggregationStatistic().hashCode()); hashCode = prime * hashCode + ((getAggregateValue() == null) ? 0 : getAggregateValue().hashCode()); hashCode = prime * hashCode + ((getApproximateUniqueCount() == null) ? 0 : getApproximateUniqueCount().hashCode()); hashCode = prime * hashCode + ((getContributors() == null) ? 0 : getContributors().hashCode()); hashCode = prime * hashCode + ((getMetricDatapoints() == null) ? 0 : getMetricDatapoints().hashCode()); return hashCode; } @Override public GetInsightRuleReportResult clone() { try { return (GetInsightRuleReportResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy