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/elasticloadbalancing/ElasticLoadBalancing_EXPORTS.h>
8 #include <aws/elasticloadbalancing/ElasticLoadBalancingRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace ElasticLoadBalancing
15 {
16 namespace Model
17 {
18 
19   /**
20    * <p>Contains the parameters for CreateLBCookieStickinessPolicy.</p><p><h3>See
21    * Also:</h3>   <a
22    * href="http://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLBCookieStickinessPolicyInput">AWS
23    * API Reference</a></p>
24    */
25   class AWS_ELASTICLOADBALANCING_API CreateLBCookieStickinessPolicyRequest : public ElasticLoadBalancingRequest
26   {
27   public:
28     CreateLBCookieStickinessPolicyRequest();
29 
30     // Service request name is the Operation name which will send this request out,
31     // each operation should has unique request name, so that we can get operation's name from this request.
32     // Note: this is not true for response, multiple operations may have the same response name,
33     // so we can not get operation's name from response.
GetServiceRequestName()34     inline virtual const char* GetServiceRequestName() const override { return "CreateLBCookieStickinessPolicy"; }
35 
36     Aws::String SerializePayload() const override;
37 
38   protected:
39     void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
40 
41   public:
42 
43     /**
44      * <p>The name of the load balancer.</p>
45      */
GetLoadBalancerName()46     inline const Aws::String& GetLoadBalancerName() const{ return m_loadBalancerName; }
47 
48     /**
49      * <p>The name of the load balancer.</p>
50      */
LoadBalancerNameHasBeenSet()51     inline bool LoadBalancerNameHasBeenSet() const { return m_loadBalancerNameHasBeenSet; }
52 
53     /**
54      * <p>The name of the load balancer.</p>
55      */
SetLoadBalancerName(const Aws::String & value)56     inline void SetLoadBalancerName(const Aws::String& value) { m_loadBalancerNameHasBeenSet = true; m_loadBalancerName = value; }
57 
58     /**
59      * <p>The name of the load balancer.</p>
60      */
SetLoadBalancerName(Aws::String && value)61     inline void SetLoadBalancerName(Aws::String&& value) { m_loadBalancerNameHasBeenSet = true; m_loadBalancerName = std::move(value); }
62 
63     /**
64      * <p>The name of the load balancer.</p>
65      */
SetLoadBalancerName(const char * value)66     inline void SetLoadBalancerName(const char* value) { m_loadBalancerNameHasBeenSet = true; m_loadBalancerName.assign(value); }
67 
68     /**
69      * <p>The name of the load balancer.</p>
70      */
WithLoadBalancerName(const Aws::String & value)71     inline CreateLBCookieStickinessPolicyRequest& WithLoadBalancerName(const Aws::String& value) { SetLoadBalancerName(value); return *this;}
72 
73     /**
74      * <p>The name of the load balancer.</p>
75      */
WithLoadBalancerName(Aws::String && value)76     inline CreateLBCookieStickinessPolicyRequest& WithLoadBalancerName(Aws::String&& value) { SetLoadBalancerName(std::move(value)); return *this;}
77 
78     /**
79      * <p>The name of the load balancer.</p>
80      */
WithLoadBalancerName(const char * value)81     inline CreateLBCookieStickinessPolicyRequest& WithLoadBalancerName(const char* value) { SetLoadBalancerName(value); return *this;}
82 
83 
84     /**
85      * <p>The name of the policy being created. Policy names must consist of
86      * alphanumeric characters and dashes (-). This name must be unique within the set
87      * of policies for this load balancer.</p>
88      */
GetPolicyName()89     inline const Aws::String& GetPolicyName() const{ return m_policyName; }
90 
91     /**
92      * <p>The name of the policy being created. Policy names must consist of
93      * alphanumeric characters and dashes (-). This name must be unique within the set
94      * of policies for this load balancer.</p>
95      */
PolicyNameHasBeenSet()96     inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
97 
98     /**
99      * <p>The name of the policy being created. Policy names must consist of
100      * alphanumeric characters and dashes (-). This name must be unique within the set
101      * of policies for this load balancer.</p>
102      */
SetPolicyName(const Aws::String & value)103     inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; }
104 
105     /**
106      * <p>The name of the policy being created. Policy names must consist of
107      * alphanumeric characters and dashes (-). This name must be unique within the set
108      * of policies for this load balancer.</p>
109      */
SetPolicyName(Aws::String && value)110     inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); }
111 
112     /**
113      * <p>The name of the policy being created. Policy names must consist of
114      * alphanumeric characters and dashes (-). This name must be unique within the set
115      * of policies for this load balancer.</p>
116      */
SetPolicyName(const char * value)117     inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); }
118 
119     /**
120      * <p>The name of the policy being created. Policy names must consist of
121      * alphanumeric characters and dashes (-). This name must be unique within the set
122      * of policies for this load balancer.</p>
123      */
WithPolicyName(const Aws::String & value)124     inline CreateLBCookieStickinessPolicyRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;}
125 
126     /**
127      * <p>The name of the policy being created. Policy names must consist of
128      * alphanumeric characters and dashes (-). This name must be unique within the set
129      * of policies for this load balancer.</p>
130      */
WithPolicyName(Aws::String && value)131     inline CreateLBCookieStickinessPolicyRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;}
132 
133     /**
134      * <p>The name of the policy being created. Policy names must consist of
135      * alphanumeric characters and dashes (-). This name must be unique within the set
136      * of policies for this load balancer.</p>
137      */
WithPolicyName(const char * value)138     inline CreateLBCookieStickinessPolicyRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;}
139 
140 
141     /**
142      * <p>The time period, in seconds, after which the cookie should be considered
143      * stale. If you do not specify this parameter, the default value is 0, which
144      * indicates that the sticky session should last for the duration of the browser
145      * session.</p>
146      */
GetCookieExpirationPeriod()147     inline long long GetCookieExpirationPeriod() const{ return m_cookieExpirationPeriod; }
148 
149     /**
150      * <p>The time period, in seconds, after which the cookie should be considered
151      * stale. If you do not specify this parameter, the default value is 0, which
152      * indicates that the sticky session should last for the duration of the browser
153      * session.</p>
154      */
CookieExpirationPeriodHasBeenSet()155     inline bool CookieExpirationPeriodHasBeenSet() const { return m_cookieExpirationPeriodHasBeenSet; }
156 
157     /**
158      * <p>The time period, in seconds, after which the cookie should be considered
159      * stale. If you do not specify this parameter, the default value is 0, which
160      * indicates that the sticky session should last for the duration of the browser
161      * session.</p>
162      */
SetCookieExpirationPeriod(long long value)163     inline void SetCookieExpirationPeriod(long long value) { m_cookieExpirationPeriodHasBeenSet = true; m_cookieExpirationPeriod = value; }
164 
165     /**
166      * <p>The time period, in seconds, after which the cookie should be considered
167      * stale. If you do not specify this parameter, the default value is 0, which
168      * indicates that the sticky session should last for the duration of the browser
169      * session.</p>
170      */
WithCookieExpirationPeriod(long long value)171     inline CreateLBCookieStickinessPolicyRequest& WithCookieExpirationPeriod(long long value) { SetCookieExpirationPeriod(value); return *this;}
172 
173   private:
174 
175     Aws::String m_loadBalancerName;
176     bool m_loadBalancerNameHasBeenSet;
177 
178     Aws::String m_policyName;
179     bool m_policyNameHasBeenSet;
180 
181     long long m_cookieExpirationPeriod;
182     bool m_cookieExpirationPeriodHasBeenSet;
183   };
184 
185 } // namespace Model
186 } // namespace ElasticLoadBalancing
187 } // namespace Aws
188