/* * Copyright 2018-2023 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; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PutMetricDataRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The namespace for the metric data. You can use ASCII characters for the namespace, except for control characters * which are not supported. *
*
* To avoid conflicts with Amazon Web Services service namespaces, you should not specify a namespace that begins
* with AWS/
*
* The data for the metric. The array can include no more than 1000 metrics per call. *
*/ private com.amazonaws.internal.SdkInternalList* The namespace for the metric data. You can use ASCII characters for the namespace, except for control characters * which are not supported. *
*
* To avoid conflicts with Amazon Web Services service namespaces, you should not specify a namespace that begins
* with AWS/
*
* To avoid conflicts with Amazon Web Services service namespaces, you should not specify a namespace that
* begins with AWS/
*/
public void setNamespace(String namespace) {
this.namespace = namespace;
}
/**
*
* The namespace for the metric data. You can use ASCII characters for the namespace, except for control characters * which are not supported. *
*
* To avoid conflicts with Amazon Web Services service namespaces, you should not specify a namespace that begins
* with AWS/
*
* To avoid conflicts with Amazon Web Services service namespaces, you should not specify a namespace that
* begins with AWS/
*/
public String getNamespace() {
return this.namespace;
}
/**
*
* The namespace for the metric data. You can use ASCII characters for the namespace, except for control characters * which are not supported. *
*
* To avoid conflicts with Amazon Web Services service namespaces, you should not specify a namespace that begins
* with AWS/
*
* To avoid conflicts with Amazon Web Services service namespaces, you should not specify a namespace that
* begins with AWS/
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutMetricDataRequest withNamespace(String namespace) {
setNamespace(namespace);
return this;
}
/**
*
* The data for the metric. The array can include no more than 1000 metrics per call. *
* * @return The data for the metric. The array can include no more than 1000 metrics per call. */ public java.util.List* The data for the metric. The array can include no more than 1000 metrics per call. *
* * @param metricData * The data for the metric. The array can include no more than 1000 metrics per call. */ public void setMetricData(java.util.Collection* The data for the metric. The array can include no more than 1000 metrics per call. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setMetricData(java.util.Collection)} or {@link #withMetricData(java.util.Collection)} if you want to * override the existing values. *
* * @param metricData * The data for the metric. The array can include no more than 1000 metrics per call. * @return Returns a reference to this object so that method calls can be chained together. */ public PutMetricDataRequest withMetricData(MetricDatum... metricData) { if (this.metricData == null) { setMetricData(new com.amazonaws.internal.SdkInternalList* The data for the metric. The array can include no more than 1000 metrics per call. *
* * @param metricData * The data for the metric. The array can include no more than 1000 metrics per call. * @return Returns a reference to this object so that method calls can be chained together. */ public PutMetricDataRequest withMetricData(java.util.Collection