@@ -5,7 +5,7 @@ use std::collections::HashMap;
5
5
use crate :: custom_serde:: deserialize_lambda_map;
6
6
7
7
/// Deprecated: `AppSyncResolverTemplate` does not represent resolver events sent by AppSync. Instead directly model your input schema, or use `map[string]string`, `json.RawMessage`,` interface{}`, etc..
8
- #[ derive( Debug , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
8
+ #[ derive( Debug , Default , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
9
9
#[ serde( rename_all = "camelCase" ) ]
10
10
pub struct AppSyncResolverTemplate < T1 = Value >
11
11
where
27
27
}
28
28
29
29
/// `AppSyncIamIdentity` contains information about the caller authed via IAM.
30
- #[ derive( Debug , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
30
+ #[ derive( Debug , Default , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
31
31
#[ serde( rename_all = "camelCase" ) ]
32
32
pub struct AppSyncIamIdentity {
33
33
#[ serde( default ) ]
@@ -55,7 +55,7 @@ pub struct AppSyncIamIdentity {
55
55
}
56
56
57
57
/// `AppSyncCognitoIdentity` contains information about the caller authed via Cognito.
58
- #[ derive( Debug , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
58
+ #[ derive( Debug , Default , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
59
59
#[ serde( rename_all = "camelCase" ) ]
60
60
pub struct AppSyncCognitoIdentity < T1 = Value >
61
61
where
87
87
pub type AppSyncOperation = String ;
88
88
89
89
/// `AppSyncLambdaAuthorizerRequest` contains an authorization request from AppSync.
90
- #[ derive( Debug , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
90
+ #[ derive( Debug , Default , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
91
91
#[ serde( rename_all = "camelCase" ) ]
92
92
pub struct AppSyncLambdaAuthorizerRequest {
93
93
#[ serde( default ) ]
@@ -104,7 +104,7 @@ pub struct AppSyncLambdaAuthorizerRequest {
104
104
105
105
/// `AppSyncLambdaAuthorizerRequestContext` contains the parameters of the AppSync invocation which triggered
106
106
/// this authorization request.
107
- #[ derive( Debug , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
107
+ #[ derive( Debug , Default , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
108
108
#[ serde( rename_all = "camelCase" ) ]
109
109
pub struct AppSyncLambdaAuthorizerRequestContext < T1 = Value >
110
110
where
@@ -136,7 +136,7 @@ where
136
136
}
137
137
138
138
/// `AppSyncLambdaAuthorizerResponse` represents the expected format of an authorization response to AppSync.
139
- #[ derive( Debug , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
139
+ #[ derive( Debug , Default , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
140
140
#[ serde( rename_all = "camelCase" ) ]
141
141
pub struct AppSyncLambdaAuthorizerResponse < T1 = Value >
142
142
where
@@ -171,7 +171,7 @@ where
171
171
///
172
172
/// See also:
173
173
/// - [AppSync resolver mapping template context reference](https://docs.aws.amazon.com/appsync/latest/devguide/resolver-context-reference.html)
174
- #[ derive( Debug , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
174
+ #[ derive( Debug , Default , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
175
175
pub struct AppSyncDirectResolverEvent < TArguments = Value , TSource = Value , TStash = Value >
176
176
where
177
177
TArguments : Serialize + DeserializeOwned ,
@@ -200,7 +200,7 @@ where
200
200
201
201
/// `AppSyncRequest` contains request-related metadata for a resolver invocation,
202
202
/// including client-sent headers and optional custom domain name.
203
- #[ derive( Debug , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
203
+ #[ derive( Debug , Default , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
204
204
#[ serde( rename_all = "camelCase" ) ]
205
205
pub struct AppSyncRequest {
206
206
#[ serde( deserialize_with = "deserialize_lambda_map" ) ]
@@ -219,7 +219,7 @@ pub struct AppSyncRequest {
219
219
}
220
220
221
221
/// `AppSyncInfo` contains metadata about the current GraphQL field being resolved.
222
- #[ derive( Debug , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
222
+ #[ derive( Debug , Default , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
223
223
#[ serde( rename_all = "camelCase" ) ]
224
224
pub struct AppSyncInfo < T = Value >
225
225
where
@@ -243,7 +243,7 @@ where
243
243
}
244
244
245
245
/// `AppSyncPrevResult` contains the result of the previous step in a pipeline resolver.
246
- #[ derive( Debug , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
246
+ #[ derive( Debug , Default , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
247
247
pub struct AppSyncPrevResult < T = Value >
248
248
where
249
249
T : Serialize + DeserializeOwned ,
@@ -270,8 +270,14 @@ pub enum AppSyncIdentity {
270
270
Lambda ( AppSyncIdentityLambda ) ,
271
271
}
272
272
273
+ impl Default for AppSyncIdentity {
274
+ fn default ( ) -> Self {
275
+ AppSyncIdentity :: IAM ( AppSyncIamIdentity :: default ( ) )
276
+ }
277
+ }
278
+
273
279
/// `AppSyncIdentityOIDC` represents identity information when using OIDC-based authorization.
274
- #[ derive( Debug , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
280
+ #[ derive( Debug , Default , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
275
281
pub struct AppSyncIdentityOIDC < T = Value >
276
282
where
277
283
T : Serialize + DeserializeOwned ,
@@ -290,7 +296,7 @@ where
290
296
}
291
297
292
298
/// `AppSyncIdentityLambda` represents identity information when using AWS Lambda
293
- #[ derive( Debug , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
299
+ #[ derive( Debug , Default , Clone , Eq , PartialEq , Deserialize , Serialize ) ]
294
300
#[ serde( rename_all = "camelCase" ) ]
295
301
pub struct AppSyncIdentityLambda < T = Value >
296
302
where
0 commit comments