Stage.fromJson constructor

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

Implementation

factory Stage.fromJson(Map<String, dynamic> json) {
  return Stage(
    accessLogSettings: json['accessLogSettings'] != null
        ? AccessLogSettings.fromJson(
            json['accessLogSettings'] as Map<String, dynamic>)
        : null,
    cacheClusterEnabled: json['cacheClusterEnabled'] as bool?,
    cacheClusterSize:
        (json['cacheClusterSize'] as String?)?.toCacheClusterSize(),
    cacheClusterStatus:
        (json['cacheClusterStatus'] as String?)?.toCacheClusterStatus(),
    canarySettings: json['canarySettings'] != null
        ? CanarySettings.fromJson(
            json['canarySettings'] as Map<String, dynamic>)
        : null,
    clientCertificateId: json['clientCertificateId'] as String?,
    createdDate: timeStampFromJson(json['createdDate']),
    deploymentId: json['deploymentId'] as String?,
    description: json['description'] as String?,
    documentationVersion: json['documentationVersion'] as String?,
    lastUpdatedDate: timeStampFromJson(json['lastUpdatedDate']),
    methodSettings: (json['methodSettings'] as Map<String, dynamic>?)?.map(
        (k, e) =>
            MapEntry(k, MethodSetting.fromJson(e as Map<String, dynamic>))),
    stageName: json['stageName'] as String?,
    tags: (json['tags'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k, e as String)),
    tracingEnabled: json['tracingEnabled'] as bool?,
    variables: (json['variables'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k, e as String)),
    webAclArn: json['webAclArn'] as String?,
  );
}