Skip to content

Commit d48e71b

Browse files
Added overrides for TestInvokeAuthorizerRequest on API Gateway.
1 parent 480f9c7 commit d48e71b

File tree

4 files changed

+88
-75
lines changed

4 files changed

+88
-75
lines changed

aws-cpp-sdk-apigateway/include/aws/apigateway/model/TestInvokeAuthorizerRequest.h

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -77,170 +77,170 @@ namespace Model
7777
inline TestInvokeAuthorizerRequest& WithAuthorizerId(const char* value) { SetAuthorizerId(value); return *this;}
7878

7979

80-
inline const Aws::Map<Aws::String, Aws::String>& GetHeaders() const{ return m_headers; }
80+
inline const Aws::String& GetPathWithQueryString() const{ return m_pathWithQueryString; }
8181

8282

83-
inline void SetHeaders(const Aws::Map<Aws::String, Aws::String>& value) { m_headersHasBeenSet = true; m_headers = value; }
83+
inline void SetPathWithQueryString(const Aws::String& value) { m_pathWithQueryStringHasBeenSet = true; m_pathWithQueryString = value; }
8484

8585

86-
inline void SetHeaders(Aws::Map<Aws::String, Aws::String>&& value) { m_headersHasBeenSet = true; m_headers = value; }
86+
inline void SetPathWithQueryString(Aws::String&& value) { m_pathWithQueryStringHasBeenSet = true; m_pathWithQueryString = value; }
8787

8888

89-
inline TestInvokeAuthorizerRequest& WithHeaders(const Aws::Map<Aws::String, Aws::String>& value) { SetHeaders(value); return *this;}
89+
inline void SetPathWithQueryString(const char* value) { m_pathWithQueryStringHasBeenSet = true; m_pathWithQueryString.assign(value); }
9090

9191

92-
inline TestInvokeAuthorizerRequest& WithHeaders(Aws::Map<Aws::String, Aws::String>&& value) { SetHeaders(value); return *this;}
92+
inline TestInvokeAuthorizerRequest& WithPathWithQueryString(const Aws::String& value) { SetPathWithQueryString(value); return *this;}
9393

9494

95-
inline TestInvokeAuthorizerRequest& AddHeaders(const Aws::String& key, const Aws::String& value) { m_headersHasBeenSet = true; m_headers[key] = value; return *this; }
95+
inline TestInvokeAuthorizerRequest& WithPathWithQueryString(Aws::String&& value) { SetPathWithQueryString(value); return *this;}
9696

9797

98-
inline TestInvokeAuthorizerRequest& AddHeaders(Aws::String&& key, const Aws::String& value) { m_headersHasBeenSet = true; m_headers[key] = value; return *this; }
98+
inline TestInvokeAuthorizerRequest& WithPathWithQueryString(const char* value) { SetPathWithQueryString(value); return *this;}
9999

100100

101-
inline TestInvokeAuthorizerRequest& AddHeaders(const Aws::String& key, Aws::String&& value) { m_headersHasBeenSet = true; m_headers[key] = value; return *this; }
101+
inline const Aws::Map<Aws::String, Aws::String>& GetStageVariables() const{ return m_stageVariables; }
102102

103103

104-
inline TestInvokeAuthorizerRequest& AddHeaders(Aws::String&& key, Aws::String&& value) { m_headersHasBeenSet = true; m_headers[key] = value; return *this; }
104+
inline void SetStageVariables(const Aws::Map<Aws::String, Aws::String>& value) { m_stageVariablesHasBeenSet = true; m_stageVariables = value; }
105105

106106

107-
inline TestInvokeAuthorizerRequest& AddHeaders(const char* key, Aws::String&& value) { m_headersHasBeenSet = true; m_headers[key] = value; return *this; }
107+
inline void SetStageVariables(Aws::Map<Aws::String, Aws::String>&& value) { m_stageVariablesHasBeenSet = true; m_stageVariables = value; }
108108

109109

110-
inline TestInvokeAuthorizerRequest& AddHeaders(Aws::String&& key, const char* value) { m_headersHasBeenSet = true; m_headers[key] = value; return *this; }
110+
inline TestInvokeAuthorizerRequest& WithStageVariables(const Aws::Map<Aws::String, Aws::String>& value) { SetStageVariables(value); return *this;}
111111

112112

113-
inline TestInvokeAuthorizerRequest& AddHeaders(const char* key, const char* value) { m_headersHasBeenSet = true; m_headers[key] = value; return *this; }
113+
inline TestInvokeAuthorizerRequest& WithStageVariables(Aws::Map<Aws::String, Aws::String>&& value) { SetStageVariables(value); return *this;}
114114

115115

116-
inline const Aws::String& GetPathWithQueryString() const{ return m_pathWithQueryString; }
116+
inline TestInvokeAuthorizerRequest& AddStageVariables(const Aws::String& key, const Aws::String& value) { m_stageVariablesHasBeenSet = true; m_stageVariables[key] = value; return *this; }
117117

118118

119-
inline void SetPathWithQueryString(const Aws::String& value) { m_pathWithQueryStringHasBeenSet = true; m_pathWithQueryString = value; }
119+
inline TestInvokeAuthorizerRequest& AddStageVariables(Aws::String&& key, const Aws::String& value) { m_stageVariablesHasBeenSet = true; m_stageVariables[key] = value; return *this; }
120120

121121

122-
inline void SetPathWithQueryString(Aws::String&& value) { m_pathWithQueryStringHasBeenSet = true; m_pathWithQueryString = value; }
122+
inline TestInvokeAuthorizerRequest& AddStageVariables(const Aws::String& key, Aws::String&& value) { m_stageVariablesHasBeenSet = true; m_stageVariables[key] = value; return *this; }
123123

124124

125-
inline void SetPathWithQueryString(const char* value) { m_pathWithQueryStringHasBeenSet = true; m_pathWithQueryString.assign(value); }
125+
inline TestInvokeAuthorizerRequest& AddStageVariables(Aws::String&& key, Aws::String&& value) { m_stageVariablesHasBeenSet = true; m_stageVariables[key] = value; return *this; }
126126

127127

128-
inline TestInvokeAuthorizerRequest& WithPathWithQueryString(const Aws::String& value) { SetPathWithQueryString(value); return *this;}
128+
inline TestInvokeAuthorizerRequest& AddStageVariables(const char* key, Aws::String&& value) { m_stageVariablesHasBeenSet = true; m_stageVariables[key] = value; return *this; }
129129

130130

131-
inline TestInvokeAuthorizerRequest& WithPathWithQueryString(Aws::String&& value) { SetPathWithQueryString(value); return *this;}
131+
inline TestInvokeAuthorizerRequest& AddStageVariables(Aws::String&& key, const char* value) { m_stageVariablesHasBeenSet = true; m_stageVariables[key] = value; return *this; }
132132

133133

134-
inline TestInvokeAuthorizerRequest& WithPathWithQueryString(const char* value) { SetPathWithQueryString(value); return *this;}
134+
inline TestInvokeAuthorizerRequest& AddStageVariables(const char* key, const char* value) { m_stageVariablesHasBeenSet = true; m_stageVariables[key] = value; return *this; }
135135

136136

137-
inline const Aws::String& GetBody() const{ return m_body; }
137+
inline const Aws::Map<Aws::String, Aws::String>& GetAdditionalContext() const{ return m_additionalContext; }
138138

139139

140-
inline void SetBody(const Aws::String& value) { m_bodyHasBeenSet = true; m_body = value; }
140+
inline void SetAdditionalContext(const Aws::Map<Aws::String, Aws::String>& value) { m_additionalContextHasBeenSet = true; m_additionalContext = value; }
141141

142142

143-
inline void SetBody(Aws::String&& value) { m_bodyHasBeenSet = true; m_body = value; }
143+
inline void SetAdditionalContext(Aws::Map<Aws::String, Aws::String>&& value) { m_additionalContextHasBeenSet = true; m_additionalContext = value; }
144144

145145

146-
inline void SetBody(const char* value) { m_bodyHasBeenSet = true; m_body.assign(value); }
146+
inline TestInvokeAuthorizerRequest& WithAdditionalContext(const Aws::Map<Aws::String, Aws::String>& value) { SetAdditionalContext(value); return *this;}
147147

148148

149-
inline TestInvokeAuthorizerRequest& WithBody(const Aws::String& value) { SetBody(value); return *this;}
149+
inline TestInvokeAuthorizerRequest& WithAdditionalContext(Aws::Map<Aws::String, Aws::String>&& value) { SetAdditionalContext(value); return *this;}
150150

151151

152-
inline TestInvokeAuthorizerRequest& WithBody(Aws::String&& value) { SetBody(value); return *this;}
152+
inline TestInvokeAuthorizerRequest& AddAdditionalContext(const Aws::String& key, const Aws::String& value) { m_additionalContextHasBeenSet = true; m_additionalContext[key] = value; return *this; }
153153

154154

155-
inline TestInvokeAuthorizerRequest& WithBody(const char* value) { SetBody(value); return *this;}
155+
inline TestInvokeAuthorizerRequest& AddAdditionalContext(Aws::String&& key, const Aws::String& value) { m_additionalContextHasBeenSet = true; m_additionalContext[key] = value; return *this; }
156156

157157

158-
inline const Aws::Map<Aws::String, Aws::String>& GetStageVariables() const{ return m_stageVariables; }
158+
inline TestInvokeAuthorizerRequest& AddAdditionalContext(const Aws::String& key, Aws::String&& value) { m_additionalContextHasBeenSet = true; m_additionalContext[key] = value; return *this; }
159159

160160

161-
inline void SetStageVariables(const Aws::Map<Aws::String, Aws::String>& value) { m_stageVariablesHasBeenSet = true; m_stageVariables = value; }
161+
inline TestInvokeAuthorizerRequest& AddAdditionalContext(Aws::String&& key, Aws::String&& value) { m_additionalContextHasBeenSet = true; m_additionalContext[key] = value; return *this; }
162162

163163

164-
inline void SetStageVariables(Aws::Map<Aws::String, Aws::String>&& value) { m_stageVariablesHasBeenSet = true; m_stageVariables = value; }
164+
inline TestInvokeAuthorizerRequest& AddAdditionalContext(const char* key, Aws::String&& value) { m_additionalContextHasBeenSet = true; m_additionalContext[key] = value; return *this; }
165165

166166

167-
inline TestInvokeAuthorizerRequest& WithStageVariables(const Aws::Map<Aws::String, Aws::String>& value) { SetStageVariables(value); return *this;}
167+
inline TestInvokeAuthorizerRequest& AddAdditionalContext(Aws::String&& key, const char* value) { m_additionalContextHasBeenSet = true; m_additionalContext[key] = value; return *this; }
168168

169169

170-
inline TestInvokeAuthorizerRequest& WithStageVariables(Aws::Map<Aws::String, Aws::String>&& value) { SetStageVariables(value); return *this;}
170+
inline TestInvokeAuthorizerRequest& AddAdditionalContext(const char* key, const char* value) { m_additionalContextHasBeenSet = true; m_additionalContext[key] = value; return *this; }
171171

172172

173-
inline TestInvokeAuthorizerRequest& AddStageVariables(const Aws::String& key, const Aws::String& value) { m_stageVariablesHasBeenSet = true; m_stageVariables[key] = value; return *this; }
173+
inline const Aws::String& GetRequestBody() const{ return m_requestBody; }
174174

175175

176-
inline TestInvokeAuthorizerRequest& AddStageVariables(Aws::String&& key, const Aws::String& value) { m_stageVariablesHasBeenSet = true; m_stageVariables[key] = value; return *this; }
176+
inline void SetRequestBody(const Aws::String& value) { m_requestBodyHasBeenSet = true; m_requestBody = value; }
177177

178178

179-
inline TestInvokeAuthorizerRequest& AddStageVariables(const Aws::String& key, Aws::String&& value) { m_stageVariablesHasBeenSet = true; m_stageVariables[key] = value; return *this; }
179+
inline void SetRequestBody(Aws::String&& value) { m_requestBodyHasBeenSet = true; m_requestBody = value; }
180180

181181

182-
inline TestInvokeAuthorizerRequest& AddStageVariables(Aws::String&& key, Aws::String&& value) { m_stageVariablesHasBeenSet = true; m_stageVariables[key] = value; return *this; }
182+
inline void SetRequestBody(const char* value) { m_requestBodyHasBeenSet = true; m_requestBody.assign(value); }
183183

184184

185-
inline TestInvokeAuthorizerRequest& AddStageVariables(const char* key, Aws::String&& value) { m_stageVariablesHasBeenSet = true; m_stageVariables[key] = value; return *this; }
185+
inline TestInvokeAuthorizerRequest& WithRequestBody(const Aws::String& value) { SetRequestBody(value); return *this;}
186186

187187

188-
inline TestInvokeAuthorizerRequest& AddStageVariables(Aws::String&& key, const char* value) { m_stageVariablesHasBeenSet = true; m_stageVariables[key] = value; return *this; }
188+
inline TestInvokeAuthorizerRequest& WithRequestBody(Aws::String&& value) { SetRequestBody(value); return *this;}
189189

190190

191-
inline TestInvokeAuthorizerRequest& AddStageVariables(const char* key, const char* value) { m_stageVariablesHasBeenSet = true; m_stageVariables[key] = value; return *this; }
191+
inline TestInvokeAuthorizerRequest& WithRequestBody(const char* value) { SetRequestBody(value); return *this;}
192192

193193

194-
inline const Aws::Map<Aws::String, Aws::String>& GetAdditionalContext() const{ return m_additionalContext; }
194+
inline const Aws::Map<Aws::String, Aws::String>& GetRequestHeaders() const{ return m_requestHeaders; }
195195

196196

197-
inline void SetAdditionalContext(const Aws::Map<Aws::String, Aws::String>& value) { m_additionalContextHasBeenSet = true; m_additionalContext = value; }
197+
inline void SetRequestHeaders(const Aws::Map<Aws::String, Aws::String>& value) { m_requestHeadersHasBeenSet = true; m_requestHeaders = value; }
198198

199199

200-
inline void SetAdditionalContext(Aws::Map<Aws::String, Aws::String>&& value) { m_additionalContextHasBeenSet = true; m_additionalContext = value; }
200+
inline void SetRequestHeaders(Aws::Map<Aws::String, Aws::String>&& value) { m_requestHeadersHasBeenSet = true; m_requestHeaders = value; }
201201

202202

203-
inline TestInvokeAuthorizerRequest& WithAdditionalContext(const Aws::Map<Aws::String, Aws::String>& value) { SetAdditionalContext(value); return *this;}
203+
inline TestInvokeAuthorizerRequest& WithRequestHeaders(const Aws::Map<Aws::String, Aws::String>& value) { SetRequestHeaders(value); return *this;}
204204

205205

206-
inline TestInvokeAuthorizerRequest& WithAdditionalContext(Aws::Map<Aws::String, Aws::String>&& value) { SetAdditionalContext(value); return *this;}
206+
inline TestInvokeAuthorizerRequest& WithRequestHeaders(Aws::Map<Aws::String, Aws::String>&& value) { SetRequestHeaders(value); return *this;}
207207

208208

209-
inline TestInvokeAuthorizerRequest& AddAdditionalContext(const Aws::String& key, const Aws::String& value) { m_additionalContextHasBeenSet = true; m_additionalContext[key] = value; return *this; }
209+
inline TestInvokeAuthorizerRequest& AddRequestHeaders(const Aws::String& key, const Aws::String& value) { m_requestHeadersHasBeenSet = true; m_requestHeaders[key] = value; return *this; }
210210

211211

212-
inline TestInvokeAuthorizerRequest& AddAdditionalContext(Aws::String&& key, const Aws::String& value) { m_additionalContextHasBeenSet = true; m_additionalContext[key] = value; return *this; }
212+
inline TestInvokeAuthorizerRequest& AddRequestHeaders(Aws::String&& key, const Aws::String& value) { m_requestHeadersHasBeenSet = true; m_requestHeaders[key] = value; return *this; }
213213

214214

215-
inline TestInvokeAuthorizerRequest& AddAdditionalContext(const Aws::String& key, Aws::String&& value) { m_additionalContextHasBeenSet = true; m_additionalContext[key] = value; return *this; }
215+
inline TestInvokeAuthorizerRequest& AddRequestHeaders(const Aws::String& key, Aws::String&& value) { m_requestHeadersHasBeenSet = true; m_requestHeaders[key] = value; return *this; }
216216

217217

218-
inline TestInvokeAuthorizerRequest& AddAdditionalContext(Aws::String&& key, Aws::String&& value) { m_additionalContextHasBeenSet = true; m_additionalContext[key] = value; return *this; }
218+
inline TestInvokeAuthorizerRequest& AddRequestHeaders(Aws::String&& key, Aws::String&& value) { m_requestHeadersHasBeenSet = true; m_requestHeaders[key] = value; return *this; }
219219

220220

221-
inline TestInvokeAuthorizerRequest& AddAdditionalContext(const char* key, Aws::String&& value) { m_additionalContextHasBeenSet = true; m_additionalContext[key] = value; return *this; }
221+
inline TestInvokeAuthorizerRequest& AddRequestHeaders(const char* key, Aws::String&& value) { m_requestHeadersHasBeenSet = true; m_requestHeaders[key] = value; return *this; }
222222

223223

224-
inline TestInvokeAuthorizerRequest& AddAdditionalContext(Aws::String&& key, const char* value) { m_additionalContextHasBeenSet = true; m_additionalContext[key] = value; return *this; }
224+
inline TestInvokeAuthorizerRequest& AddRequestHeaders(Aws::String&& key, const char* value) { m_requestHeadersHasBeenSet = true; m_requestHeaders[key] = value; return *this; }
225225

226226

227-
inline TestInvokeAuthorizerRequest& AddAdditionalContext(const char* key, const char* value) { m_additionalContextHasBeenSet = true; m_additionalContext[key] = value; return *this; }
227+
inline TestInvokeAuthorizerRequest& AddRequestHeaders(const char* key, const char* value) { m_requestHeadersHasBeenSet = true; m_requestHeaders[key] = value; return *this; }
228228

229229
private:
230230
Aws::String m_restApiId;
231231
bool m_restApiIdHasBeenSet;
232232
Aws::String m_authorizerId;
233233
bool m_authorizerIdHasBeenSet;
234-
Aws::Map<Aws::String, Aws::String> m_headers;
235-
bool m_headersHasBeenSet;
236234
Aws::String m_pathWithQueryString;
237235
bool m_pathWithQueryStringHasBeenSet;
238-
Aws::String m_body;
239-
bool m_bodyHasBeenSet;
240236
Aws::Map<Aws::String, Aws::String> m_stageVariables;
241237
bool m_stageVariablesHasBeenSet;
242238
Aws::Map<Aws::String, Aws::String> m_additionalContext;
243239
bool m_additionalContextHasBeenSet;
240+
Aws::String m_requestBody;
241+
bool m_requestBodyHasBeenSet;
242+
Aws::Map<Aws::String, Aws::String> m_requestHeaders;
243+
bool m_requestHeadersHasBeenSet;
244244
};
245245

246246
} // namespace Model

aws-cpp-sdk-apigateway/source/model/TestInvokeAuthorizerRequest.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,41 +24,24 @@ using namespace Aws::Utils;
2424
TestInvokeAuthorizerRequest::TestInvokeAuthorizerRequest() :
2525
m_restApiIdHasBeenSet(false),
2626
m_authorizerIdHasBeenSet(false),
27-
m_headersHasBeenSet(false),
2827
m_pathWithQueryStringHasBeenSet(false),
29-
m_bodyHasBeenSet(false),
3028
m_stageVariablesHasBeenSet(false),
31-
m_additionalContextHasBeenSet(false)
29+
m_additionalContextHasBeenSet(false),
30+
m_requestBodyHasBeenSet(false),
31+
m_requestHeadersHasBeenSet(false)
3232
{
3333
}
3434

3535
Aws::String TestInvokeAuthorizerRequest::SerializePayload() const
3636
{
3737
JsonValue payload;
3838

39-
if(m_headersHasBeenSet)
40-
{
41-
JsonValue headersJsonMap;
42-
for(auto& headersItem : m_headers)
43-
{
44-
headersJsonMap.WithString(headersItem.first, headersItem.second);
45-
}
46-
payload.WithObject("headers", std::move(headersJsonMap));
47-
48-
}
49-
5039
if(m_pathWithQueryStringHasBeenSet)
5140
{
5241
payload.WithString("pathWithQueryString", m_pathWithQueryString);
5342

5443
}
5544

56-
if(m_bodyHasBeenSet)
57-
{
58-
payload.WithString("body", m_body);
59-
60-
}
61-
6245
if(m_stageVariablesHasBeenSet)
6346
{
6447
JsonValue stageVariablesJsonMap;
@@ -81,6 +64,23 @@ Aws::String TestInvokeAuthorizerRequest::SerializePayload() const
8164

8265
}
8366

67+
if(m_requestBodyHasBeenSet)
68+
{
69+
payload.WithString("requestBody", m_requestBody);
70+
71+
}
72+
73+
if(m_requestHeadersHasBeenSet)
74+
{
75+
JsonValue requestHeadersJsonMap;
76+
for(auto& requestHeadersItem : m_requestHeaders)
77+
{
78+
requestHeadersJsonMap.WithString(requestHeadersItem.first, requestHeadersItem.second);
79+
}
80+
payload.WithObject("requestHeaders", std::move(requestHeadersJsonMap));
81+
82+
}
83+
8484
return payload.WriteReadable();
8585
}
8686

aws-cpp-sdk-core/include/aws/core/VersionConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
* permissions and limitations under the License.
1414
*/
1515

16-
#define AWS_SDK_VERSION_STRING "0.9.6-59-gc476146"
16+
#define AWS_SDK_VERSION_STRING "0.9.6-60-g480f9c7"

code-generation/generator/src/main/java/com/amazonaws/util/awsclientgenerator/generators/cpp/apigateway/APIGatewayRestJsonCppClientGenerator.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,19 @@ public SdkFileEntry[] generateSourceFiles(ServiceModel serviceModel) throws Exce
4646
members.put("requestHeaders", headersMember);
4747
members.remove("headers");
4848

49+
Shape authorizerRequest = serviceModel.getShapes().get("TestInvokeAuthorizerRequest");
50+
members = authorizerRequest.getMembers();
51+
52+
//rename body
53+
bodyMember = members.get("body");
54+
members.put("requestBody", bodyMember);
55+
members.remove("body");
56+
57+
//rename headers
58+
headersMember = members.get("headers");
59+
members.put("requestHeaders", headersMember);
60+
members.remove("headers");
61+
4962
return super.generateSourceFiles(serviceModel);
5063
}
5164
}

0 commit comments

Comments
 (0)