/** * <p> * The dimensions associated with the metric. If the metric has any associated dimensions, you must specify them in * order for the call to succeed. * </p> * * @param dimensions * The dimensions associated with the metric. If the metric has any associated dimensions, you must specify * them in order for the call to succeed. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeAlarmsForMetricRequest withDimensions(java.util.Collection<Dimension> dimensions) { setDimensions(dimensions); return this; }
/** * <p> * The dimensions associated with the metric. If the metric has any associated dimensions, you must specify them in * order for the call to succeed. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setDimensions(java.util.Collection)} or {@link #withDimensions(java.util.Collection)} if you want to * override the existing values. * </p> * * @param dimensions * The dimensions associated with the metric. If the metric has any associated dimensions, you must specify * them in order for the call to succeed. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeAlarmsForMetricRequest withDimensions(Dimension... dimensions) { if (this.dimensions == null) { setDimensions(new com.amazonaws.internal.SdkInternalList<Dimension>(dimensions.length)); } for (Dimension ele : dimensions) { this.dimensions.add(ele); } return this; }
/** * <p> * The list of dimensions associated with the metric. If the metric has any * associated dimensions, you must specify them in order for the * DescribeAlarmsForMetric to succeed. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param dimensions <p> * The list of dimensions associated with the metric. If the * metric has any associated dimensions, you must specify them in * order for the DescribeAlarmsForMetric to succeed. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DescribeAlarmsForMetricRequest withDimensions(java.util.Collection<Dimension> dimensions) { setDimensions(dimensions); return this; }