AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
SetInstanceProtectionRequest.h
1
6#pragma once
7#include <aws/autoscaling/AutoScaling_EXPORTS.h>
8#include <aws/autoscaling/AutoScalingRequest.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <utility>
12
13namespace Aws
14{
15namespace AutoScaling
16{
17namespace Model
18{
19
23 {
24 public:
25 AWS_AUTOSCALING_API SetInstanceProtectionRequest() = default;
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.
31 inline virtual const char* GetServiceRequestName() const override { return "SetInstanceProtection"; }
32
33 AWS_AUTOSCALING_API Aws::String SerializePayload() const override;
34
35 protected:
36 AWS_AUTOSCALING_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
37
38 public:
39
41
44 inline const Aws::Vector<Aws::String>& GetInstanceIds() const { return m_instanceIds; }
45 inline bool InstanceIdsHasBeenSet() const { return m_instanceIdsHasBeenSet; }
46 template<typename InstanceIdsT = Aws::Vector<Aws::String>>
47 void SetInstanceIds(InstanceIdsT&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds = std::forward<InstanceIdsT>(value); }
48 template<typename InstanceIdsT = Aws::Vector<Aws::String>>
49 SetInstanceProtectionRequest& WithInstanceIds(InstanceIdsT&& value) { SetInstanceIds(std::forward<InstanceIdsT>(value)); return *this;}
50 template<typename InstanceIdsT = Aws::String>
51 SetInstanceProtectionRequest& AddInstanceIds(InstanceIdsT&& value) { m_instanceIdsHasBeenSet = true; m_instanceIds.emplace_back(std::forward<InstanceIdsT>(value)); return *this; }
53
55
58 inline const Aws::String& GetAutoScalingGroupName() const { return m_autoScalingGroupName; }
59 inline bool AutoScalingGroupNameHasBeenSet() const { return m_autoScalingGroupNameHasBeenSet; }
60 template<typename AutoScalingGroupNameT = Aws::String>
61 void SetAutoScalingGroupName(AutoScalingGroupNameT&& value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName = std::forward<AutoScalingGroupNameT>(value); }
62 template<typename AutoScalingGroupNameT = Aws::String>
63 SetInstanceProtectionRequest& WithAutoScalingGroupName(AutoScalingGroupNameT&& value) { SetAutoScalingGroupName(std::forward<AutoScalingGroupNameT>(value)); return *this;}
65
67
71 inline bool GetProtectedFromScaleIn() const { return m_protectedFromScaleIn; }
72 inline bool ProtectedFromScaleInHasBeenSet() const { return m_protectedFromScaleInHasBeenSet; }
73 inline void SetProtectedFromScaleIn(bool value) { m_protectedFromScaleInHasBeenSet = true; m_protectedFromScaleIn = value; }
76 private:
77
78 Aws::Vector<Aws::String> m_instanceIds;
79 bool m_instanceIdsHasBeenSet = false;
80
81 Aws::String m_autoScalingGroupName;
82 bool m_autoScalingGroupNameHasBeenSet = false;
83
84 bool m_protectedFromScaleIn{false};
85 bool m_protectedFromScaleInHasBeenSet = false;
86 };
87
88} // namespace Model
89} // namespace AutoScaling
90} // namespace Aws
AWS_AUTOSCALING_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
SetInstanceProtectionRequest & AddInstanceIds(InstanceIdsT &&value)
SetInstanceProtectionRequest & WithAutoScalingGroupName(AutoScalingGroupNameT &&value)
AWS_AUTOSCALING_API Aws::String SerializePayload() const override
SetInstanceProtectionRequest & WithInstanceIds(InstanceIdsT &&value)
const Aws::Vector< Aws::String > & GetInstanceIds() const
SetInstanceProtectionRequest & WithProtectedFromScaleIn(bool value)
AWS_AUTOSCALING_API SetInstanceProtectionRequest()=default
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector