/** * <p> * The data points for the specified metric. * </p> * * @param datapoints * The data points for the specified metric. * @return Returns a reference to this object so that method calls can be chained together. */ public GetMetricStatisticsResult withDatapoints(java.util.Collection<Datapoint> datapoints) { setDatapoints(datapoints); return this; }
/** * <p> * The data points for the specified metric. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setDatapoints(java.util.Collection)} or {@link #withDatapoints(java.util.Collection)} if you want to * override the existing values. * </p> * * @param datapoints * The data points for the specified metric. * @return Returns a reference to this object so that method calls can be chained together. */ public GetMetricStatisticsResult withDatapoints(Datapoint... datapoints) { if (this.datapoints == null) { setDatapoints(new com.amazonaws.internal.SdkInternalList<Datapoint>(datapoints.length)); } for (Datapoint ele : datapoints) { this.datapoints.add(ele); } return this; }
/** * <p> * The datapoints for the specified metric. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param datapoints <p> * The datapoints for the specified metric. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public GetMetricStatisticsResult withDatapoints(java.util.Collection<Datapoint> datapoints) { setDatapoints(datapoints); return this; }