SelectiveGapicGeneration.fromJson constructor

SelectiveGapicGeneration.fromJson(
  1. Object? j
)

Implementation

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