AWS SDK for C++  0.12.9
AWS SDK for C++
PutTargetsRequest.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 CloudWatchEvents
25 {
26 namespace Model
27 {
28 
33  {
34  public:
36  Aws::String SerializePayload() const override;
37 
38  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
39 
43  inline const Aws::String& GetRule() const{ return m_rule; }
44 
48  inline void SetRule(const Aws::String& value) { m_ruleHasBeenSet = true; m_rule = value; }
49 
53  inline void SetRule(Aws::String&& value) { m_ruleHasBeenSet = true; m_rule = value; }
54 
58  inline void SetRule(const char* value) { m_ruleHasBeenSet = true; m_rule.assign(value); }
59 
63  inline PutTargetsRequest& WithRule(const Aws::String& value) { SetRule(value); return *this;}
64 
68  inline PutTargetsRequest& WithRule(Aws::String&& value) { SetRule(value); return *this;}
69 
73  inline PutTargetsRequest& WithRule(const char* value) { SetRule(value); return *this;}
74 
78  inline const Aws::Vector<Target>& GetTargets() const{ return m_targets; }
79 
83  inline void SetTargets(const Aws::Vector<Target>& value) { m_targetsHasBeenSet = true; m_targets = value; }
84 
88  inline void SetTargets(Aws::Vector<Target>&& value) { m_targetsHasBeenSet = true; m_targets = value; }
89 
93  inline PutTargetsRequest& WithTargets(const Aws::Vector<Target>& value) { SetTargets(value); return *this;}
94 
98  inline PutTargetsRequest& WithTargets(Aws::Vector<Target>&& value) { SetTargets(value); return *this;}
99 
103  inline PutTargetsRequest& AddTargets(const Target& value) { m_targetsHasBeenSet = true; m_targets.push_back(value); return *this; }
104 
108  inline PutTargetsRequest& AddTargets(Target&& value) { m_targetsHasBeenSet = true; m_targets.push_back(value); return *this; }
109 
110  private:
111  Aws::String m_rule;
112  bool m_ruleHasBeenSet;
113  Aws::Vector<Target> m_targets;
114  bool m_targetsHasBeenSet;
115  };
116 
117 } // namespace Model
118 } // namespace CloudWatchEvents
119 } // namespace Aws
#define AWS_CLOUDWATCHEVENTS_API
const Aws::Vector< Target > & GetTargets() const
PutTargetsRequest & AddTargets(Target &&value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
void SetTargets(Aws::Vector< Target > &&value)
PutTargetsRequest & AddTargets(const Target &value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:63
PutTargetsRequest & WithTargets(Aws::Vector< Target > &&value)
void SetTargets(const Aws::Vector< Target > &value)
PutTargetsRequest & WithRule(Aws::String &&value)
PutTargetsRequest & WithTargets(const Aws::Vector< Target > &value)
PutTargetsRequest & WithRule(const Aws::String &value)
PutTargetsRequest & WithRule(const char *value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
JSON (JavaScript Object Notation).