TargetSslProxy.fromJson constructor

TargetSslProxy.fromJson(
  1. Object? j
)

Implementation

factory TargetSslProxy.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return TargetSslProxy(
    certificateMap: switch (json['certificateMap']) {
      null => null,
      Object $1 => decodeString($1),
    },
    creationTimestamp: switch (json['creationTimestamp']) {
      null => null,
      Object $1 => decodeString($1),
    },
    description: switch (json['description']) {
      null => null,
      Object $1 => decodeString($1),
    },
    id: switch (json['id']) {
      null => null,
      Object $1 => decodeUint64($1),
    },
    kind: switch (json['kind']) {
      null => null,
      Object $1 => decodeString($1),
    },
    name: switch (json['name']) {
      null => null,
      Object $1 => decodeString($1),
    },
    proxyHeader: switch (json['proxyHeader']) {
      null => null,
      Object $1 => decodeString($1),
    },
    selfLink: switch (json['selfLink']) {
      null => null,
      Object $1 => decodeString($1),
    },
    service: switch (json['service']) {
      null => null,
      Object $1 => decodeString($1),
    },
    sslCertificates: switch (json['sslCertificates']) {
      null => [],
      List<Object?> $1 => [for (final i in $1) decodeString(i)],
      _ => throw const FormatException('"sslCertificates" is not a list'),
    },
    sslPolicy: switch (json['sslPolicy']) {
      null => null,
      Object $1 => decodeString($1),
    },
  );
}