Integration.fromJson constructor
Integration.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Integration.fromJson(Map<String, dynamic> json) {
return Integration(
cacheKeyParameters: (json['cacheKeyParameters'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
cacheNamespace: json['cacheNamespace'] as String?,
connectionId: json['connectionId'] as String?,
connectionType: (json['connectionType'] as String?)?.toConnectionType(),
contentHandling:
(json['contentHandling'] as String?)?.toContentHandlingStrategy(),
credentials: json['credentials'] as String?,
httpMethod: json['httpMethod'] as String?,
integrationResponses:
(json['integrationResponses'] as Map<String, dynamic>?)?.map((k, e) =>
MapEntry(
k, IntegrationResponse.fromJson(e as Map<String, dynamic>))),
passthroughBehavior: json['passthroughBehavior'] as String?,
requestParameters: (json['requestParameters'] as Map<String, dynamic>?)
?.map((k, e) => MapEntry(k, e as String)),
requestTemplates: (json['requestTemplates'] as Map<String, dynamic>?)
?.map((k, e) => MapEntry(k, e as String)),
timeoutInMillis: json['timeoutInMillis'] as int?,
tlsConfig: json['tlsConfig'] != null
? TlsConfig.fromJson(json['tlsConfig'] as Map<String, dynamic>)
: null,
type: (json['type'] as String?)?.toIntegrationType(),
uri: json['uri'] as String?,
);
}