1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/elasticmapreduce/EMR_EXPORTS.h>
8 #include <aws/elasticmapreduce/EMRRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/elasticmapreduce/model/AutoScalingPolicy.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace EMR
16 {
17 namespace Model
18 {
19 
20   /**
21    */
22   class AWS_EMR_API PutAutoScalingPolicyRequest : public EMRRequest
23   {
24   public:
25     PutAutoScalingPolicyRequest();
26 
27     // Service request name is the Operation name which will send this request out,
28     // each operation should has unique request name, so that we can get operation's name from this request.
29     // Note: this is not true for response, multiple operations may have the same response name,
30     // so we can not get operation's name from response.
GetServiceRequestName()31     inline virtual const char* GetServiceRequestName() const override { return "PutAutoScalingPolicy"; }
32 
33     Aws::String SerializePayload() const override;
34 
35     Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
36 
37 
38     /**
39      * <p>Specifies the ID of a cluster. The instance group to which the automatic
40      * scaling policy is applied is within this cluster.</p>
41      */
GetClusterId()42     inline const Aws::String& GetClusterId() const{ return m_clusterId; }
43 
44     /**
45      * <p>Specifies the ID of a cluster. The instance group to which the automatic
46      * scaling policy is applied is within this cluster.</p>
47      */
ClusterIdHasBeenSet()48     inline bool ClusterIdHasBeenSet() const { return m_clusterIdHasBeenSet; }
49 
50     /**
51      * <p>Specifies the ID of a cluster. The instance group to which the automatic
52      * scaling policy is applied is within this cluster.</p>
53      */
SetClusterId(const Aws::String & value)54     inline void SetClusterId(const Aws::String& value) { m_clusterIdHasBeenSet = true; m_clusterId = value; }
55 
56     /**
57      * <p>Specifies the ID of a cluster. The instance group to which the automatic
58      * scaling policy is applied is within this cluster.</p>
59      */
SetClusterId(Aws::String && value)60     inline void SetClusterId(Aws::String&& value) { m_clusterIdHasBeenSet = true; m_clusterId = std::move(value); }
61 
62     /**
63      * <p>Specifies the ID of a cluster. The instance group to which the automatic
64      * scaling policy is applied is within this cluster.</p>
65      */
SetClusterId(const char * value)66     inline void SetClusterId(const char* value) { m_clusterIdHasBeenSet = true; m_clusterId.assign(value); }
67 
68     /**
69      * <p>Specifies the ID of a cluster. The instance group to which the automatic
70      * scaling policy is applied is within this cluster.</p>
71      */
WithClusterId(const Aws::String & value)72     inline PutAutoScalingPolicyRequest& WithClusterId(const Aws::String& value) { SetClusterId(value); return *this;}
73 
74     /**
75      * <p>Specifies the ID of a cluster. The instance group to which the automatic
76      * scaling policy is applied is within this cluster.</p>
77      */
WithClusterId(Aws::String && value)78     inline PutAutoScalingPolicyRequest& WithClusterId(Aws::String&& value) { SetClusterId(std::move(value)); return *this;}
79 
80     /**
81      * <p>Specifies the ID of a cluster. The instance group to which the automatic
82      * scaling policy is applied is within this cluster.</p>
83      */
WithClusterId(const char * value)84     inline PutAutoScalingPolicyRequest& WithClusterId(const char* value) { SetClusterId(value); return *this;}
85 
86 
87     /**
88      * <p>Specifies the ID of the instance group to which the automatic scaling policy
89      * is applied.</p>
90      */
GetInstanceGroupId()91     inline const Aws::String& GetInstanceGroupId() const{ return m_instanceGroupId; }
92 
93     /**
94      * <p>Specifies the ID of the instance group to which the automatic scaling policy
95      * is applied.</p>
96      */
InstanceGroupIdHasBeenSet()97     inline bool InstanceGroupIdHasBeenSet() const { return m_instanceGroupIdHasBeenSet; }
98 
99     /**
100      * <p>Specifies the ID of the instance group to which the automatic scaling policy
101      * is applied.</p>
102      */
SetInstanceGroupId(const Aws::String & value)103     inline void SetInstanceGroupId(const Aws::String& value) { m_instanceGroupIdHasBeenSet = true; m_instanceGroupId = value; }
104 
105     /**
106      * <p>Specifies the ID of the instance group to which the automatic scaling policy
107      * is applied.</p>
108      */
SetInstanceGroupId(Aws::String && value)109     inline void SetInstanceGroupId(Aws::String&& value) { m_instanceGroupIdHasBeenSet = true; m_instanceGroupId = std::move(value); }
110 
111     /**
112      * <p>Specifies the ID of the instance group to which the automatic scaling policy
113      * is applied.</p>
114      */
SetInstanceGroupId(const char * value)115     inline void SetInstanceGroupId(const char* value) { m_instanceGroupIdHasBeenSet = true; m_instanceGroupId.assign(value); }
116 
117     /**
118      * <p>Specifies the ID of the instance group to which the automatic scaling policy
119      * is applied.</p>
120      */
WithInstanceGroupId(const Aws::String & value)121     inline PutAutoScalingPolicyRequest& WithInstanceGroupId(const Aws::String& value) { SetInstanceGroupId(value); return *this;}
122 
123     /**
124      * <p>Specifies the ID of the instance group to which the automatic scaling policy
125      * is applied.</p>
126      */
WithInstanceGroupId(Aws::String && value)127     inline PutAutoScalingPolicyRequest& WithInstanceGroupId(Aws::String&& value) { SetInstanceGroupId(std::move(value)); return *this;}
128 
129     /**
130      * <p>Specifies the ID of the instance group to which the automatic scaling policy
131      * is applied.</p>
132      */
WithInstanceGroupId(const char * value)133     inline PutAutoScalingPolicyRequest& WithInstanceGroupId(const char* value) { SetInstanceGroupId(value); return *this;}
134 
135 
136     /**
137      * <p>Specifies the definition of the automatic scaling policy.</p>
138      */
GetAutoScalingPolicy()139     inline const AutoScalingPolicy& GetAutoScalingPolicy() const{ return m_autoScalingPolicy; }
140 
141     /**
142      * <p>Specifies the definition of the automatic scaling policy.</p>
143      */
AutoScalingPolicyHasBeenSet()144     inline bool AutoScalingPolicyHasBeenSet() const { return m_autoScalingPolicyHasBeenSet; }
145 
146     /**
147      * <p>Specifies the definition of the automatic scaling policy.</p>
148      */
SetAutoScalingPolicy(const AutoScalingPolicy & value)149     inline void SetAutoScalingPolicy(const AutoScalingPolicy& value) { m_autoScalingPolicyHasBeenSet = true; m_autoScalingPolicy = value; }
150 
151     /**
152      * <p>Specifies the definition of the automatic scaling policy.</p>
153      */
SetAutoScalingPolicy(AutoScalingPolicy && value)154     inline void SetAutoScalingPolicy(AutoScalingPolicy&& value) { m_autoScalingPolicyHasBeenSet = true; m_autoScalingPolicy = std::move(value); }
155 
156     /**
157      * <p>Specifies the definition of the automatic scaling policy.</p>
158      */
WithAutoScalingPolicy(const AutoScalingPolicy & value)159     inline PutAutoScalingPolicyRequest& WithAutoScalingPolicy(const AutoScalingPolicy& value) { SetAutoScalingPolicy(value); return *this;}
160 
161     /**
162      * <p>Specifies the definition of the automatic scaling policy.</p>
163      */
WithAutoScalingPolicy(AutoScalingPolicy && value)164     inline PutAutoScalingPolicyRequest& WithAutoScalingPolicy(AutoScalingPolicy&& value) { SetAutoScalingPolicy(std::move(value)); return *this;}
165 
166   private:
167 
168     Aws::String m_clusterId;
169     bool m_clusterIdHasBeenSet;
170 
171     Aws::String m_instanceGroupId;
172     bool m_instanceGroupIdHasBeenSet;
173 
174     AutoScalingPolicy m_autoScalingPolicy;
175     bool m_autoScalingPolicyHasBeenSet;
176   };
177 
178 } // namespace Model
179 } // namespace EMR
180 } // namespace Aws
181