ProjectEnvironment.fromJson constructor
ProjectEnvironment.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ProjectEnvironment.fromJson(Map<String, dynamic> json) {
return ProjectEnvironment(
computeType: (json['computeType'] as String).toComputeType(),
image: json['image'] as String,
type: (json['type'] as String).toEnvironmentType(),
certificate: json['certificate'] as String?,
environmentVariables: (json['environmentVariables'] as List?)
?.whereNotNull()
.map((e) => EnvironmentVariable.fromJson(e as Map<String, dynamic>))
.toList(),
imagePullCredentialsType: (json['imagePullCredentialsType'] as String?)
?.toImagePullCredentialsType(),
privilegedMode: json['privilegedMode'] as bool?,
registryCredential: json['registryCredential'] != null
? RegistryCredential.fromJson(
json['registryCredential'] as Map<String, dynamic>)
: null,
);
}