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

com.amazonaws.services.lookoutmetrics.model.TimeSeries Maven / Gradle / Ivy

/*
 * 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.lookoutmetrics.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Details about a metric. A metric is an aggregation of the values of a measure for a dimension value, such as * availability in the us-east-1 Region. *

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

* The ID of the metric. *

*/ private String timeSeriesId; /** *

* The dimensions of the metric. *

*/ private java.util.List dimensionList; /** *

* The values for the metric. *

*/ private java.util.List metricValueList; /** *

* The ID of the metric. *

* * @param timeSeriesId * The ID of the metric. */ public void setTimeSeriesId(String timeSeriesId) { this.timeSeriesId = timeSeriesId; } /** *

* The ID of the metric. *

* * @return The ID of the metric. */ public String getTimeSeriesId() { return this.timeSeriesId; } /** *

* The ID of the metric. *

* * @param timeSeriesId * The ID of the metric. * @return Returns a reference to this object so that method calls can be chained together. */ public TimeSeries withTimeSeriesId(String timeSeriesId) { setTimeSeriesId(timeSeriesId); return this; } /** *

* The dimensions of the metric. *

* * @return The dimensions of the metric. */ public java.util.List getDimensionList() { return dimensionList; } /** *

* The dimensions of the metric. *

* * @param dimensionList * The dimensions of the metric. */ public void setDimensionList(java.util.Collection dimensionList) { if (dimensionList == null) { this.dimensionList = null; return; } this.dimensionList = new java.util.ArrayList(dimensionList); } /** *

* The dimensions of the metric. *

*

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

* * @param dimensionList * The dimensions of the metric. * @return Returns a reference to this object so that method calls can be chained together. */ public TimeSeries withDimensionList(DimensionNameValue... dimensionList) { if (this.dimensionList == null) { setDimensionList(new java.util.ArrayList(dimensionList.length)); } for (DimensionNameValue ele : dimensionList) { this.dimensionList.add(ele); } return this; } /** *

* The dimensions of the metric. *

* * @param dimensionList * The dimensions of the metric. * @return Returns a reference to this object so that method calls can be chained together. */ public TimeSeries withDimensionList(java.util.Collection dimensionList) { setDimensionList(dimensionList); return this; } /** *

* The values for the metric. *

* * @return The values for the metric. */ public java.util.List getMetricValueList() { return metricValueList; } /** *

* The values for the metric. *

* * @param metricValueList * The values for the metric. */ public void setMetricValueList(java.util.Collection metricValueList) { if (metricValueList == null) { this.metricValueList = null; return; } this.metricValueList = new java.util.ArrayList(metricValueList); } /** *

* The values for the metric. *

*

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

* * @param metricValueList * The values for the metric. * @return Returns a reference to this object so that method calls can be chained together. */ public TimeSeries withMetricValueList(Double... metricValueList) { if (this.metricValueList == null) { setMetricValueList(new java.util.ArrayList(metricValueList.length)); } for (Double ele : metricValueList) { this.metricValueList.add(ele); } return this; } /** *

* The values for the metric. *

* * @param metricValueList * The values for the metric. * @return Returns a reference to this object so that method calls can be chained together. */ public TimeSeries withMetricValueList(java.util.Collection metricValueList) { setMetricValueList(metricValueList); 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 (getTimeSeriesId() != null) sb.append("TimeSeriesId: ").append(getTimeSeriesId()).append(","); if (getDimensionList() != null) sb.append("DimensionList: ").append(getDimensionList()).append(","); if (getMetricValueList() != null) sb.append("MetricValueList: ").append(getMetricValueList()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TimeSeries == false) return false; TimeSeries other = (TimeSeries) obj; if (other.getTimeSeriesId() == null ^ this.getTimeSeriesId() == null) return false; if (other.getTimeSeriesId() != null && other.getTimeSeriesId().equals(this.getTimeSeriesId()) == false) return false; if (other.getDimensionList() == null ^ this.getDimensionList() == null) return false; if (other.getDimensionList() != null && other.getDimensionList().equals(this.getDimensionList()) == false) return false; if (other.getMetricValueList() == null ^ this.getMetricValueList() == null) return false; if (other.getMetricValueList() != null && other.getMetricValueList().equals(this.getMetricValueList()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTimeSeriesId() == null) ? 0 : getTimeSeriesId().hashCode()); hashCode = prime * hashCode + ((getDimensionList() == null) ? 0 : getDimensionList().hashCode()); hashCode = prime * hashCode + ((getMetricValueList() == null) ? 0 : getMetricValueList().hashCode()); return hashCode; } @Override public TimeSeries clone() { try { return (TimeSeries) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.lookoutmetrics.model.transform.TimeSeriesMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy