AWS SDK for C++  0.14.3
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 
33  {
34  public:
36  Aws::String SerializePayload() const override;
37 
44  inline const Aws::String& GetNamespace() const{ return m_namespace; }
45 
52  inline void SetNamespace(const Aws::String& value) { m_namespaceHasBeenSet = true; m_namespace = value; }
53 
60  inline void SetNamespace(Aws::String&& value) { m_namespaceHasBeenSet = true; m_namespace = value; }
61 
68  inline void SetNamespace(const char* value) { m_namespaceHasBeenSet = true; m_namespace.assign(value); }
69 
76  inline PutMetricDataRequest& WithNamespace(const Aws::String& value) { SetNamespace(value); return *this;}
77 
84  inline PutMetricDataRequest& WithNamespace(Aws::String&& value) { SetNamespace(value); return *this;}
85 
92  inline PutMetricDataRequest& WithNamespace(const char* value) { SetNamespace(value); return *this;}
93 
97  inline const Aws::Vector<MetricDatum>& GetMetricData() const{ return m_metricData; }
98 
102  inline void SetMetricData(const Aws::Vector<MetricDatum>& value) { m_metricDataHasBeenSet = true; m_metricData = value; }
103 
107  inline void SetMetricData(Aws::Vector<MetricDatum>&& value) { m_metricDataHasBeenSet = true; m_metricData = value; }
108 
112  inline PutMetricDataRequest& WithMetricData(const Aws::Vector<MetricDatum>& value) { SetMetricData(value); return *this;}
113 
117  inline PutMetricDataRequest& WithMetricData(Aws::Vector<MetricDatum>&& value) { SetMetricData(value); return *this;}
118 
122  inline PutMetricDataRequest& AddMetricData(const MetricDatum& value) { m_metricDataHasBeenSet = true; m_metricData.push_back(value); return *this; }
123 
127  inline PutMetricDataRequest& AddMetricData(MetricDatum&& value) { m_metricDataHasBeenSet = true; m_metricData.push_back(value); return *this; }
128 
129  private:
130  Aws::String m_namespace;
131  bool m_namespaceHasBeenSet;
132  Aws::Vector<MetricDatum> m_metricData;
133  bool m_metricDataHasBeenSet;
134  };
135 
136 } // namespace Model
137 } // namespace CloudWatch
138 } // 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).