text: /*
  * Copyright 2010-2016 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.
  */
  #pragma once
  #include <aws/monitoring/CloudWatch_EXPORTS.h>
  #include <aws/core/utils/memory/stl/AWSStreamFwd.h>
  #include <aws/core/utils/memory/stl/AWSString.h>
  #include <aws/core/utils/memory/stl/AWSVector.h>
  #include <aws/monitoring/model/Dimension.h>
  
  namespace Aws
  {
  namespace Utils
  {
  namespace Xml
  {
    class XmlNode;
  } // namespace Xml
  } // namespace Utils
  namespace CloudWatch
  {
  namespace Model
  {
  
    /**
     * <p> The <code>Metric</code> data type contains information about a specific
     * metric. If you call <a>ListMetrics</a>, Amazon CloudWatch returns information
     * contained by this data type. </p> <p>The example in the Examples section
     * publishes two metrics named buffers and latency. Both metrics are in the
     * examples namespace. Both metrics have two dimensions, InstanceID and
     * InstanceType.</p>
     */
    class AWS_CLOUDWATCH_API Metric
    {
    public:
      Metric();
      Metric(const Aws::Utils::Xml::XmlNode& xmlNode);
      Metric& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
  
      void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
      void OutputToStream(Aws::OStream& oStream, const char* location) const;
  
      /**
       * <p>The namespace of the metric.</p>
       */
      inline const Aws::String& GetNamespace() const{ return m_namespace; }
  
      /**
       * <p>The namespace of the metric.</p>
       */
      inline void SetNamespace(const Aws::String& value) { m_namespaceHasBeenSet = true; m_namespace = value; }
  
      /**
       * <p>The namespace of the metric.</p>
       */
      inline void SetNamespace(Aws::String&& value) { m_namespaceHasBeenSet = true; m_namespace = value; }
  
      /**
       * <p>The namespace of the metric.</p>
       */
      inline void SetNamespace(const char* value) { m_namespaceHasBeenSet = true; m_namespace.assign(value); }
  
      /**
       * <p>The namespace of the metric.</p>
       */
      inline Metric& WithNamespace(const Aws::String& value) { SetNamespace(value); return *this;}
  
      /**
       * <p>The namespace of the metric.</p>
       */
      inline Metric& WithNamespace(Aws::String&& value) { SetNamespace(value); return *this;}
  
      /**
       * <p>The namespace of the metric.</p>
       */
      inline Metric& WithNamespace(const char* value) { SetNamespace(value); return *this;}
  
      /**
       * <p>The name of the metric.</p>
       */
      inline const Aws::String& GetMetricName() const{ return m_metricName; }
  
      /**
       * <p>The name of the metric.</p>
       */
      inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; }
  
      /**
       * <p>The name of the metric.</p>
       */
      inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = value; }
  
      /**
       * <p>The name of the metric.</p>
       */
      inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); }
  
      /**
       * <p>The name of the metric.</p>
       */
      inline Metric& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;}
  
      /**
       * <p>The name of the metric.</p>
       */
      inline Metric& WithMetricName(Aws::String&& value) { SetMetricName(value); return *this;}
  
      /**
       * <p>The name of the metric.</p>
       */
      inline Metric& WithMetricName(const char* value) { SetMetricName(value); return *this;}
  
      /**
       * <p>A list of dimensions associated with the metric.</p>
       */
      inline const Aws::Vector<Dimension>& GetDimensions() const{ return m_dimensions; }
  
      /**
       * <p>A list of dimensions associated with the metric.</p>
       */
      inline void SetDimensions(const Aws::Vector<Dimension>& value) { m_dimensionsHasBeenSet = true; m_dimensions = value; }
  
      /**
       * <p>A list of dimensions associated with the metric.</p>
       */
      inline void SetDimensions(Aws::Vector<Dimension>&& value) { m_dimensionsHasBeenSet = true; m_dimensions = value; }
  
      /**
       * <p>A list of dimensions associated with the metric.</p>
       */
      inline Metric& WithDimensions(const Aws::Vector<Dimension>& value) { SetDimensions(value); return *this;}
  
      /**
       * <p>A list of dimensions associated with the metric.</p>
       */
      inline Metric& WithDimensions(Aws::Vector<Dimension>&& value) { SetDimensions(value); return *this;}
  
      /**
       * <p>A list of dimensions associated with the metric.</p>
       */
      inline Metric& AddDimensions(const Dimension& value) { m_dimensionsHasBeenSet = true; m_dimensions.push_back(value); return *this; }
  
      /**
       * <p>A list of dimensions associated with the metric.</p>
       */
      inline Metric& AddDimensions(Dimension&& value) { m_dimensionsHasBeenSet = true; m_dimensions.push_back(value); return *this; }
  
    private:
      Aws::String m_namespace;
      bool m_namespaceHasBeenSet;
      Aws::String m_metricName;
      bool m_metricNameHasBeenSet;
      Aws::Vector<Dimension> m_dimensions;
      bool m_dimensionsHasBeenSet;
    };
  
  } // namespace Model
  } // namespace CloudWatch
  } // namespace Aws
  