AWS SDK for C++  1.8.71
AWS SDK for C++
PutMetricDataRequest.h
Go to the documentation of this file.
1 
6 #pragma once
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace CloudWatch
17 {
18 namespace Model
19 {
20 
24  {
25  public:
27 
28  // Service request name is the Operation name which will send this request out,
29  // each operation should has unique request name, so that we can get operation's name from this request.
30  // Note: this is not true for response, multiple operations may have the same response name,
31  // so we can not get operation's name from response.
32  inline virtual const char* GetServiceRequestName() const override { return "PutMetricData"; }
33 
34  Aws::String SerializePayload() const override;
35 
36  protected:
37  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
38 
39  public:
40 
46  inline const Aws::String& GetNamespace() const{ return m_namespace; }
47 
53  inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; }
54 
60  inline void SetNamespace(const Aws::String& value) { m_namespaceHasBeenSet = true; m_namespace = value; }
61 
67  inline void SetNamespace(Aws::String&& value) { m_namespaceHasBeenSet = true; m_namespace = std::move(value); }
68 
74  inline void SetNamespace(const char* value) { m_namespaceHasBeenSet = true; m_namespace.assign(value); }
75 
81  inline PutMetricDataRequest& WithNamespace(const Aws::String& value) { SetNamespace(value); return *this;}
82 
88  inline PutMetricDataRequest& WithNamespace(Aws::String&& value) { SetNamespace(std::move(value)); return *this;}
89 
95  inline PutMetricDataRequest& WithNamespace(const char* value) { SetNamespace(value); return *this;}
96 
97 
102  inline const Aws::Vector<MetricDatum>& GetMetricData() const{ return m_metricData; }
103 
108  inline bool MetricDataHasBeenSet() const { return m_metricDataHasBeenSet; }
109 
114  inline void SetMetricData(const Aws::Vector<MetricDatum>& value) { m_metricDataHasBeenSet = true; m_metricData = value; }
115 
120  inline void SetMetricData(Aws::Vector<MetricDatum>&& value) { m_metricDataHasBeenSet = true; m_metricData = std::move(value); }
121 
126  inline PutMetricDataRequest& WithMetricData(const Aws::Vector<MetricDatum>& value) { SetMetricData(value); return *this;}
127 
132  inline PutMetricDataRequest& WithMetricData(Aws::Vector<MetricDatum>&& value) { SetMetricData(std::move(value)); return *this;}
133 
138  inline PutMetricDataRequest& AddMetricData(const MetricDatum& value) { m_metricDataHasBeenSet = true; m_metricData.push_back(value); return *this; }
139 
144  inline PutMetricDataRequest& AddMetricData(MetricDatum&& value) { m_metricDataHasBeenSet = true; m_metricData.push_back(std::move(value)); return *this; }
145 
146  private:
147 
148  Aws::String m_namespace;
149  bool m_namespaceHasBeenSet;
150 
151  Aws::Vector<MetricDatum> m_metricData;
152  bool m_metricDataHasBeenSet;
153  };
154 
155 } // namespace Model
156 } // namespace CloudWatch
157 } // namespace Aws
PutMetricDataRequest & WithNamespace(const char *value)
virtual const char * GetServiceRequestName() const override
void SetMetricData(Aws::Vector< MetricDatum > &&value)
#define AWS_CLOUDWATCH_API
PutMetricDataRequest & AddMetricData(MetricDatum &&value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
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)