NetworkEndpointGroupsAttachEndpointsRequest.fromJson constructor

NetworkEndpointGroupsAttachEndpointsRequest.fromJson(
  1. Object? j
)

Implementation

factory NetworkEndpointGroupsAttachEndpointsRequest.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return NetworkEndpointGroupsAttachEndpointsRequest(
    networkEndpoints: switch (json['networkEndpoints']) {
      null => [],
      List<Object?> $1 => [for (final i in $1) NetworkEndpoint.fromJson(i)],
      _ => throw const FormatException('"networkEndpoints" is not a list'),
    },
  );
}