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/apigateway/APIGateway_EXPORTS.h>
8 #include <aws/apigateway/APIGatewayRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/apigateway/model/GatewayResponseType.h>
11 #include <aws/core/utils/memory/stl/AWSVector.h>
12 #include <aws/apigateway/model/PatchOperation.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace APIGateway
18 {
19 namespace Model
20 {
21 
22   /**
23    * <p>Updates a <a>GatewayResponse</a> of a specified response type on the given
24    * <a>RestApi</a>.</p><p><h3>See Also:</h3>   <a
25    * href="http://docs.aws.amazon.com/goto/WebAPI/apigateway-2015-07-09/UpdateGatewayResponseRequest">AWS
26    * API Reference</a></p>
27    */
28   class AWS_APIGATEWAY_API UpdateGatewayResponseRequest : public APIGatewayRequest
29   {
30   public:
31     UpdateGatewayResponseRequest();
32 
33     // Service request name is the Operation name which will send this request out,
34     // each operation should has unique request name, so that we can get operation's name from this request.
35     // Note: this is not true for response, multiple operations may have the same response name,
36     // so we can not get operation's name from response.
GetServiceRequestName()37     inline virtual const char* GetServiceRequestName() const override { return "UpdateGatewayResponse"; }
38 
39     Aws::String SerializePayload() const override;
40 
41 
42     /**
43      * <p>[Required] The string identifier of the associated <a>RestApi</a>.</p>
44      */
GetRestApiId()45     inline const Aws::String& GetRestApiId() const{ return m_restApiId; }
46 
47     /**
48      * <p>[Required] The string identifier of the associated <a>RestApi</a>.</p>
49      */
RestApiIdHasBeenSet()50     inline bool RestApiIdHasBeenSet() const { return m_restApiIdHasBeenSet; }
51 
52     /**
53      * <p>[Required] The string identifier of the associated <a>RestApi</a>.</p>
54      */
SetRestApiId(const Aws::String & value)55     inline void SetRestApiId(const Aws::String& value) { m_restApiIdHasBeenSet = true; m_restApiId = value; }
56 
57     /**
58      * <p>[Required] The string identifier of the associated <a>RestApi</a>.</p>
59      */
SetRestApiId(Aws::String && value)60     inline void SetRestApiId(Aws::String&& value) { m_restApiIdHasBeenSet = true; m_restApiId = std::move(value); }
61 
62     /**
63      * <p>[Required] The string identifier of the associated <a>RestApi</a>.</p>
64      */
SetRestApiId(const char * value)65     inline void SetRestApiId(const char* value) { m_restApiIdHasBeenSet = true; m_restApiId.assign(value); }
66 
67     /**
68      * <p>[Required] The string identifier of the associated <a>RestApi</a>.</p>
69      */
WithRestApiId(const Aws::String & value)70     inline UpdateGatewayResponseRequest& WithRestApiId(const Aws::String& value) { SetRestApiId(value); return *this;}
71 
72     /**
73      * <p>[Required] The string identifier of the associated <a>RestApi</a>.</p>
74      */
WithRestApiId(Aws::String && value)75     inline UpdateGatewayResponseRequest& WithRestApiId(Aws::String&& value) { SetRestApiId(std::move(value)); return *this;}
76 
77     /**
78      * <p>[Required] The string identifier of the associated <a>RestApi</a>.</p>
79      */
WithRestApiId(const char * value)80     inline UpdateGatewayResponseRequest& WithRestApiId(const char* value) { SetRestApiId(value); return *this;}
81 
82 
83     /**
84      * <p>[Required] <p>The response type of the associated
85      * <a>GatewayResponse</a>.</p></p>
86      */
GetResponseType()87     inline const GatewayResponseType& GetResponseType() const{ return m_responseType; }
88 
89     /**
90      * <p>[Required] <p>The response type of the associated
91      * <a>GatewayResponse</a>.</p></p>
92      */
ResponseTypeHasBeenSet()93     inline bool ResponseTypeHasBeenSet() const { return m_responseTypeHasBeenSet; }
94 
95     /**
96      * <p>[Required] <p>The response type of the associated
97      * <a>GatewayResponse</a>.</p></p>
98      */
SetResponseType(const GatewayResponseType & value)99     inline void SetResponseType(const GatewayResponseType& value) { m_responseTypeHasBeenSet = true; m_responseType = value; }
100 
101     /**
102      * <p>[Required] <p>The response type of the associated
103      * <a>GatewayResponse</a>.</p></p>
104      */
SetResponseType(GatewayResponseType && value)105     inline void SetResponseType(GatewayResponseType&& value) { m_responseTypeHasBeenSet = true; m_responseType = std::move(value); }
106 
107     /**
108      * <p>[Required] <p>The response type of the associated
109      * <a>GatewayResponse</a>.</p></p>
110      */
WithResponseType(const GatewayResponseType & value)111     inline UpdateGatewayResponseRequest& WithResponseType(const GatewayResponseType& value) { SetResponseType(value); return *this;}
112 
113     /**
114      * <p>[Required] <p>The response type of the associated
115      * <a>GatewayResponse</a>.</p></p>
116      */
WithResponseType(GatewayResponseType && value)117     inline UpdateGatewayResponseRequest& WithResponseType(GatewayResponseType&& value) { SetResponseType(std::move(value)); return *this;}
118 
119 
120     /**
121      * <p>A list of update operations to be applied to the specified resource and in
122      * the order specified in this list.</p>
123      */
GetPatchOperations()124     inline const Aws::Vector<PatchOperation>& GetPatchOperations() const{ return m_patchOperations; }
125 
126     /**
127      * <p>A list of update operations to be applied to the specified resource and in
128      * the order specified in this list.</p>
129      */
PatchOperationsHasBeenSet()130     inline bool PatchOperationsHasBeenSet() const { return m_patchOperationsHasBeenSet; }
131 
132     /**
133      * <p>A list of update operations to be applied to the specified resource and in
134      * the order specified in this list.</p>
135      */
SetPatchOperations(const Aws::Vector<PatchOperation> & value)136     inline void SetPatchOperations(const Aws::Vector<PatchOperation>& value) { m_patchOperationsHasBeenSet = true; m_patchOperations = value; }
137 
138     /**
139      * <p>A list of update operations to be applied to the specified resource and in
140      * the order specified in this list.</p>
141      */
SetPatchOperations(Aws::Vector<PatchOperation> && value)142     inline void SetPatchOperations(Aws::Vector<PatchOperation>&& value) { m_patchOperationsHasBeenSet = true; m_patchOperations = std::move(value); }
143 
144     /**
145      * <p>A list of update operations to be applied to the specified resource and in
146      * the order specified in this list.</p>
147      */
WithPatchOperations(const Aws::Vector<PatchOperation> & value)148     inline UpdateGatewayResponseRequest& WithPatchOperations(const Aws::Vector<PatchOperation>& value) { SetPatchOperations(value); return *this;}
149 
150     /**
151      * <p>A list of update operations to be applied to the specified resource and in
152      * the order specified in this list.</p>
153      */
WithPatchOperations(Aws::Vector<PatchOperation> && value)154     inline UpdateGatewayResponseRequest& WithPatchOperations(Aws::Vector<PatchOperation>&& value) { SetPatchOperations(std::move(value)); return *this;}
155 
156     /**
157      * <p>A list of update operations to be applied to the specified resource and in
158      * the order specified in this list.</p>
159      */
AddPatchOperations(const PatchOperation & value)160     inline UpdateGatewayResponseRequest& AddPatchOperations(const PatchOperation& value) { m_patchOperationsHasBeenSet = true; m_patchOperations.push_back(value); return *this; }
161 
162     /**
163      * <p>A list of update operations to be applied to the specified resource and in
164      * the order specified in this list.</p>
165      */
AddPatchOperations(PatchOperation && value)166     inline UpdateGatewayResponseRequest& AddPatchOperations(PatchOperation&& value) { m_patchOperationsHasBeenSet = true; m_patchOperations.push_back(std::move(value)); return *this; }
167 
168   private:
169 
170     Aws::String m_restApiId;
171     bool m_restApiIdHasBeenSet;
172 
173     GatewayResponseType m_responseType;
174     bool m_responseTypeHasBeenSet;
175 
176     Aws::Vector<PatchOperation> m_patchOperations;
177     bool m_patchOperationsHasBeenSet;
178   };
179 
180 } // namespace Model
181 } // namespace APIGateway
182 } // namespace Aws
183