ContainerServiceDeployment.fromJson constructor

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

Implementation

factory ContainerServiceDeployment.fromJson(Map<String, dynamic> json) {
  return ContainerServiceDeployment(
    containers: (json['containers'] as Map<String, dynamic>?)?.map(
        (k, e) => MapEntry(k, Container.fromJson(e as Map<String, dynamic>))),
    createdAt: timeStampFromJson(json['createdAt']),
    publicEndpoint: json['publicEndpoint'] != null
        ? ContainerServiceEndpoint.fromJson(
            json['publicEndpoint'] as Map<String, dynamic>)
        : null,
    state: (json['state'] as String?)?.toContainerServiceDeploymentState(),
    version: json['version'] as int?,
  );
}