AWS SDK for C++  0.12.9
AWS SDK for C++
PutMetricDataRequest.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
21 
22 namespace Aws
23 {
24 namespace CloudWatch
25 {
26 namespace Model
27 {
28 
32  {
33  public:
35  Aws::String SerializePayload() const override;
36 
43  inline const Aws::String& GetNamespace() const{ return m_namespace; }
44 
51  inline void SetNamespace(const Aws::String& value) { m_namespaceHasBeenSet = true; m_namespace = value; }
52 
59  inline void SetNamespace(Aws::String&& value) { m_namespaceHasBeenSet = true; m_namespace = value; }
60 
67  inline void SetNamespace(const char* value) { m_namespaceHasBeenSet = true; m_namespace.assign(value); }
68 
75  inline PutMetricDataRequest& WithNamespace(const Aws::String& value) { SetNamespace(value); return *this;}
76 
83  inline PutMetricDataRequest& WithNamespace(Aws::String&& value) { SetNamespace(value); return *this;}
84 
91  inline PutMetricDataRequest& WithNamespace(const char* value) { SetNamespace(value); return *this;}
92 
96  inline const Aws::Vector<MetricDatum>& GetMetricData() const{ return m_metricData; }
97 
101  inline void SetMetricData(const Aws::Vector<MetricDatum>& value) { m_metricDataHasBeenSet = true; m_metricData = value; }
102 
106  inline void SetMetricData(Aws::Vector<MetricDatum>&& value) { m_metricDataHasBeenSet = true; m_metricData = value; }
107 
111  inline PutMetricDataRequest& WithMetricData(const Aws::Vector<MetricDatum>& value) { SetMetricData(value); return *this;}
112 
116  inline PutMetricDataRequest& WithMetricData(Aws::Vector<MetricDatum>&& value) { SetMetricData(value); return *this;}
117 
121  inline PutMetricDataRequest& AddMetricData(const MetricDatum& value) { m_metricDataHasBeenSet = true; m_metricData.push_back(value); return *this; }
122 
126  inline PutMetricDataRequest& AddMetricData(MetricDatum&& value) { m_metricDataHasBeenSet = true; m_metricData.push_back(value); return *this; }
127 
128  private:
129  Aws::String m_namespace;
130  bool m_namespaceHasBeenSet;
131  Aws::Vector<MetricDatum> m_metricData;
132  bool m_metricDataHasBeenSet;
133  };
134 
135 } // namespace Model
136 } // namespace CloudWatch
137 } // namespace Aws
PutMetricDataRequest & WithNamespace(const char *value)
void SetMetricData(Aws::Vector< MetricDatum > &&value)
#define AWS_CLOUDWATCH_API
PutMetricDataRequest & AddMetricData(MetricDatum &&value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
PutMetricDataRequest & WithNamespace(Aws::String &&value)
PutMetricDataRequest & WithNamespace(const Aws::String &value)
PutMetricDataRequest & WithMetricData(Aws::Vector< MetricDatum > &&value)
PutMetricDataRequest & AddMetricData(const MetricDatum &value)
PutMetricDataRequest & WithMetricData(const Aws::Vector< MetricDatum > &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
const Aws::Vector< MetricDatum > & GetMetricData() const
void SetMetricData(const Aws::Vector< MetricDatum > &value)
JSON (JavaScript Object Notation).