diff --git a/catalyst_voices/packages/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.enums.swagger.dart b/catalyst_voices/packages/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.enums.swagger.dart index 8ca7078421..ec8b97b8b5 100644 --- a/catalyst_voices/packages/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.enums.swagger.dart +++ b/catalyst_voices/packages/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.enums.swagger.dart @@ -50,27 +50,3 @@ enum VoterGroupId { const VoterGroupId(this.value); } - -enum VotingInfoDelegationsType { - @JsonValue(null) - swaggerGeneratedUnknown(null), - - @JsonValue('Delegated') - delegated('Delegated'); - - final String? value; - - const VotingInfoDelegationsType(this.value); -} - -enum VotingInfoDirectVoterType { - @JsonValue(null) - swaggerGeneratedUnknown(null), - - @JsonValue('Direct') - direct('Direct'); - - final String? value; - - const VotingInfoDirectVoterType(this.value); -} diff --git a/catalyst_voices/packages/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.models.swagger.dart b/catalyst_voices/packages/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.models.swagger.dart index 615cbaab36..49881b58a2 100644 --- a/catalyst_voices/packages/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.models.swagger.dart +++ b/catalyst_voices/packages/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.models.swagger.dart @@ -1371,12 +1371,8 @@ class VotingInfoDelegations { static const toJsonFactory = _$VotingInfoDelegationsToJson; Map toJson() => _$VotingInfoDelegationsToJson(this); - @JsonKey( - name: 'type', - toJson: votingInfoDelegationsTypeToJson, - fromJson: votingInfoDelegationsTypeFromJson, - ) - final enums.VotingInfoDelegationsType type; + @JsonKey(name: 'type') + final String type; @JsonKey(name: 'delegations', defaultValue: []) final List delegations; static const fromJsonFactory = _$VotingInfoDelegationsFromJson; @@ -1404,14 +1400,13 @@ class VotingInfoDelegations { extension $VotingInfoDelegationsExtension on VotingInfoDelegations { VotingInfoDelegations copyWith( - {enums.VotingInfoDelegationsType? type, List? delegations}) { + {String? type, List? delegations}) { return VotingInfoDelegations( type: type ?? this.type, delegations: delegations ?? this.delegations); } VotingInfoDelegations copyWithWrapped( - {Wrapped? type, - Wrapped>? delegations}) { + {Wrapped? type, Wrapped>? delegations}) { return VotingInfoDelegations( type: (type != null ? type.value : this.type), delegations: @@ -1432,12 +1427,8 @@ class VotingInfoDirectVoter { static const toJsonFactory = _$VotingInfoDirectVoterToJson; Map toJson() => _$VotingInfoDirectVoterToJson(this); - @JsonKey( - name: 'type', - toJson: votingInfoDirectVoterTypeToJson, - fromJson: votingInfoDirectVoterTypeFromJson, - ) - final enums.VotingInfoDirectVoterType type; + @JsonKey(name: 'type') + final String type; @JsonKey(name: 'voting_key') final String votingKey; static const fromJsonFactory = _$VotingInfoDirectVoterFromJson; @@ -1464,15 +1455,13 @@ class VotingInfoDirectVoter { } extension $VotingInfoDirectVoterExtension on VotingInfoDirectVoter { - VotingInfoDirectVoter copyWith( - {enums.VotingInfoDirectVoterType? type, String? votingKey}) { + VotingInfoDirectVoter copyWith({String? type, String? votingKey}) { return VotingInfoDirectVoter( type: type ?? this.type, votingKey: votingKey ?? this.votingKey); } VotingInfoDirectVoter copyWithWrapped( - {Wrapped? type, - Wrapped? votingKey}) { + {Wrapped? type, Wrapped? votingKey}) { return VotingInfoDirectVoter( type: (type != null ? type.value : this.type), votingKey: (votingKey != null ? votingKey.value : this.votingKey)); @@ -1675,152 +1664,6 @@ List? voterGroupIdNullableListFromJson( return voterGroupId.map((e) => voterGroupIdFromJson(e.toString())).toList(); } -String? votingInfoDelegationsTypeNullableToJson( - enums.VotingInfoDelegationsType? votingInfoDelegationsType) { - return votingInfoDelegationsType?.value; -} - -String? votingInfoDelegationsTypeToJson( - enums.VotingInfoDelegationsType votingInfoDelegationsType) { - return votingInfoDelegationsType.value; -} - -enums.VotingInfoDelegationsType votingInfoDelegationsTypeFromJson( - Object? votingInfoDelegationsType, [ - enums.VotingInfoDelegationsType? defaultValue, -]) { - return enums.VotingInfoDelegationsType.values - .firstWhereOrNull((e) => e.value == votingInfoDelegationsType) ?? - defaultValue ?? - enums.VotingInfoDelegationsType.swaggerGeneratedUnknown; -} - -enums.VotingInfoDelegationsType? votingInfoDelegationsTypeNullableFromJson( - Object? votingInfoDelegationsType, [ - enums.VotingInfoDelegationsType? defaultValue, -]) { - if (votingInfoDelegationsType == null) { - return null; - } - return enums.VotingInfoDelegationsType.values - .firstWhereOrNull((e) => e.value == votingInfoDelegationsType) ?? - defaultValue; -} - -String votingInfoDelegationsTypeExplodedListToJson( - List? votingInfoDelegationsType) { - return votingInfoDelegationsType?.map((e) => e.value!).join(',') ?? ''; -} - -List votingInfoDelegationsTypeListToJson( - List? votingInfoDelegationsType) { - if (votingInfoDelegationsType == null) { - return []; - } - - return votingInfoDelegationsType.map((e) => e.value!).toList(); -} - -List votingInfoDelegationsTypeListFromJson( - List? votingInfoDelegationsType, [ - List? defaultValue, -]) { - if (votingInfoDelegationsType == null) { - return defaultValue ?? []; - } - - return votingInfoDelegationsType - .map((e) => votingInfoDelegationsTypeFromJson(e.toString())) - .toList(); -} - -List? - votingInfoDelegationsTypeNullableListFromJson( - List? votingInfoDelegationsType, [ - List? defaultValue, -]) { - if (votingInfoDelegationsType == null) { - return defaultValue; - } - - return votingInfoDelegationsType - .map((e) => votingInfoDelegationsTypeFromJson(e.toString())) - .toList(); -} - -String? votingInfoDirectVoterTypeNullableToJson( - enums.VotingInfoDirectVoterType? votingInfoDirectVoterType) { - return votingInfoDirectVoterType?.value; -} - -String? votingInfoDirectVoterTypeToJson( - enums.VotingInfoDirectVoterType votingInfoDirectVoterType) { - return votingInfoDirectVoterType.value; -} - -enums.VotingInfoDirectVoterType votingInfoDirectVoterTypeFromJson( - Object? votingInfoDirectVoterType, [ - enums.VotingInfoDirectVoterType? defaultValue, -]) { - return enums.VotingInfoDirectVoterType.values - .firstWhereOrNull((e) => e.value == votingInfoDirectVoterType) ?? - defaultValue ?? - enums.VotingInfoDirectVoterType.swaggerGeneratedUnknown; -} - -enums.VotingInfoDirectVoterType? votingInfoDirectVoterTypeNullableFromJson( - Object? votingInfoDirectVoterType, [ - enums.VotingInfoDirectVoterType? defaultValue, -]) { - if (votingInfoDirectVoterType == null) { - return null; - } - return enums.VotingInfoDirectVoterType.values - .firstWhereOrNull((e) => e.value == votingInfoDirectVoterType) ?? - defaultValue; -} - -String votingInfoDirectVoterTypeExplodedListToJson( - List? votingInfoDirectVoterType) { - return votingInfoDirectVoterType?.map((e) => e.value!).join(',') ?? ''; -} - -List votingInfoDirectVoterTypeListToJson( - List? votingInfoDirectVoterType) { - if (votingInfoDirectVoterType == null) { - return []; - } - - return votingInfoDirectVoterType.map((e) => e.value!).toList(); -} - -List votingInfoDirectVoterTypeListFromJson( - List? votingInfoDirectVoterType, [ - List? defaultValue, -]) { - if (votingInfoDirectVoterType == null) { - return defaultValue ?? []; - } - - return votingInfoDirectVoterType - .map((e) => votingInfoDirectVoterTypeFromJson(e.toString())) - .toList(); -} - -List? - votingInfoDirectVoterTypeNullableListFromJson( - List? votingInfoDirectVoterType, [ - List? defaultValue, -]) { - if (votingInfoDirectVoterType == null) { - return defaultValue; - } - - return votingInfoDirectVoterType - .map((e) => votingInfoDirectVoterTypeFromJson(e.toString())) - .toList(); -} - // ignore: unused_element String? _dateToJson(DateTime? date) { if (date == null) { diff --git a/catalyst_voices/packages/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.models.swagger.g.dart b/catalyst_voices/packages/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.models.swagger.g.dart index 9a106a7e11..d953798421 100644 --- a/catalyst_voices/packages/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.models.swagger.g.dart +++ b/catalyst_voices/packages/catalyst_voices_services/lib/generated/catalyst_gateway/cat_gateway_api.models.swagger.g.dart @@ -311,7 +311,7 @@ Map _$VotingInfoToJson(VotingInfo instance) => VotingInfoDelegations _$VotingInfoDelegationsFromJson( Map json) => VotingInfoDelegations( - type: votingInfoDelegationsTypeFromJson(json['type']), + type: json['type'] as String, delegations: (json['delegations'] as List?) ?.map((e) => Delegation.fromJson(e as Map)) .toList() ?? @@ -321,20 +321,20 @@ VotingInfoDelegations _$VotingInfoDelegationsFromJson( Map _$VotingInfoDelegationsToJson( VotingInfoDelegations instance) => { - 'type': votingInfoDelegationsTypeToJson(instance.type), + 'type': instance.type, 'delegations': instance.delegations.map((e) => e.toJson()).toList(), }; VotingInfoDirectVoter _$VotingInfoDirectVoterFromJson( Map json) => VotingInfoDirectVoter( - type: votingInfoDirectVoterTypeFromJson(json['type']), + type: json['type'] as String, votingKey: json['voting_key'] as String, ); Map _$VotingInfoDirectVoterToJson( VotingInfoDirectVoter instance) => { - 'type': votingInfoDirectVoterTypeToJson(instance.type), + 'type': instance.type, 'voting_key': instance.votingKey, };