App.fromJson constructor
Implementation
factory App.fromJson(Map<String, dynamic> json) {
return App(
appArn: json['appArn'] as String,
appId: json['appId'] as String,
createTime: nonNullableTimeStampFromJson(json['createTime'] as Object),
defaultDomain: json['defaultDomain'] as String,
description: json['description'] as String,
enableBasicAuth: json['enableBasicAuth'] as bool,
enableBranchAutoBuild: json['enableBranchAutoBuild'] as bool,
environmentVariables:
(json['environmentVariables'] as Map<String, dynamic>)
.map((k, e) => MapEntry(k, e as String)),
name: json['name'] as String,
platform: (json['platform'] as String).toPlatform(),
repository: json['repository'] as String,
updateTime: nonNullableTimeStampFromJson(json['updateTime'] as Object),
autoBranchCreationConfig: json['autoBranchCreationConfig'] != null
? AutoBranchCreationConfig.fromJson(
json['autoBranchCreationConfig'] as Map<String, dynamic>)
: null,
autoBranchCreationPatterns: (json['autoBranchCreationPatterns'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
basicAuthCredentials: json['basicAuthCredentials'] as String?,
buildSpec: json['buildSpec'] as String?,
customHeaders: json['customHeaders'] as String?,
customRules: (json['customRules'] as List?)
?.whereNotNull()
.map((e) => CustomRule.fromJson(e as Map<String, dynamic>))
.toList(),
enableAutoBranchCreation: json['enableAutoBranchCreation'] as bool?,
enableBranchAutoDeletion: json['enableBranchAutoDeletion'] as bool?,
iamServiceRoleArn: json['iamServiceRoleArn'] as String?,
productionBranch: json['productionBranch'] != null
? ProductionBranch.fromJson(
json['productionBranch'] as Map<String, dynamic>)
: null,
tags: (json['tags'] as Map<String, dynamic>?)
?.map((k, e) => MapEntry(k, e as String)),
);
}