Method.fromJson constructor
Implementation
factory Method.fromJson(Map<String, dynamic> json) {
return Method(
apiKeyRequired: json['apiKeyRequired'] as bool?,
authorizationScopes: (json['authorizationScopes'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
authorizationType: json['authorizationType'] as String?,
authorizerId: json['authorizerId'] as String?,
httpMethod: json['httpMethod'] as String?,
methodIntegration: json['methodIntegration'] != null
? Integration.fromJson(
json['methodIntegration'] as Map<String, dynamic>)
: null,
methodResponses: (json['methodResponses'] as Map<String, dynamic>?)?.map(
(k, e) =>
MapEntry(k, MethodResponse.fromJson(e as Map<String, dynamic>))),
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, e as bool)),
requestValidatorId: json['requestValidatorId'] as String?,
);
}