RollingUpdateDeployment.fromJson constructor

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

Creates a RollingUpdateDeployment from JSON data.

Implementation

factory RollingUpdateDeployment.fromJson(Map<String, dynamic> json) {
  final tempMaxSurgeJson = json['maxSurge'];
  final tempMaxUnavailableJson = json['maxUnavailable'];

  final IntOrString? tempMaxSurge =
      tempMaxSurgeJson != null ? IntOrString(tempMaxSurgeJson) : null;
  final IntOrString? tempMaxUnavailable = tempMaxUnavailableJson != null
      ? IntOrString(tempMaxUnavailableJson)
      : null;

  return RollingUpdateDeployment(
    maxSurge: tempMaxSurge,
    maxUnavailable: tempMaxUnavailable,
  );
}