InterconnectAttachmentGroupsOperationalStatus.fromJson constructor

InterconnectAttachmentGroupsOperationalStatus.fromJson(
  1. Object? j
)

Implementation

factory InterconnectAttachmentGroupsOperationalStatus.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return InterconnectAttachmentGroupsOperationalStatus(
    attachmentStatuses: switch (json['attachmentStatuses']) {
      null => [],
      List<Object?> $1 => [
        for (final i in $1)
          InterconnectAttachmentGroupsOperationalStatusAttachmentStatus.fromJson(
            i,
          ),
      ],
      _ => throw const FormatException('"attachmentStatuses" is not a list'),
    },
    configured: switch (json['configured']) {
      null => null,
      Object $1 => InterconnectAttachmentGroupConfigured.fromJson($1),
    },
    groupStatus: switch (json['groupStatus']) {
      null => null,
      Object $1 => decodeString($1),
    },
    intent: switch (json['intent']) {
      null => null,
      Object $1 => InterconnectAttachmentGroupIntent.fromJson($1),
    },
    operational: switch (json['operational']) {
      null => null,
      Object $1 => InterconnectAttachmentGroupConfigured.fromJson($1),
    },
  );
}