/** * <p> * The metrics. * </p> * * @param metrics * The metrics. * @return Returns a reference to this object so that method calls can be chained together. */ public ListMetricsResult withMetrics(java.util.Collection<Metric> metrics) { setMetrics(metrics); return this; }
/** * <p> * The metrics. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setMetrics(java.util.Collection)} or {@link #withMetrics(java.util.Collection)} if you want to override * the existing values. * </p> * * @param metrics * The metrics. * @return Returns a reference to this object so that method calls can be chained together. */ public ListMetricsResult withMetrics(Metric... metrics) { if (this.metrics == null) { setMetrics(new com.amazonaws.internal.SdkInternalList<Metric>(metrics.length)); } for (Metric ele : metrics) { this.metrics.add(ele); } return this; }
/** * <p> * A list of metrics used to generate statistics for an AWS account. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param metrics <p> * A list of metrics used to generate statistics for an AWS * account. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public ListMetricsResult withMetrics(java.util.Collection<Metric> metrics) { setMetrics(metrics); return this; }