InterconnectAttachmentGroup.fromJson constructor

InterconnectAttachmentGroup.fromJson(
  1. Object? j
)

Implementation

factory InterconnectAttachmentGroup.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return InterconnectAttachmentGroup(
    attachments: switch (json['attachments']) {
      null => {},
      Map<String, Object?> $1 => {
        for (final e in $1.entries)
          decodeString(e.key): InterconnectAttachmentGroupAttachment.fromJson(
            e.value,
          ),
      },
      _ => throw const FormatException('"attachments" is not an object'),
    },
    configured: switch (json['configured']) {
      null => null,
      Object $1 => InterconnectAttachmentGroupConfigured.fromJson($1),
    },
    creationTimestamp: switch (json['creationTimestamp']) {
      null => null,
      Object $1 => decodeString($1),
    },
    description: switch (json['description']) {
      null => null,
      Object $1 => decodeString($1),
    },
    etag: switch (json['etag']) {
      null => null,
      Object $1 => decodeString($1),
    },
    id: switch (json['id']) {
      null => null,
      Object $1 => decodeUint64($1),
    },
    intent: switch (json['intent']) {
      null => null,
      Object $1 => InterconnectAttachmentGroupIntent.fromJson($1),
    },
    interconnectGroup: switch (json['interconnectGroup']) {
      null => null,
      Object $1 => decodeString($1),
    },
    kind: switch (json['kind']) {
      null => null,
      Object $1 => decodeString($1),
    },
    logicalStructure: switch (json['logicalStructure']) {
      null => null,
      Object $1 => InterconnectAttachmentGroupLogicalStructure.fromJson($1),
    },
    name: switch (json['name']) {
      null => null,
      Object $1 => decodeString($1),
    },
    selfLink: switch (json['selfLink']) {
      null => null,
      Object $1 => decodeString($1),
    },
  );
}