NetworkPeering.fromJson constructor

NetworkPeering.fromJson(
  1. Object? j
)

Implementation

factory NetworkPeering.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return NetworkPeering(
    autoCreateRoutes: switch (json['autoCreateRoutes']) {
      null => null,
      Object $1 => decodeBool($1),
    },
    connectionStatus: switch (json['connectionStatus']) {
      null => null,
      Object $1 => NetworkPeeringConnectionStatus.fromJson($1),
    },
    exchangeSubnetRoutes: switch (json['exchangeSubnetRoutes']) {
      null => null,
      Object $1 => decodeBool($1),
    },
    exportCustomRoutes: switch (json['exportCustomRoutes']) {
      null => null,
      Object $1 => decodeBool($1),
    },
    exportSubnetRoutesWithPublicIp:
        switch (json['exportSubnetRoutesWithPublicIp']) {
          null => null,
          Object $1 => decodeBool($1),
        },
    importCustomRoutes: switch (json['importCustomRoutes']) {
      null => null,
      Object $1 => decodeBool($1),
    },
    importSubnetRoutesWithPublicIp:
        switch (json['importSubnetRoutesWithPublicIp']) {
          null => null,
          Object $1 => decodeBool($1),
        },
    name: switch (json['name']) {
      null => null,
      Object $1 => decodeString($1),
    },
    network: switch (json['network']) {
      null => null,
      Object $1 => decodeString($1),
    },
    peerMtu: switch (json['peerMtu']) {
      null => null,
      Object $1 => decodeInt($1),
    },
    stackType: switch (json['stackType']) {
      null => null,
      Object $1 => decodeString($1),
    },
    state: switch (json['state']) {
      null => null,
      Object $1 => decodeString($1),
    },
    stateDetails: switch (json['stateDetails']) {
      null => null,
      Object $1 => decodeString($1),
    },
    updateStrategy: switch (json['updateStrategy']) {
      null => null,
      Object $1 => decodeString($1),
    },
  );
}