Authorizer.fromJson constructor
Authorizer.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Authorizer.fromJson(Map<String, dynamic> json) {
return Authorizer(
name: json['name'] as String,
authorizerCredentialsArn: json['authorizerCredentialsArn'] as String?,
authorizerId: json['authorizerId'] as String?,
authorizerPayloadFormatVersion:
json['authorizerPayloadFormatVersion'] as String?,
authorizerResultTtlInSeconds:
json['authorizerResultTtlInSeconds'] as int?,
authorizerType: (json['authorizerType'] as String?)?.toAuthorizerType(),
authorizerUri: json['authorizerUri'] as String?,
enableSimpleResponses: json['enableSimpleResponses'] as bool?,
identitySource: (json['identitySource'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
identityValidationExpression:
json['identityValidationExpression'] as String?,
jwtConfiguration: json['jwtConfiguration'] != null
? JWTConfiguration.fromJson(
json['jwtConfiguration'] as Map<String, dynamic>)
: null,
);
}