InterconnectRemoteLocation.fromJson constructor

InterconnectRemoteLocation.fromJson(
  1. Object? j
)

Implementation

factory InterconnectRemoteLocation.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return InterconnectRemoteLocation(
    address: switch (json['address']) {
      null => null,
      Object $1 => decodeString($1),
    },
    attachmentConfigurationConstraints:
        switch (json['attachmentConfigurationConstraints']) {
          null => null,
          Object $1 =>
            InterconnectAttachmentConfigurationConstraints.fromJson($1),
        },
    city: switch (json['city']) {
      null => null,
      Object $1 => decodeString($1),
    },
    constraints: switch (json['constraints']) {
      null => null,
      Object $1 => InterconnectRemoteLocationConstraints.fromJson($1),
    },
    continent: switch (json['continent']) {
      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),
    },
    facilityProvider: switch (json['facilityProvider']) {
      null => null,
      Object $1 => decodeString($1),
    },
    facilityProviderFacilityId: switch (json['facilityProviderFacilityId']) {
      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),
    },
    lacp: switch (json['lacp']) {
      null => null,
      Object $1 => decodeString($1),
    },
    maxLagSize100Gbps: switch (json['maxLagSize100Gbps']) {
      null => null,
      Object $1 => decodeInt($1),
    },
    maxLagSize10Gbps: switch (json['maxLagSize10Gbps']) {
      null => null,
      Object $1 => decodeInt($1),
    },
    maxLagSize400Gbps: switch (json['maxLagSize400Gbps']) {
      null => null,
      Object $1 => decodeInt($1),
    },
    name: switch (json['name']) {
      null => null,
      Object $1 => decodeString($1),
    },
    peeringdbFacilityId: switch (json['peeringdbFacilityId']) {
      null => null,
      Object $1 => decodeString($1),
    },
    permittedConnections: switch (json['permittedConnections']) {
      null => [],
      List<Object?> $1 => [
        for (final i in $1)
          InterconnectRemoteLocationPermittedConnections.fromJson(i),
      ],
      _ => throw const FormatException(
        '"permittedConnections" is not a list',
      ),
    },
    remoteService: switch (json['remoteService']) {
      null => null,
      Object $1 => decodeString($1),
    },
    selfLink: switch (json['selfLink']) {
      null => null,
      Object $1 => decodeString($1),
    },
    status: switch (json['status']) {
      null => null,
      Object $1 => decodeString($1),
    },
  );
}