CreateRouteResult.fromJson constructor

CreateRouteResult.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory CreateRouteResult.fromJson(Map<String, dynamic> json) {
  return CreateRouteResult(
    apiGatewayManaged: json['apiGatewayManaged'] as bool?,
    apiKeyRequired: json['apiKeyRequired'] as bool?,
    authorizationScopes: (json['authorizationScopes'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    authorizationType:
        (json['authorizationType'] as String?)?.toAuthorizationType(),
    authorizerId: json['authorizerId'] as String?,
    modelSelectionExpression: json['modelSelectionExpression'] as String?,
    operationName: json['operationName'] as String?,
    requestModels: (json['requestModels'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k, e as String)),
    requestParameters: (json['requestParameters'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(
            k, ParameterConstraints.fromJson(e as Map<String, dynamic>))),
    routeId: json['routeId'] as String?,
    routeKey: json['routeKey'] as String?,
    routeResponseSelectionExpression:
        json['routeResponseSelectionExpression'] as String?,
    target: json['target'] as String?,
  );
}